GCC proposal for "@" asm constraint

Andrea Arcangeli andrea@suse.de
Tue Sep 19 07:27:00 GMT 2000


On Mon, Sep 18, 2000 at 09:37:43PM -0400, John Wehle wrote:
> It's perhaps not optimal, however I'm not sure that it's wrong.  In

It's not "wrong" in the sense that something breaks but it's definitely
suboptimal. There's no reason to reload a value that can't change because it's
embedded into the opcodes of the asm and set a static linking time.

> any case if you can supply a small standalone test case (i.e. preprocessed
> source code) I'll take a quick look at things.  I take it that you haven't
> tried the current gcc sources?

The first testcase is the current spinlock implementation, the second testcase
adds the "memory" clobber and it generates the _spurious_ reload of `p'. You
should be able to compile with `gcc -O2 -S p-*.i`.

Andrea


More information about the Gcc mailing list