diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-08-03 08:43:36 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-08-03 08:43:36 +0000 |
commit | 0144280cfb86be5feacd5fada80391541655eb49 (patch) | |
tree | bdb4caa338f14627a1603828fad9b93b9127632b /lib/Target/X86/X86CompilationCallback_Win64.asm | |
parent | eed0ff147c40aa6a1550b331c6b4bb6ed994ff25 (diff) | |
download | llvm-0144280cfb86be5feacd5fada80391541655eb49.tar.gz llvm-0144280cfb86be5feacd5fada80391541655eb49.tar.bz2 llvm-0144280cfb86be5feacd5fada80391541655eb49.tar.xz |
Unbreak win64 compilation callback.
Since we're generating stubs by hands we don't follow the ABI and don't
create a register spill area.
Don't use this area in compilation callback!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77968 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86CompilationCallback_Win64.asm')
-rw-r--r-- | lib/Target/X86/X86CompilationCallback_Win64.asm | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/lib/Target/X86/X86CompilationCallback_Win64.asm b/lib/Target/X86/X86CompilationCallback_Win64.asm index a11c5c3ce4..f321778db2 100644 --- a/lib/Target/X86/X86CompilationCallback_Win64.asm +++ b/lib/Target/X86/X86CompilationCallback_Win64.asm @@ -15,17 +15,18 @@ extrn X86CompilationCallback2: PROC .code X86CompilationCallback proc - ; Save all int arg registers into register spill area. - mov [rsp+ 8], rcx - mov [rsp+16], rdx - mov [rsp+24], r8 - mov [rsp+32], r9 - push rbp ; Save RSP. mov rbp, rsp + ; Save all int arg registers + ; WARNING: We cannot use register spill area - we're generating stubs by hands! + push rcx + push rdx + push r8 + push r9 + ; Align stack on 16-byte boundary. and rsp, -16 @@ -52,15 +53,15 @@ X86CompilationCallback proc ; Restore RSP. mov rsp, rbp + ; Restore all int arg registers + sub rsp, 32 + pop r9 + pop r8 + pop rdx + pop rcx + ; Restore RBP. pop rbp - - ; Restore all int arg registers. - mov r9, [rsp+32] - mov r8, [rsp+24] - mov rdx, [rsp+16] - mov rcx, [rsp+ 8] - ret X86CompilationCallback endp |