[pypy-commit] pypy ppc-backend-2: Use FLOAT_INT_CONVERSION word in stack for emit_cast_float_to_int and
edelsohn
noreply at buildbot.pypy.org
Fri Jun 1 15:31:01 CEST 2012
Author: edelsohn
Branch: ppc-backend-2
Changeset: r55257:a48e4bba5300
Date: 2012-06-01 09:30 -0400
http://bitbucket.org/pypy/pypy/changeset/a48e4bba5300/
Log: Use FLOAT_INT_CONVERSION word in stack for emit_cast_float_to_int
and emit_cast_int_to_float. Fix typo in names.
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
@@ -211,14 +211,16 @@
emit_float_eq = gen_emit_cmp_op(c.EQ, fp=True)
emit_float_ne = gen_emit_cmp_op(c.NE, fp=True)
- def emit_op_cast_float_to_int(self, op, arglocs, regalloc):
+ def emit_cast_float_to_int(self, op, arglocs, regalloc):
l0, temp_loc, res = arglocs
self.mc.fctidz(temp_loc.value, l0.value)
- self.mc.mftgpr(res.value, temp_loc.value)
+ self.mc.stfd(temp_loc.value, r.SPP.value, FORCE_INDEX_OFS + WORD)
+ self.mc.ld(res.value, r.SPP.value, FORCE_INDEX_OFS + WORD)
- def emit_op_cast_int_to_float(self, op, arglocs, regalloc):
+ def emit_cast_int_to_float(self, op, arglocs, regalloc):
l0, temp_loc, res = arglocs
- self.mc.mffgpr(temp_loc.value, l0.value)
+ self.mc.std(l0.value, r.SPP.value, FORCE_INDEX_OFS + WORD)
+ self.mc.lfd(temp_loc.value, r.SPP.value, FORCE_INDEX_OFS + WORD)
self.mc.fcfid(res.value, temp_loc.value)
class GuardOpAssembler(object):
More information about the pypy-commit
mailing list