Armin Rigo committed 58a43ab

Fix the test.

Comments (0)

Files changed (2)


             # 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')


         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