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]
Other format: [Raw text]

Re: statement expressions and extended asm bug?


Gunther Nikl wrote:
On Mon, Mar 15, 2004 at 02:03:10PM +0000, Nathan Sidwell wrote:

It is your explicit allocation of the two temporary variables into the
same register that is breaking things.


  Ok, thats what I wanted to know. So, if I assign the temporary explict
  register variable containing the result to a non-register variable, then
  the expressions become well-formed and don't violate other constraints,
  right?
If you are asking whether
  ({int i; int j __asm__("d0"); volatile asm ("..." : "=r"(j)...); i = j; i;})
will DTRT, the answer is no.

If you are asking something else, you'll have to rephrase it.

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



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