[pypy-dev] [pypy-commit] pypy ppc-jit-backend: For getinteriorfield and setinteriorfield, if immediate offset is too

Maciej Fijalkowski fijall at gmail.com
Sat Aug 25 11:04:01 CEST 2012


Such fixes should come with tests in test_runner

On Fri, Aug 24, 2012 at 8:56 PM, edelsohn <noreply at buildbot.pypy.org> 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
> pypy-commit at python.org
> http://mail.python.org/mailman/listinfo/pypy-commit


More information about the pypy-dev mailing list