[TriLUG] building code optomized for Duron and Athalon processors
brent at rcfile.org
Fri Sep 17 08:30:51 EDT 2004
[2004-09-17 08:21] Ralph Blach said:
| I am trying to build code optimized for the Duron and Athalon processors
| using gcc.
| What is the correct -mcpu_type for the gcc?
I believe you'd want to use
Tune to cpu-type everything applicable about the generated code,
except for the ABI and the set of available instructions. The
choices for cpu-type are i386, i486, i586, i686, pentium, pentium-
mmx, pentiumpro, pentium2, pentium3, pentium4, prescott, nocona,
k6, k6-2, k6-3, athlon, athlon-tbird, athlon-4, athlon-xp, athlon-
mp, winchip-c6, winchip2 and c3.
While picking a specific cpu-type will schedule things appropri-
ately for that particular chip, the compiler will not generate any
code that does not run on the i386 without the -march=cpu-type
option being used. i586 is equivalent to pentium and i686 is
equivalent to pentiumpro. k6 and athlon are the AMD chips as
opposed to the Intel ones.
Generate instructions for the machine type cpu-type. The choices
for cpu-type are the same as for -mcpu. Moreover, specifying
-march=cpu-type implies -mcpu=cpu-type.
More information about the TriLUG