Choosing K6/K6-II/K6-III when configuring the kernel results in adding "-march=k6" to cflags. As far as I am aware the K6-II has more registers and new instructions. Why not enable the user to set "-march=k6-2"?

I compiled the Mandriva kernel (2.6.12) with -march=k6-2 and it seems to work just fine. I understand GCC has previously possibly mucked things up when compiling for K6..maybe that's why Makefile.cpu is set up like it is? If so, there's no reason to keep it that way. Testing with GIMP and X.org revealed GCC is compiling K6-II code without a hitch now.

What do you think? Should I post a bugreport?

On another note, compiling the kernel on a Celeron A - why -march=i686 -mcpu=pentium2? Why not just -march=pentium2?_________________"So slay me now! I have little magic left."
- Kallak, leader of the royal mystics

3DNOW! instructions aren't needed in the kernel and the extra registers the K6-2 has is just for 3DNOW! data. But I found this interesting note:

Quote:

..they just added 16 wait states to the execution of the LOOPcc and thus caused
it to slow to the speed of a Pentium. AMD didn't just do this however. They
added a special case (speculation, might be coincidence) for the DEC (E)CX; Jcc
combination, which is semantically equivalent with the LOOPcc instruction, but
this semantic equivalency and the loop being faster on Intels caused the loop
instruction to always be used. Nobody used the DEC/Jcc combo. They kept the
original speed for this combo and specified in their optimization manuals that
this was the preferred method over the loopcc instruction.

The question is - does GCC use DEC/Jcc instead of LOOPcc when using -march=k6-2? Are such waits at all generated in the kernel code? If so then maybe there's a point in using -march=k6-2.. I'm sure there's people more involved here that can tell me about this, I'm just stumbling in the dark _________________"So slay me now! I have little magic left."
- Kallak, leader of the royal mystics