On Tue, Apr 17, 2012 at 11:12 AM, Alan Modra <amo...@gmail.com> wrote:
> This fixes a lot of confusion in rs6000_frame_related call arguments.
> At the time rs6000_frame_related first appeared, the prologue only
> used sp_reg_rtx (r1) or frame_ptr_rtx (r12) as frame_reg_rtx to access
> register save slots.  If r12 was used, it was necessary to add a note
> that gave the equivalent offset relative to r1.
>
> Nowadays, r11 is used as frame_reg_rtx too, when abiv4 and saving regs
> out-of-line with a large frame.  When that change was made the calls
> to rs6000_frame_related were not updated.  So rs6000_frame_related
> won't replace r11 in register save rtl.  As it happens this isn't a
> bug because when you look closely, out-of-line saves are disabled with
> a large frame!  A fix for that will come later in this patch series.
> I also optimize rs6000_frame_related a little to save generating
> duplicate rtl.
>
>        * config/rs6000/rs6000.c (rs6000_frame_related): Don't emit a
>        REG_FRAME_RELATED_EXPR note when the instruction exactly matches
>        the replacement.
>        (emit_frame_save): Delete frame_ptr param.  Rename total_size to
>        frame_reg_to_sp.
>        (rs6000_emit_prologue): Add sp_off.  Update rs6000_frame_related
>        and emit_frame_save calls.  Cope with possibly missing note.

Please change 1 to STACK_POINTER_REGNUM.

Okay with that change.

Thanks, David

Reply via email to