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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux