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]

Re: GCC proposal for "@" asm constraint


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

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