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: law at cygnus dot com
- Subject: RE: inline asm and status flags on x86
- From: Geoff Berry <geoffb at bops dot com>
- Date: Tue, 2 May 2000 14:17:04 -0400
- Cc: gcc at gcc dot gnu dot org
I did read this section but I understood it to mean something different from
what I was trying to achieve. It refers to accessing condition codes left
by the assembler instruction, but I am trying to access condition codes in
the assembler statement left by non-assembler statements. If this is not
workable for the same reasons, I would not be surprised; however, I don't
think what I am attempting is described by the quoted passage (but perhaps
it should be?).
--
Geoff Berry
-----Original Message-----
From: Jeffrey A Law [mailto:law@cygnus.com]
Sent: Tuesday, May 02, 2000 1:33 PM
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