[llvm-bugs] [Bug 19027] Clang doesn't support stdcall names in inline asm

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 31 07:17:10 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=19027

Nico Weber <nicolasweber at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nicolasweber at gmx.de
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #7 from Nico Weber <nicolasweber at gmx.de> ---
This seems to work now:

$ cat test.c
void __stdcall StdcallFunc() {};

void Test()
{
    asm ("call _StdcallFunc at 0\n");
}
$ out/gn/bin/clang-cl -fuse-ld=lld test.c -m32 /LD /link /nodefaultlib /noentry
$ out/gn/bin/llvm-objdump --disassemble test.dll

test.dll:       file format COFF-i386


Disassembly of section .text:

10001000 .text:
10001000: 55                            pushl   %ebp
10001001: 89 e5                         movl    %esp, %ebp
10001003: 5d                            popl    %ebp
10001004: c3                            retl
10001005: 66 2e 0f 1f 84 00 00 00 00 00 nopw    %cs:(%eax,%eax)
1000100f: 90                            nop
10001010: 55                            pushl   %ebp
10001011: 89 e5                         movl    %esp, %ebp
10001013: e8 e8 ff ff ff                calll   -24 <.text>
10001018: 5d                            popl    %ebp
10001019: c3                            retl

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190731/6b6fd55d/attachment.html>


More information about the llvm-bugs mailing list