Author: David Schneider <[email protected]>
Branch: arm-backend-2
Changeset: r54201:9f746b2b318e
Date: 2012-03-28 11:22 +0000
http://bitbucket.org/pypy/pypy/changeset/9f746b2b318e/

Log:    add llong_to_int implementation

diff --git a/pypy/jit/backend/arm/opassembler.py 
b/pypy/jit/backend/arm/opassembler.py
--- a/pypy/jit/backend/arm/opassembler.py
+++ b/pypy/jit/backend/arm/opassembler.py
@@ -1290,3 +1290,10 @@
     emit_op_llong_or = gen_emit_float_op('llong_or', 'VORR_i64')
     emit_op_llong_xor = gen_emit_float_op('llong_xor', 'VEOR_i64')
 
+    def emit_op_llong_to_int(self, op, arglocs, regalloc, fcond):
+        loc = arglocs[0]
+        res = arglocs[1]
+        assert loc.is_vfp_reg()
+        assert res.is_reg()
+        self.mc.VMOV_rc(res.value, r.ip.value, loc.value)
+        return fcond
diff --git a/pypy/jit/backend/arm/regalloc.py b/pypy/jit/backend/arm/regalloc.py
--- a/pypy/jit/backend/arm/regalloc.py
+++ b/pypy/jit/backend/arm/regalloc.py
@@ -595,6 +595,12 @@
         res = self.vfprm.force_allocate_reg(op.result)
         return [loc0, loc1, res]
 
+    def _prepare_llong_to_int(self, op, fcond):
+        loc0 = self._ensure_value_is_boxed(op.getarg(1))
+        res = self.force_allocate_reg(op.result)
+        return [loc0, res]
+
+
     def _prepare_guard(self, op, args=None):
         if args is None:
             args = []
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to