[pypy-svn] pypy arm-backed-float: add type based indirection to convert_to_imm
bivab
commits-noreply at bitbucket.org
Mon Apr 4 13:31:59 CEST 2011
Author: David Schneider <david.schneider at picle.org>
Branch: arm-backed-float
Changeset: r43140:bccfb0d3680f
Date: 2011-04-04 10:03 +0200
http://bitbucket.org/pypy/pypy/changeset/bccfb0d3680f/
Log: add type based indirection to convert_to_imm
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
@@ -198,6 +198,12 @@
return self.rm.make_sure_var_in_reg(var, forbidden_vars,
selected_reg, need_lower_byte)
+ def convert_to_imm(self, value):
+ if isinstance(value, ConstInt):
+ return self.rm.convert_to_imm(value)
+ else:
+ assert isinstance(value, ConstFloat)
+ return self.vfprm.convert_to_imm(value)
def update_bindings(self, locs, frame_depth, inputargs):
used = {}
More information about the Pypy-commit
mailing list