[LLVMdev] x86_stdcallcc and extra name mangling on Windows
David Nadlinger
code at klickverbot.at
Tue Feb 19 04:56:04 PST 2013
Hi all,
I'm currently working on getting our (LDC) compiler to run on
Win32/MinGW, now that DW2-style EH is available for it. The D
programming language has a feature equivalent to LLVM module level
inline assembly, so we need to at least partly follow the x86 D
calling convention (http://dlang.org/abi.html).
Most notably, the ABI mandates that the callee cleans the stack. On
the various Posixen, we use x86_stdcallcc as a basis and apply some
rewrites at the IR level to make things work just well enough.
However, on Windows targets this does not work because of the extra
name mangling applied.
My question: Is there an easy way of disabling the name-mangling part
but keep the rest of the CC that I missed? Because I couldn't find
anything to that regard, I threw together a quick patch to add a
custom calling convention (see attachment). It seems to work for now,
but is there a better solution?
Thanks,
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-3.2-x86-d.diff
Type: application/octet-stream
Size: 6005 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130219/24845fe3/attachment.obj>
More information about the llvm-dev
mailing list