summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86JITInfo.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-03-23 12:32:54 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-03-23 12:32:54 +0000
commit6aeedfd0f561df2330207907e32ab507d268a9ad (patch)
tree6a107a91a65b0074bbabe5e61f8f74002eac2c33 /lib/Target/X86/X86JITInfo.cpp
parentf5e941b9f690e54597af6b33df582ea2c5b72e4a (diff)
downloadllvm-6aeedfd0f561df2330207907e32ab507d268a9ad.tar.gz
llvm-6aeedfd0f561df2330207907e32ab507d268a9ad.tar.bz2
llvm-6aeedfd0f561df2330207907e32ab507d268a9ad.tar.xz
Remove old-standing obsolete code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48701 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86JITInfo.cpp')
-rw-r--r--lib/Target/X86/X86JITInfo.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/Target/X86/X86JITInfo.cpp b/lib/Target/X86/X86JITInfo.cpp
index cb16c6c26b..1c8d214ddb 100644
--- a/lib/Target/X86/X86JITInfo.cpp
+++ b/lib/Target/X86/X86JITInfo.cpp
@@ -260,20 +260,30 @@ extern "C" {
CFI(".cfi_endproc\n")
);
#else
- void X86CompilationCallback2(void);
+ void X86CompilationCallback2(intptr_t *StackPtr, intptr_t RetAddr);
_declspec(naked) void X86CompilationCallback(void) {
__asm {
+ push ebp
+ mov ebp, esp
push eax
push edx
push ecx
+ and esp, -16
+ mov eax, dword ptr [ebp+4]
+ mov dword ptr [esp+4], eax
+ mov dword ptr [esp], ebp
call X86CompilationCallback2
+ mov esp, ebp
+ sub esp, 12
pop ecx
pop edx
pop eax
+ pop ebp
ret
}
}
+
#endif // _MSC_VER
#else // Not an i386 host
@@ -288,16 +298,8 @@ extern "C" {
/// function stub when we did not know the real target of a call. This function
/// must locate the start of the stub or call site and pass it into the JIT
/// compiler function.
-#ifdef _MSC_VER
-extern "C" void X86CompilationCallback2() {
- assert(sizeof(size_t) == 4); // FIXME: handle Win64
- intptr_t *RetAddrLoc = (intptr_t *)_AddressOfReturnAddress();
- RetAddrLoc += 4; // skip over ret addr, edx, eax, ecx
- intptr_t RetAddr = *RetAddrLoc;
-#else
extern "C" void X86CompilationCallback2(intptr_t *StackPtr, intptr_t RetAddr) {
intptr_t *RetAddrLoc = &StackPtr[1];
-#endif
assert(*RetAddrLoc == RetAddr &&
"Could not find return address on the stack!");