On Sun, May 20, 2012 at 10:48 PM, Alan Modra <amo...@gmail.com> wrote:
> On Tue, May 08, 2012 at 08:02:39PM +0930, Alan Modra wrote:
>> I also make use of gen_frame_store and siblings that I invented for
>> generating the eh info, elsewhere in rs6000.c where doing so is
>> blindingly obvious.  We could probably use them in other places too,
>> but I'll leave that for later.
>
> Like so.  The part that isn't completely obvious is removing calls to
> emit_move_insn, which can transform the rtl (rs6000_emit_move).
> However, we're past reload, the insns emitted are always one set
> involving a hard reg and mem, and we don't want any addressing mode
> subsititions going on that avoid rs6000_emit_prologue tracking of r0,
> r11 and r12 usage.
>
> This patch also fixes a couple of places that call df_regs_ever_live_p
> without checking call_used_regs to test for global asm regs.  Not
> serious bugs as they just result in larger stack frames.
>
> Bootstrapped and regression tested powerpc-linux.  OK to apply?
>
>        * config/rs6000/rs6000.c (save_reg_p): New function.
>        (first_reg_to_save, first_fp_reg_to_save): Use it here.
>        (first_altivec_reg_to_save, restore_saved_cr): Likewise.
>        (emit_frame_save): Use gen_frame_store.
>        (gen_frame_mem_offset): Correct SPE condition requiring reg+reg.
>        (rs6000_emit_prologue): Use save_reg_p.  Use gen_frame_store for
>        vrsave and toc.
>        (rs6000_emit_epilogue): Use save_reg_p.  Use gen_frame_load for
>        vrsave, toc, gp and fp restores.

Okay.

Thanks, David

Reply via email to