Author: Armin Rigo <[email protected]>
Branch: remove-globals-in-jit
Changeset: r59351:0f15c980ba05
Date: 2012-12-07 01:11 +0100
http://bitbucket.org/pypy/pypy/changeset/0f15c980ba05/

Log:    Tentative fix. Seems to not occur on Linux64: an often-prebuilt
        descr is always at an address that fits 32 bits.

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
@@ -2409,7 +2409,11 @@
         value = fail_descr.hide(self.cpu)
         rgc._make_sure_does_not_move(value)
         value = rffi.cast(lltype.Signed, value)
-        self.mc.CMP_mi((eax.value, _offset), value)
+        if rx86.fits_in_32bits(value):
+            self.mc.CMP_mi((eax.value, _offset), value)
+        else:
+            self.mc.MOV_ri(X86_64_SCRATCH_REG.value, value)
+            self.mc.CMP_mr((eax.value, _offset), X86_64_SCRATCH_REG.value)
         # patched later
         self.mc.J_il8(rx86.Conditions['E'], 0) # goto B if we get 
'done_with_this_frame'
         je_location = self.mc.get_relative_pos()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to