Author: Armin Rigo <[email protected]>
Branch: jit-simplify-backendintf
Changeset: r50424:7e98ea1a1c5e
Date: 2011-12-12 12:20 +0100
http://bitbucket.org/pypy/pypy/changeset/7e98ea1a1c5e/
Log: Fix. This is also a bug on trunk, actually, but because the stack
checking is only done after CALL_ASSEMBLER, then %ebp has still a
not-too-incorrect value...
diff --git a/pypy/jit/backend/x86/assembler.py
b/pypy/jit/backend/x86/assembler.py
--- a/pypy/jit/backend/x86/assembler.py
+++ b/pypy/jit/backend/x86/assembler.py
@@ -309,12 +309,11 @@
mc.MOVSD_sx(8*i, i) # xmm0 to xmm7
#
if IS_X86_32:
- mc.LEA_rb(eax.value, +8)
stack_size += 2*WORD
mc.PUSH_r(eax.value) # alignment
- mc.PUSH_r(eax.value)
+ mc.PUSH_r(esp.value)
elif IS_X86_64:
- mc.LEA_rb(edi.value, +16)
+ mc.MOV_rr(edi.value, esp.value)
#
# esp is now aligned to a multiple of 16 again
mc.CALL(imm(slowpathaddr))
@@ -325,7 +324,7 @@
jnz_location = mc.get_relative_pos()
#
if IS_X86_32:
- mc.ADD_ri(esp.value, 2*WORD)
+ mc.ADD_ri(esp.value, 2*WORD) # cancel the two PUSHes above
elif IS_X86_64:
# restore the registers
for i in range(7, -1, -1):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit