llvm-gcc generates invalid code for a function consisting only of a single inline asm statement
Created attachment 800 [details] Simple test case This simple test case compiles and runs fine in gcc at any optimisation level, but crashes when compiled with llvm-gcc
Taking a look, we probably don't handle the 'o' constraint.
hrm, this is nasty. The code generator is seeing o as a memory constraint (correct) then seeing the integer constant as a valid offsetable address (wrong). Tracking.
I am working on fixing this, but it may take several days. The workaround is to remove 'o' from the inline asm.
Fixed. Many patches made this possible, but the final patch is here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070423/048601.html Testcase here: CodeGen/X86/2007-04-27-InlineAsm-IntMemInput.ll Many thanks for the reduced testcase! -Chris
Awesome, it will probably be a wee while before i can verify alas :(