This: int G; int foo(int X) { __asm__ __volatile__ ("xchg{l} {%0,%1|%1,%0}" : "=m" (G), "+r" (X) : "m" (G)); return X; } Is rejected with: asm.c:4: error: Invalid or unsupported inline assembly! -Chris
Patch applied to llvm-gcc, but now it crashes in the code generator.
Fixed. Patch here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060717/036098.html Testcase here: CodeGen/X86/2006-07-20-InlineAsm.ll -Chris