Such fixes should come with tests in test_runner

On Fri, Aug 24, 2012 at 8:56 PM, edelsohn <[email protected]> wrote:
> 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
> _______________________________________________
> pypy-commit mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/pypy-commit
_______________________________________________
pypy-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to