[pypy-commit] pypy ppc-jit-backend: Ensure exlusive usage of r0 in b_abs
hager
noreply at buildbot.pypy.org
Wed Nov 30 18:04:12 CET 2011
Author: hager <sven.hager at uni-duesseldorf.de>
Branch: ppc-jit-backend
Changeset: r50020:68ed886b303c
Date: 2011-11-30 17:53 +0100
http://bitbucket.org/pypy/pypy/changeset/68ed886b303c/
Log: Ensure exlusive usage of r0 in b_abs
diff --git a/pypy/jit/backend/ppc/ppcgen/codebuilder.py b/pypy/jit/backend/ppc/ppcgen/codebuilder.py
--- a/pypy/jit/backend/ppc/ppcgen/codebuilder.py
+++ b/pypy/jit/backend/ppc/ppcgen/codebuilder.py
@@ -990,9 +990,12 @@
target_ofs = offset - pos
self.bc(condition, 2, target_ofs)
- def b_abs(self, address):
- self.load_imm(r.r0, address)
- self.mtctr(0)
+ def b_abs(self, address, trap=False):
+ self.alloc_scratch_reg(address)
+ self.mtctr(r.r0.value)
+ self.free_scratch_reg()
+ if trap:
+ self.trap()
self.bctr()
def bl_abs(self, address):
More information about the pypy-commit
mailing list