[pypy-commit] pypy ppc-jit-backend: add_loop_instructions and list of allowed backend names for PPC32

hager noreply at buildbot.pypy.org
Mon Mar 5 17:41:10 CET 2012


Author: hager <sven.hager at uni-duesseldorf.de>
Branch: ppc-jit-backend
Changeset: r53235:2fbc77bd3d23
Date: 2012-03-05 17:40 +0100
http://bitbucket.org/pypy/pypy/changeset/2fbc77bd3d23/

Log:	add_loop_instructions and list of allowed backend names for PPC32

diff --git a/pypy/jit/backend/ppc/test/test_runner.py b/pypy/jit/backend/ppc/test/test_runner.py
--- a/pypy/jit/backend/ppc/test/test_runner.py
+++ b/pypy/jit/backend/ppc/test/test_runner.py
@@ -12,6 +12,7 @@
 from pypy.rpython.lltypesystem import lltype, llmemory, rstr, rffi, rclass
 from pypy.jit.codewriter.effectinfo import EffectInfo
 from pypy.jit.metainterp.resoperation import ResOperation, rop
+from pypy.jit.backend.ppc.arch import IS_PPC_32
 import py
 
 class FakeStats(object):
@@ -19,7 +20,10 @@
 
 class TestPPC(LLtypeBackendTest):
 
-    add_loop_instructions = ["mr", "add", "cmpdi", "beq", "b"]
+    if IS_PPC_32:
+        add_loop_instructions = ["mr", "add", "cmpwi", "beq", "b"]
+    else:
+        add_loop_instructions = ["mr", "add", "cmpdi", "beq", "b"]
     bridge_loop_instructions_short = ["lis", "ori", "mtctr", "bctr"]
     bridge_loop_instructions_long = ["lis", "ori", "rldicr", "oris", "ori",
                                      "mtctr", "bctr"]
diff --git a/pypy/jit/backend/ppc/tool/viewcode.py b/pypy/jit/backend/ppc/tool/viewcode.py
--- a/pypy/jit/backend/ppc/tool/viewcode.py
+++ b/pypy/jit/backend/ppc/tool/viewcode.py
@@ -9,7 +9,7 @@
 import subprocess
 
 def machine_code_dump(data, originaddr, backend_name, label_list=None):
-    assert backend_name in ["ppc", "ppc_64"]
+    assert backend_name in ["ppc", "ppc_32", "ppc_64"]
     tmpfile = get_tmp_file()
     objdump  = "objdump -EB -D --target=binary --adjust-vma=%(origin)d "
     objdump += "--architecture=powerpc %(file)s"


More information about the pypy-commit mailing list