[pypy-svn] r74906 - pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test

arigo at codespeak.net arigo at codespeak.net
Sun May 30 12:43:58 CEST 2010


Author: arigo
Date: Sun May 30 12:43:57 2010
New Revision: 74906

Modified:
   pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_assembler.py
   pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_regalloc.py
Log:
Fix tests.


Modified: pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_assembler.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_assembler.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_assembler.py	Sun May 30 12:43:57 2010
@@ -215,6 +215,13 @@
         # bits of the float were correctly saved and restored.
         assert assembler.fail_boxes_float.getitem(i) == expected_floats[i]
 
+    # verify that until clear_latest_values() is called, reading the
+    # same values multiple times work
+    for i in range(len(content)):
+        assert assembler.fail_boxes_int.getitem(i) == expected_ints[i]
+        assert assembler.fail_boxes_ptr.getitem(i) == expected_ptrs[i]
+        assert assembler.fail_boxes_float.getitem(i) == expected_floats[i]
+
 class FakeProfileAgent(object):
     def __init__(self):
         self.functions = []

Modified: pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_regalloc.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_regalloc.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_regalloc.py	Sun May 30 12:43:57 2010
@@ -211,10 +211,9 @@
         '''
         S = lltype.GcStruct('S')
         ptr = lltype.malloc(S)
+        self.cpu.clear_latest_values(2)
         self.interpret(ops, [0, ptr])
         assert self.getptr(0, lltype.Ptr(S)) == ptr
-        assert not self.cpu.assembler.fail_boxes_ptr.getitem(0)
-        assert not self.cpu.assembler.fail_boxes_ptr.getitem(1)
 
     def test_exception_bridge_no_exception(self):
         ops = '''
@@ -526,16 +525,16 @@
         # makes sense any more.
         ops = '''
         [f0, f1, f2, f3, f4, f5, f6, f7, f8, f9]
-        i0 = float_ne(f0, ConstFloat(0.0))
-        i1 = float_ne(f1, ConstFloat(0.0))
-        i2 = float_ne(f2, ConstFloat(0.0))
-        i3 = float_ne(f3, ConstFloat(0.0))
-        i4 = float_ne(f4, ConstFloat(0.0))
-        i5 = float_ne(f5, ConstFloat(0.0))
-        i6 = float_ne(f6, ConstFloat(0.0))
-        i7 = float_ne(f7, ConstFloat(0.0))
-        i8 = float_ne(f8, ConstFloat(0.0))
-        i9 = float_ne(f9, ConstFloat(0.0))
+        i0 = float_ne(f0, 0.0)
+        i1 = float_ne(f1, 0.0)
+        i2 = float_ne(f2, 0.0)
+        i3 = float_ne(f3, 0.0)
+        i4 = float_ne(f4, 0.0)
+        i5 = float_ne(f5, 0.0)
+        i6 = float_ne(f6, 0.0)
+        i7 = float_ne(f7, 0.0)
+        i8 = float_ne(f8, 0.0)
+        i9 = float_ne(f9, 0.0)
         finish(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9)
         '''
         loop = self.interpret(ops, [0.0, .1, .2, .3, .4, .5, .6, .7, .8, .9])



More information about the Pypy-commit mailing list