"rep ret" even for Intel CPUs?
Ian Lance Taylor
iant@google.com
Mon Mar 21 20:32:00 GMT 2011
"Zuxy Meng" <zuxy.meng@gmail.com> writes:
> I found that gcc 4.5 generates "rep ret" even under -march=core2. Does
> an Intel CPU benefit from this optimization too?
As far as I know no Intel CPU benefits. Note that -march selects the
architecture but not the tuning. The default tuning uses "rep; ret"
when appropriate. If you want to avoid it, use a -mtune option.
Ian
More information about the Gcc-help
mailing list