x86 code generation question

Jack Lloyd lloyd@randombit.net
Thu Apr 29 23:12:00 GMT 2004


On Thu, Apr 29, 2004 at 05:03:19PM -0400, Paul Koning wrote:

> Given a machine with conditional move instructions, either version
> should translate into straight line code with conditional moves, but
> (apparently -- I'm no x86 expert) the x86 isn't one of those.  Arm and
> Alpha are, though.

IIRC x86 has cmov in ppro and up, so it's possible the OP just needs to use
-march=i586 (or up) to get the desired behavior. It seems unlikely that GCC
would not know about i586 instructions, though the optimizer might not be able
to use cmov well due to register pressure.

-J



More information about the Gcc mailing list