Re: default CPU target ix86 based ports
>> There's no good reason to drop 486 support under Linux. So for Linux,
>> it would be -mcpu=i486 -mtune-i686 as the default, correct?
>
>yes, except gcc-3.3 doesn't have -mtune. So this should be -mcpu=i686
>-march=486.
Aaargh. ;-) For 3.4 and the future we've standardized on 'arch' and
'tune'; 'cpu' was used inconsistently for different systems. But
indeed, for ix86, -march=486 -mcpu=686 seems to be equivalent to the
3.4-style -march=486 -mtune=686. :-)
>Looking at config.gcc the TARGET_CPU_DEFAULT is
>overwritten by the target_alias. Looking at i386.c:1038 the cpu string
>(tuning) is set to the TARGET_DEFAULT, but the arch string remains at
>i386. the correct way to tune for i686 and use insn for i486 seems to
>be this one. do you agree?
>
>--- gcc/config/i386/i386.c~ 2003-07-09 07:45:00.000000000 +0200
>+++ gcc/config/i386/i386.c 2003-08-09 12:58:33.000000000 +0200
>@@ -1038,9 +1038,9 @@
> if (!ix86_cpu_string && ix86_arch_string)
> ix86_cpu_string = ix86_arch_string;
> if (!ix86_cpu_string)
>- ix86_cpu_string = cpu_names [TARGET_CPU_DEFAULT];
>+ ix86_cpu_string = cpu_names [TARGET_CPU_DEFAULT_pentiumpro];
> if (!ix86_arch_string)
>- ix86_arch_string = TARGET_64BIT ? "athlon-4" : "i386";
>+ ix86_arch_string = TARGET_64BIT ? "athlon-4" : "i486";
I believe this should work. A less invasive method would be nicer if
possible, but the support for it is probably missing from gcc 3.3. :-/
--
Nathanael Nerode <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html
Reply to: