Re: GCC proposal for "@" asm constraint

From: Andrea Arcangeli (andrea@suse.de)
Date: Tue Sep 19 2000 - 09:39:21 EST


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





-
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:20 EST