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



  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]