Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
K6-series kernel cflags
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
DiskDoc
Apprentice
Apprentice


Joined: 25 Apr 2002
Posts: 196
Location: Finland

PostPosted: Mon Feb 13, 2006 6:19 pm    Post subject: K6-series kernel cflags Reply with quote

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
Back to top
View user's profile Send private message
DiskDoc
Apprentice
Apprentice


Joined: 25 Apr 2002
Posts: 196
Location: Finland

PostPosted: Wed Feb 15, 2006 11:17 am    Post subject: End of story Reply with quote

Tying things together.. I posted a bugreport here:

http://bugs.gentoo.org/show_bug.cgi?id=122844

and was told to ask the (vanilla-)kernel people instead. I did that here:

http://bugzilla.kernel.org/show_bug.cgi?id=6074

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.


..from here: http://www.mega-tokyo.com/osfaq2/index.php/The%20IA32%20Architecture%20Family

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum