[pypy-commit] pypy ppc-jit-backend: Revert test_load_and_store to using load_word

edelsohn noreply at buildbot.pypy.org
Mon Aug 22 17:42:06 CEST 2011


Author: edelsohn
Branch: ppc-jit-backend
Changeset: r46704:582eba1bbfe6
Date: 2011-08-22 11:29 -0400
http://bitbucket.org/pypy/pypy/changeset/582eba1bbfe6/

Log:	Revert test_load_and_store to using load_word test_load_from must
	use rffi.LONG Remove test_ld as redundant

diff --git a/pypy/jit/backend/ppc/ppcgen/test/test_ppc.py b/pypy/jit/backend/ppc/ppcgen/test/test_ppc.py
--- a/pypy/jit/backend/ppc/ppcgen/test/test_ppc.py
+++ b/pypy/jit/backend/ppc/ppcgen/test/test_ppc.py
@@ -270,12 +270,8 @@
         a.load_word(10, word1)
         a.load_word(11, word2)
 
-        if IS_PPC_64:
-            a.load_dword(8, rffi.cast(lltype.Signed, p))
-            a.load_dword(9, rffi.cast(lltype.Signed, p) + WORD)
-        else:
-            a.load_word(8, rffi.cast(lltype.Signed, p))
-            a.load_word(9, rffi.cast(lltype.Signed, p) + WORD)
+        a.load_word(8, rffi.cast(lltype.Signed, p))
+        a.load_word(9, rffi.cast(lltype.Signed, p) + WORD)
 
         a.stw(10, 8, 0)
         a.stw(11, 9, 0)
@@ -290,35 +286,18 @@
     def test_load_from(self):
         a = PPCBuilder()
         
-        p = lltype.malloc(rffi.CArray(rffi.INT), 1, flavor="raw")
+        p = lltype.malloc(rffi.CArray(rffi.LONG), 1, flavor="raw")
         addr = rffi.cast(lltype.Signed, p)
-        p[0] = rffi.cast(rffi.INT, 200)
+        p[0] = rffi.cast(rffi.LONG, 200)
 
         a.load_from(3, addr)
         a.blr()
         f = a.assemble()
         assert f() == 200
-        p[0] = rffi.cast(rffi.INT, 300)
+        p[0] = rffi.cast(rffi.LONG, 300)
         assert f() == 300
         lltype.free(p, flavor="raw")
 
-    def test_ld(self):
-        if not is_64_bit_arch():
-            py.test.skip("works on 64 bit")
-        a = PPCBuilder()
-
-        p = lltype.malloc(rffi.CArray(rffi.LONG), 1, flavor="raw")
-        addr = rffi.cast(lltype.Signed, p)
-        p[0] = rffi.cast(rffi.LONG, 200)
-
-        a.load_dword(3, addr)
-        a.ld(3, 3, 0)
-        a.blr()
-
-        f = a.assemble()
-        assert f() == 200
-        lltype.free(p, flavor="raw")
-
 
 class AsmCode(object):
     def __init__(self, size):


More information about the pypy-commit mailing list