[llvm-commits] [llvm-gcc-4.2] r76208 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-convert.cpp

Eli Friedman eli.friedman at gmail.com
Fri Jul 17 12:48:05 PDT 2009


On Fri, Jul 17, 2009 at 12:41 PM, Anton
Korobeynikov<anton at korobeynikov.info> wrote:
> The problem is with the stuff like
>
> void foo(void) {
>  register int* bar __asm__("baz");
>  quux(*bar, bar+1);
> }
>
> We completely ignored asm specifier previously.

I don't see anything wrong with that... tying a local variable to a
register only guarantees that variable is in the tied register in
inline asm blocks.

> Currently we're
> emitting inline asm for loads / stores to such variables (just blank
> inline asm node with input / output tied to the specified register and
> variable).

I don't see why.  It's a meaningless construct: it doesn't guarantee
anything about where the variable is either immediately before or
immediately after the asm.

-Eli




More information about the llvm-commits mailing list