Athlon compilers?

poorboy

Distinguished
Jan 17, 2002
634
0
18,980
gcc now has athlon (well, K7) options.
<i>-mcpu=cpu-type
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, k6, k6-2, k6-3, athlon, athlon-tbird, athlon-4, athlon-xp and athlon-mp.

While picking a specific cpu-type will schedule things appropriately 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.
-march=cpu-type
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.
</i> -- <A HREF="http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html" target="_new">http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html</A>

Dunno if there's any others. You'd think AMD would release one...
 

silverpig

Splendid
Dec 31, 2007
5,068
0
25,780
Yeah, I sorta knew about the whole ix86 and athlon ones... Didn't really know about athlon-tbird or athlon4... I know intel has released compilers, but I wanna get an actual AMD one.

The definitely should release one.

Lyrics. Wasted time between solos.
 

poorboy

Distinguished
Jan 17, 2002
634
0
18,980
I think AMD are putting some effort into the x86-64 gcc port so it's reasonably that some work has seeped into the rest of gcc (hence the new cpu ops). Guessing from the prominent links to other commercial compilers on their website, maybe they're better off selling their knowledge to 3rd party vendors and taking the royalties... Fair enough too, cos if the extra speed is that important to someone (if there even is any) most folks would probably pay for it.

I've read reports of upto 40% speed increases using Intel's freebie compiler (on Intel chips), so even a conservative 15% increase would be nice. Something like that Sourcerer distro could be interesting if it compiles with full optimisations.