Re: default CPU target for ix86 based ports
>Now that the kernel-image packages supports hw emulation of i486
>instructions on i386 hardware, I'd like to change the code generation
>to default to i486 (not sure if it should be tuned for any other
Yes. I think -march=i486 is quite appropriate here, provided that the
kernel-image packages really emulate *all* the i486 instructions.
(For ix86 only, of course -- I think --march=i486 would confuse gcc for
sparc. ;-) )
>target, i.e. -mtune=i686).
Yes. -mtune=i686 is clearly correct; tuning is quite different on 486,
586, and 686 apparently, but pretty much the same for 686 onward. This
would optimize for speed on what are by far the most common ix86
machines (Pentium Pro and newer) while still running without difficulty
on all the older machines (Original Pentium, 486, and 386).
Who knows; these two changes might appease some of the people
complaining that their builds aren't optimized enough. It does make
a noticable difference in some benchmarks.
(Also, with the CPUID instruction being present in 586 and later, it's
now very straightforward to write programs which autoselect differently
optimized versions at runtime -- if CPUID is not present, it can be
treated as 486. So anyone asking for more processor-specific
optimization can be told to write it themselves.) :-)
--
Nathanael Nerode <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html
Reply to: