[pypy-commit] pypy ppc-jit-backend: use architecture independent cmp_op instead of cmpwi/cmpdi
hager
noreply at buildbot.pypy.org
Tue Feb 28 14:08:07 CET 2012
Author: hager <sven.hager at uni-duesseldorf.de>
Branch: ppc-jit-backend
Changeset: r52974:b2a3369d7362
Date: 2012-02-28 14:04 +0100
http://bitbucket.org/pypy/pypy/changeset/b2a3369d7362/
Log: use architecture independent cmp_op instead of cmpwi/cmpdi
diff --git a/pypy/jit/backend/ppc/opassembler.py b/pypy/jit/backend/ppc/opassembler.py
--- a/pypy/jit/backend/ppc/opassembler.py
+++ b/pypy/jit/backend/ppc/opassembler.py
@@ -910,14 +910,13 @@
if bitpos > 0:
self.mc.rlwinm(r.SCRATCH.value, r.SCRATCH.value,
32 - bitpos, 31, 31)
- # test whether this bit is set
- self.mc.cmpwi(0, r.SCRATCH.value, 1)
else:
if bitpos > 0:
self.mc.rldicl(r.SCRATCH.value, r.SCRATCH.value,
64 - bitpos, 63)
- # test whether this bit is set
- self.mc.cmpdi(0, r.SCRATCH.value, 1)
+
+ # test whether this bit is set
+ self.mc.cmp_op(0, r.SCRATCH.value, 1, imm=True)
jz_location = self.mc.currpos()
self.mc.nop()
More information about the pypy-commit
mailing list