gcc 3.3 -mcpu overly restrictive for -m64 (and a couple of other gotchas)
Casey Leedom
casey_leedom@yahoo.com
Tue Mar 25 01:40:00 GMT 2003
In the GCC 3.3 BETA distribution there are several problems in the routine
gcc/config/i386/i386.c:override_options():
1. The most serious issue is that I'm prevented from using
-m64 -march=k8 -mcpu=foo
when "foo" is not equal to "k8". I need to experiment with different
instruction schedules as part of a performance analysis. The check for
ix86_arch_string referring to a CPU which has PTA_64BIT is perfectly
reasonable. But the following check to make sure that the ix86_cpu_string
also refers to a PTA_64BIT is suspect. I don't believe that th -mcpu=
specification should be subject to this check. The -mcpu= argument is
supposed to allow the target instruction scheduling to be selected
independently of the -march specification.
2. Immediately after the suspect check of ix86_cpu_string there's an if-
statement outside the for-loop that's checking processor_alias_table[i] to
see if PTA_PREFETCH_SSE is set. This was probably supposed to be inside
the immediately preceeding search loop.
3. Near the beginning of the routine the declarations for ptt and pta are
missing their terminating semi-colons. Strange that the C compiler doesn't
catch this ...
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
More information about the Gcc-bugs
mailing list