Changes to lunar optimize
Zbigniew Luszpinski
zbiggy at o2.pl
Mon Sep 27 15:56:12 CEST 2010
> > cpu selection in safe mode should be limited to:
> > -i686
> > -native
> > only. The first one is paranoid safe and slow, the second one is
> > really safe and the fastest.
>
> well, I'd argue that -i586 would be even safer than i686, but in
> reality the only safe optimization is -march=native or nothing else,
> and that's certainly acceptable. So lets (in safe mode) only show:
>
> ( ) none
> (x) native
-march=i586 and below will be less safe. Lunar 32bit is compiled for i686
target. Going below main arch is not safe however not much. That is why on
32bit Lunar ( ) none target == -march=pentiumpro == -march=i686. You can
test this using empty export TESTFLAGS="" parameter in script presented in
PoC.
man gcc says:
pentiumpro
Intel PentiumPro CPU.
i686
Same as "generic", but when used as "march" option, PentiumPro instruction
set will be used, so the code will run on all i686 family chips.
> > On Lunar general ML I presented a proof that shows native target is
> > better than manually selecting CPU. If newbie will choose bad cpu
> > broken system will be compiled.
>
> a script will always know best :)
>
> Also, in your POC your compiler isn't enabling -fpmath=... I wonder
> why, perhaps that's different per CPU whether it's worth it or not.
mfpmath is enabled by default: man gcc - for 32bit =387 for 64bit =sse.
This test script shows only settings set via gcc parameter manually or
march= option which expands itself to other flags like msse m3dnow or mmmx
It does not show what is set by default.
have a nice day,
Zbigniew Luszpinski
More information about the Lunar-dev
mailing list