[pypy-commit] pypy jitframe-on-heap: fix those tests

fijal noreply at buildbot.pypy.org
Tue Feb 12 12:24:16 CET 2013


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: jitframe-on-heap
Changeset: r61129:b0c9765f3558
Date: 2013-02-12 13:23 +0200
http://bitbucket.org/pypy/pypy/changeset/b0c9765f3558/

Log:	fix those tests

diff --git a/rpython/jit/backend/x86/test/test_gc_integration.py b/rpython/jit/backend/x86/test/test_gc_integration.py
--- a/rpython/jit/backend/x86/test/test_gc_integration.py
+++ b/rpython/jit/backend/x86/test/test_gc_integration.py
@@ -233,7 +233,10 @@
     def test_malloc_slowpath(self):
         def check(frame):
             assert len(frame.jf_gcmap) == 1
-            assert frame.jf_gcmap[0] == (1<<29) | (1 << 30)
+            if IS_X86_64:
+                assert frame.jf_gcmap[0] == (1<<29) | (1 << 30)
+            else:
+                assert frame.jf_gcmap[0] == (1<<24) | (1 << 23)
         
         self.cpu = self.getcpu(check)
         ops = '''
@@ -260,9 +263,14 @@
     def test_save_regs_around_malloc(self):
         def check(frame):
             x = frame.jf_gcmap
-            assert len(x) == 1
-            assert (bin(x[0]).count('1') ==
-                    '0b1111100000000000000001111111011110'.count('1'))
+            if IS_X86_64:
+                assert len(x) == 1
+                assert (bin(x[0]).count('1') ==
+                        '0b1111100000000000000001111111011110'.count('1'))
+            else:
+                assert len(x) == 2
+                s = bin(x[0]).count('1') + bin(x[1]).count('1')
+                assert s == 16
             # all but two registers + some stuff on stack
         
         self.cpu = self.getcpu(check)


More information about the pypy-commit mailing list