aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86InstrCompiler.td
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-10-12 18:00:49 +0000
committerDan Gohman <gohman@apple.com>2010-10-12 18:00:49 +0000
commit320afb8c818b5cd5b9d4fcd0dba83ba3384ed4b4 (patch)
treee9f21f0a487672547e31382ef3144e7f392a6035 /lib/Target/X86/X86InstrCompiler.td
parent8e157302f4991b08a625b05238e01d12c82a2976 (diff)
downloadexternal_llvm-320afb8c818b5cd5b9d4fcd0dba83ba3384ed4b4.zip
external_llvm-320afb8c818b5cd5b9d4fcd0dba83ba3384ed4b4.tar.gz
external_llvm-320afb8c818b5cd5b9d4fcd0dba83ba3384ed4b4.tar.bz2
Initial va_arg support for x86-64. Patch by David Meyer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116319 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86InstrCompiler.td')
-rw-r--r--lib/Target/X86/X86InstrCompiler.td11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/X86/X86InstrCompiler.td b/lib/Target/X86/X86InstrCompiler.td
index 4fdbdc5..6bfd605 100644
--- a/lib/Target/X86/X86InstrCompiler.td
+++ b/lib/Target/X86/X86InstrCompiler.td
@@ -78,6 +78,17 @@ def VASTART_SAVE_XMM_REGS : I<0, Pseudo,
imm:$regsavefi,
imm:$offset)]>;
+// The VAARG_64 pseudo-instruction takes the address of the va_list,
+// and places the address of the next argument into a register.
+let Defs = [EFLAGS] in
+def VAARG_64 : I<0, Pseudo,
+ (outs GR64:$dst),
+ (ins i8mem:$ap, i32imm:$size, i8imm:$mode, i32imm:$align),
+ "#VAARG_64 $dst, $ap, $size, $mode, $align",
+ [(set GR64:$dst,
+ (X86vaarg64 addr:$ap, imm:$size, imm:$mode, imm:$align)),
+ (implicit EFLAGS)]>;
+
// Dynamic stack allocation yields _alloca call for Cygwin/Mingw targets. Calls
// to _alloca is needed to probe the stack when allocating more than 4k bytes in
// one go. Touching the stack at 4K increments is necessary to ensure that the