[llvmlinux] AARCH64 unit tests for clang

Tim Northover t.p.northover at gmail.com
Tue Oct 29 18:55:32 UTC 2013


> Thanks. I fixed the @ vs // and the issue persists. I filed an llvm bug:
>
> http://llvm.org/bugs/show_bug.cgi?id=17728

You're quite right. Could have sworn I'd tested that, but I now see
exactly the same thing. Must have forgotten the -O2 or something.

The *actual* problem is reducible to:

void foo() {
  asm volatile("%w0" :: "Ir"(42));
}

Clang is using the "I" constraint (since 42 is immediate) and getting
ready to pring "#42", but then doesn't know what to do about the "w"
operand modifier since that only applies to registers.

I'll put a comment on the PR, though I may not get to deal with it
myself any time soon.

It's a bit of a sticky situation all round really. What if your
different constraints both want (different) modifiers, or the modifier
should only apply to one of them? But GCC's been doing this for ages
so I assume we'll eventually come into line.

Cheers.

Tim.


More information about the LLVMLinux mailing list