[pypy-commit] pypy ppc-jit-backend: For getinteriorfield and setinteriorfield, if immediate offset is too
edelsohn
noreply at buildbot.pypy.org
Fri Aug 24 20:56:38 CEST 2012
Author: edelsohn
Branch: ppc-jit-backend
Changeset: r56844:a4efe6ca0483
Date: 2012-08-24 14:56 -0400
http://bitbucket.org/pypy/pypy/changeset/a4efe6ca0483/
Log: For getinteriorfield and setinteriorfield, if immediate offset is
too large for instruction, load it into reg.
diff --git a/pypy/jit/backend/ppc/regalloc.py b/pypy/jit/backend/ppc/regalloc.py
--- a/pypy/jit/backend/ppc/regalloc.py
+++ b/pypy/jit/backend/ppc/regalloc.py
@@ -751,7 +751,8 @@
if _check_imm_arg(ofs):
ofs_loc = imm(ofs)
else:
- ofs_loc = self._ensure_value_is_boxed(ConstInt(ofs), args)
+ ofs_loc = self.get_scratch_reg(INT, args)
+ self.assembler.load(ofs_loc, imm(ofs))
self.possibly_free_vars_for_op(op)
self.free_temp_vars()
result_loc = self.force_allocate_reg(op.result)
@@ -770,7 +771,8 @@
if _check_imm_arg(ofs):
ofs_loc = imm(ofs)
else:
- ofs_loc = self._ensure_value_is_boxed(ConstInt(ofs), args)
+ ofs_loc = self.get_scratch_reg(INT, args)
+ self.assembler.load(ofs_loc, imm(ofs))
return [base_loc, index_loc, value_loc, ofs_loc, imm(ofs),
imm(itemsize), imm(fieldsize)]
prepare_setinteriorfield_raw = prepare_setinteriorfield_gc
More information about the pypy-commit
mailing list