Author: hager <sven.ha...@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)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to