Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r45147:58a43ab8a5b4
Date: 2011-06-27 19:47 +0200
http://bitbucket.org/pypy/pypy/changeset/58a43ab8a5b4/

Log:    Fix the test.

diff --git a/pypy/jit/backend/x86/regloc.py b/pypy/jit/backend/x86/regloc.py
--- a/pypy/jit/backend/x86/regloc.py
+++ b/pypy/jit/backend/x86/regloc.py
@@ -318,7 +318,9 @@
             # must be careful not to combine it with location types that
             # might need to use the scratch register themselves.
             if loc2 is X86_64_SCRATCH_REG:
-                assert code1 != 'j'
+                if code1 == 'j':
+                    assert (name.startswith("MOV") and
+                            rx86.fits_in_32bits(loc1.value_j()))
             if loc1 is X86_64_SCRATCH_REG and not name.startswith("MOV"):
                 assert code2 not in ('j', 'i')
 
diff --git a/pypy/jit/backend/x86/test/test_runner.py 
b/pypy/jit/backend/x86/test/test_runner.py
--- a/pypy/jit/backend/x86/test/test_runner.py
+++ b/pypy/jit/backend/x86/test/test_runner.py
@@ -248,7 +248,7 @@
         TP = lltype.GcStruct('S', ('i', lltype.Signed))
         ofsi = self.cpu.fielddescrof(TP, 'i')
         for i in range(500):
-            p = lltype.malloc(S)
+            p = lltype.malloc(TP)
             addr = rffi.cast(lltype.Signed, p)
             if fits_in_32bits(addr):
                 break    # fitting in 32 bits, good
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to