[llvm-commits] [PATCH] Proper va_arg/va_copy lowering on WindowsX86_64

Nico Rieck nico.rieck at gmail.com
Sun Jan 20 12:00:01 PST 2013


X86ISelLowering lowers va_arg and va_copy assuming
X86_64ABIBuiltinVaList as va_list kind for 64-bit targets. This
generates broken code because WindowsX86_64 uses char* for va_list.

There seems to be no way to easily access the TargetInfo and its
va_list-kind so the patch adds an additional check for Windows
(including CygMin).

---
 lib/Target/X86/X86ISelLowering.cpp |  4 ++-
 test/CodeGen/X86/win64_vararg.ll   | 59
++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+), 1 deletion(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Proper-va_arg-va_copy-lowering-on-WindowsX86_64.patch
Type: text/x-patch
Size: 2940 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130120/5bcd1b36/attachment.bin>


More information about the llvm-commits mailing list