aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86JITInfo.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2011-02-05 15:11:03 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2011-02-05 15:11:03 +0000
commit9c7719e8b6bd4592b79af5ae84b796ecb899d939 (patch)
treeb5d55cf13dde122c45703bdfd15a78f9519cda1c /lib/Target/X86/X86JITInfo.cpp
parent2763538609fd455d63c192b320c73fb5d48c3e47 (diff)
lib/Target/X86/X86JITInfo.cpp: Add Win64 stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86JITInfo.cpp')
-rw-r--r--lib/Target/X86/X86JITInfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/X86/X86JITInfo.cpp b/lib/Target/X86/X86JITInfo.cpp
index 9a07700b93..3f88fa69d0 100644
--- a/lib/Target/X86/X86JITInfo.cpp
+++ b/lib/Target/X86/X86JITInfo.cpp
@@ -127,9 +127,17 @@ extern "C" {
"movaps %xmm6, 96(%rsp)\n"
"movaps %xmm7, 112(%rsp)\n"
// JIT callee
+#ifdef _WIN64
+ "subq $32, %rsp\n"
+ "movq %rbp, %rcx\n" // Pass prev frame and return address
+ "movq 8(%rbp), %rdx\n"
+ "call " ASMPREFIX "X86CompilationCallback2\n"
+ "addq $32, %rsp\n"
+#else
"movq %rbp, %rdi\n" // Pass prev frame and return address
"movq 8(%rbp), %rsi\n"
"call " ASMPREFIX "X86CompilationCallback2\n"
+#endif
// Restore all XMM arg registers
"movaps 112(%rsp), %xmm7\n"
"movaps 96(%rsp), %xmm6\n"