1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

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!

llvm-svn: 77968
This commit is contained in:
Anton Korobeynikov 2009-08-03 08:43:36 +00:00
parent ff81990e49
commit 7c400c9da8

View File

@ -15,17 +15,18 @@ extrn X86CompilationCallback2: PROC
.code .code
X86CompilationCallback proc 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 push rbp
; Save RSP. ; Save RSP.
mov rbp, 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. ; Align stack on 16-byte boundary.
and rsp, -16 and rsp, -16
@ -52,15 +53,15 @@ X86CompilationCallback proc
; Restore RSP. ; Restore RSP.
mov rsp, rbp mov rsp, rbp
; Restore all int arg registers
sub rsp, 32
pop r9
pop r8
pop rdx
pop rcx
; Restore RBP. ; Restore RBP.
pop 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 ret
X86CompilationCallback endp X86CompilationCallback endp