This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: inline asm and status flags on x86


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]