[llvm] r214550 - MS inline asm: Use memory constraints for functions instead of registers
Duncan P. N. Exon Smith
dexonsmith at apple.com
Fri Aug 1 14:39:32 PDT 2014
> On 2014 Aug 1, at 13:21, Reid Kleckner <reid at kleckner.net> wrote:
>
> Author: rnk
> Date: Fri Aug 1 15:21:24 2014
> New Revision: 214550
>
> URL: http://llvm.org/viewvc/llvm-project?rev=214550&view=rev
> Log:
> MS inline asm: Use memory constraints for functions instead of registers
>
> This is consistent with how we parse them in a standalone .s file, and
> inline assembly shouldn't differ.
>
> This fixes errors about requiring more registers than available in
> cases like this:
> void f();
> void __declspec(naked) g() {
> __asm pusha
> __asm call f
> __asm popa
> __asm ret
> }
>
> There are no registers available to pass the address of 'f' into the asm
> blob. The asm should now directly call 'f'.
>
> Tests will land in Clang shortly.
>
> Modified:
> llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
> llvm/trunk/test/CodeGen/X86/ms-inline-asm.ll
This testcase is failing locally for me on Darwin:
> error: inline assembly requires more registers than available
> FileCheck error: '-' is empty.
Let me know if you need help reproducing.
More information about the llvm-commits
mailing list