[pypy-commit] pypy ppc-jit-backend: add convenience function for conditional absolute branches
hager
noreply at buildbot.pypy.org
Tue Dec 20 15:38:04 CET 2011
Author: hager <sven.hager at uni-duesseldorf.de>
Branch: ppc-jit-backend
Changeset: r50754:981b61e0d09a
Date: 2011-12-20 15:31 +0100
http://bitbucket.org/pypy/pypy/changeset/981b61e0d09a/
Log: add convenience function for conditional absolute branches
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
@@ -1007,6 +1007,13 @@
target_ofs = offset - pos
self.bc(condition, 2, target_ofs)
+ def b_cond_abs(self, addr, condition):
+ assert condition in (c.EQ, c.NE)
+ self.alloc_scratch_reg(addr)
+ self.mtctr(r.SCRATCH.value)
+ self.free_scratch_reg()
+ self.bcctr(condition, 2)
+
def b_abs(self, address, trap=False):
self.alloc_scratch_reg(address)
self.mtctr(r.r0.value)
More information about the pypy-commit
mailing list