GCC proposal for "@" asm constraint
Andrea Arcangeli
andrea@suse.de
Mon Sep 18 15:59:00 GMT 2000
On Mon, Sep 18, 2000 at 03:39:50PM -0700, Linus Torvalds wrote:
> Have you looked at the code it generates? Quite sad, really.
I read the asm produced by some of some of my testcases. The current spinlock
implementation seems to do exactly the _right_ thing in practice and nothing
more. "memory" was instead causing reloads of constant addresses into registers
and stuff that shouldn't be necessary (I was infact wondering about the reason
of those suprious loads also in my first email).
Said that I heard that some recent gcc miscompiles the kernel and we also have
to always compile with -fno-strict-aliasing. I think gcc developers should
comment about this issue. If they say the __dummy way is still going to be safe
for some gcc release, we can skip those spurious loads caused by the "memory"
clobber. From the email I received from Richard Henderson in this thread it
seems they prefer that the kernel doesn't relys on those __dummy just now (and
they have the rights to complain because that's a kernel bug).
Andrea
More information about the Gcc
mailing list