[Top] [All Lists]

Re: [PATCH] incorrect asm constraints for ll/sc constructs

To: "Kevin D. Kissell" <>
Subject: Re: [PATCH] incorrect asm constraints for ll/sc constructs
From: "Maciej W. Rozycki" <>
Date: Mon, 28 May 2001 15:59:29 +0200 (MET DST)
Cc: Daniel Jacobowitz <>,
In-reply-to: <005901c0e77c$dae9f2e0$0deca8c0@Ulysses>
Organization: Technical University of Gdansk
Reply-to: "Maciej W. Rozycki" <>
On Mon, 28 May 2001, Kevin D. Kissell wrote:

> I'd been disassembling the resulting .o files, as I didn't care whether
> it's the compiler or the assembler that ultimately makes things right.

 It's good to check the generated assembly if you suspect a tool bug.

> Repeating your experiment using -S gives the following results:

 Thanks for testing other versions.

> However, if one compiles all the way to object code and looks
> at what the assembler is actually doing with those "impossible"
> offsets under gcc 2.90 and 2.91, technically, it's not violating ".noat"
> in the "m" and "o" constraint  cases.   It is *not* using the "at" register.
> It is, however, cleverly using the load destination  register as a temporary
> to calculate  the correct address.  As there are no memory operations,

 That's clever, indeed...

> these instructions should have no effect  on the correct execution
> of the ll/sc sequence  (though they will  increase the statistical
> probability
> of a context  switch between ll and sc).

 ... but that won't work for a lone store, so we need a properly working
'R' constraint in the compiler.  Since 3.0 works, as you report, there is
no need to worry (but I might consider backporting changes to 2.95.3).


+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+        e-mail:, PGP key available        +

<Prev in Thread] Current Thread [Next in Thread>