This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: x86 code generation question
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