Re: GCC proposal for "@" asm constraint

From: Andrea Arcangeli (andrea@suse.de)
Date: Mon Sep 18 2000 - 18:10:43 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 21:00:19 EST