<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Aug 1, 2014 at 2:39 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><br>
> On 2014 Aug 1, at 13:21, Reid Kleckner <<a href="mailto:reid@kleckner.net">reid@kleckner.net</a>> wrote:<br>
><br>
> Author: rnk<br>
> Date: Fri Aug  1 15:21:24 2014<br>
> New Revision: 214550<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=214550&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=214550&view=rev</a><br>
> Log:<br>
> MS inline asm: Use memory constraints for functions instead of registers<br>
><br>
> This is consistent with how we parse them in a standalone .s file, and<br>
> inline assembly shouldn't differ.<br>
><br>
> This fixes errors about requiring more registers than available in<br>
> cases like this:<br>
>  void f();<br>
>  void __declspec(naked) g() {<br>
>    __asm pusha<br>
>    __asm call f<br>
>    __asm popa<br>
>    __asm ret<br>
>  }<br>
><br>
> There are no registers available to pass the address of 'f' into the asm<br>
> blob.  The asm should now directly call 'f'.<br>
><br>
> Tests will land in Clang shortly.<br>
><br>
> Modified:<br>
>    llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp<br>
>    llvm/trunk/test/CodeGen/X86/ms-inline-asm.ll<br>
<br>
</div>This testcase is failing locally for me on Darwin:<br>
<br>
> error: inline assembly requires more registers than available<br>
> FileCheck error: '-' is empty.<br>
<br>
Let me know if you need help reproducing.</blockquote><div><br></div><div>I hid the symbol in r214571, hopefully that fixes it. </div></div></div></div>