What is a difference between `-march=pentiumpro' and `-march=i686'
Joe Buck
jbuck@racerx.synopsys.com
Wed Oct 25 16:42:00 GMT 2000
> What is a difference between:
> `-march=pentiumpro' and `-march=i686' ?
> `-mcpu=pentiumpro' and `-mcpu=i686' ?
"pentiumpro" and "i686" are idential.
The difference between -march and -mcpu is this: -mcpu says "tune the
code for this processor", -march says "you are allowed to use special
instructions that exist only on this processor". By default, you get
-march=i386 and -mcpu=<the processor detected by configure>, meaning
the code you get will run on any Intel-compatible hardware.
> And what are best optimization options (for code speed, of course)
> flags for PIII and Athlon processors in gcc 2.95.2 ?
There is specific code for the Athlon (-mcpu=athlon) and K6 (-mcpu=k6).
There does not seem to be any specific PIII code; I think people
are using i686 but don't know.
I don't have any numbers or data saying how good any of this tuning is.
More information about the Gcc
mailing list