This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: inline asm and status flags on x86
- To: Geoff Berry <geoffb at bops dot com>
- Subject: Re: inline asm and status flags on x86
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 02 May 2000 11:32:57 -0600
- cc: gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <3D71CCC526F1D311A72600902773EC21094E9F@cascabella.rtp.bops.com>yo
u write:
> Is there any way to specify that an asm statement reads the values of the
> status flags on the x86? I have tried doing the following
If you read the section on asm statements in the GCC manual you will find:
It is a natural idea to look for a way to give access to the condition
code left by the assembler instruction. However, when we attempted to
implement this, we found no way to make it work reliably. The problem
is that output operands might need reloading, which would result in
additional following ``store'' instructions. On most machines, these
instructions would alter the condition code before there was time to
test it. This problem doesn't arise for ordinary ``test'' and
``compare'' instructions because they don't have any output operands.
jeff