On Sun, Feb 17, 2013 at 4:00 AM, bivab <[email protected]> wrote:
> Author: David Schneider <[email protected]>
> Branch: jitframe-on-heap
> Changeset: r61341:017892f48c74
> Date: 2013-02-17 02:59 +0100
> http://bitbucket.org/pypy/pypy/changeset/017892f48c74/
>
> Log:    fix for call_assembler with floats. The offset calculation for the
>         arguments to call_assembler in rewrite.py assumes a double-word
>         aligned JITFRAME
>
> diff --git a/rpython/jit/backend/arm/arch.py b/rpython/jit/backend/arm/arch.py
> --- a/rpython/jit/backend/arm/arch.py
> +++ b/rpython/jit/backend/arm/arch.py
> @@ -17,4 +17,4 @@
>  # A jitframe is a jit.backend.llsupport.llmodel.jitframe.JITFRAME
>  # Stack frame fixed area
>  # Currently only the force_index
> -JITFRAME_FIXED_SIZE = 11 + 16 * 2 # 11 GPR + 16 VFP Regs (64bit)
> +JITFRAME_FIXED_SIZE = 12 + 16 * 2 # 11 GPR + one word to keep alignment + 16 
> VFP Regs (64bit)
> diff --git a/rpython/jit/backend/llsupport/rewrite.py 
> b/rpython/jit/backend/llsupport/rewrite.py
> --- a/rpython/jit/backend/llsupport/rewrite.py
> +++ b/rpython/jit/backend/llsupport/rewrite.py
> @@ -179,6 +179,9 @@
>          for i, arg in enumerate(arglist):
>              descr = self.cpu.getarraydescr_for_frame(arg.type)
>              _, itemsize, _ = self.cpu.unpack_arraydescr_size(descr)
> +            # XXX
> +            # this calculation breaks for floats on 32 bit if
> +            # base_ofs of JITFRAME + index * 8 is not double-word aligned
>              index = index_list[i] // itemsize # index is in bytes
>              self.newops.append(ResOperation(rop.SETARRAYITEM_GC,
>                                              [frame, ConstInt(index),
> _______________________________________________
> pypy-commit mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/pypy-commit

This fix is incorrect, I'll do the correct one later today (on GC you
have extra word for GC header, so you have to account for that)
_______________________________________________
pypy-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to