Commits

Anonymous committed a4efe6c

For getinteriorfield and setinteriorfield, if immediate offset is too
large for instruction, load it into reg.

  • Participants
  • Parent commits 626689d
  • Branches ppc-jit-backend

Comments (0)

Files changed (1)

pypy/jit/backend/ppc/regalloc.py

         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)
         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