[pypy-commit] pypy arm-backend-2: (arigo, bivab): test the presence of INSTANCE_PTR_NE and INSTANCE_PTR_EQ in the backend

bivab noreply at buildbot.pypy.org
Mon Dec 5 10:05:44 CET 2011


Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r50164:b485870748d3
Date: 2011-12-02 12:24 +0100
http://bitbucket.org/pypy/pypy/changeset/b485870748d3/

Log:	(arigo, bivab): test the presence of INSTANCE_PTR_NE and
	INSTANCE_PTR_EQ in the backend

diff --git a/pypy/jit/backend/test/runner_test.py b/pypy/jit/backend/test/runner_test.py
--- a/pypy/jit/backend/test/runner_test.py
+++ b/pypy/jit/backend/test/runner_test.py
@@ -761,6 +761,13 @@
         r = self.execute_operation(rop.PTR_NE, [null_box, u1_box], 'int')
         assert r.value == 1
 
+        # These operations are supposed to be the same as PTR_EQ/PTR_NE
+        # just checking that the operations are defined in the backend.
+        r = self.execute_operation(rop.INSTANCE_PTR_EQ, [u1_box, u2_box], 'int')
+        assert r.value == 0
+        r = self.execute_operation(rop.INSTANCE_PTR_NE, [u2_box, u1_box], 'int')
+        assert r.value == 1
+
     def test_array_basic(self):
         a_box, A = self.alloc_array_of(rffi.SHORT, 342)
         arraydescr = self.cpu.arraydescrof(A)


More information about the pypy-commit mailing list