On 24 May 2013 18:02, Richard Henderson <r...@twiddle.net> wrote: > On 05/24/2013 01:53 AM, Claudio Fontana wrote: >> We use FP to point to the callee_saved registers, and to move to/from them >> in the tcg_out_store_pair and tcg_out_load_pair functions. > > I hadn't noticed you'd hard-coded FP into the load/store_pair functions. > Let's *really* not do that. Even if we decide to continue using it, let's > pass it in explicitly. > > But I don't see that you're really gaining anything in the prologue from > using FP instead of SP. It seems like a waste of a register to me.
Where's the waste? The procedure calling standard mandates that we set FP up, so it's not like we can use it as a general purpose register anywhere. I agree that we shouldn't hardcode tcg_out_store_pair to use FP as a base, but there's no particular reason not to use it at this point in the prologue since it happens to be convenient. thanks -- PMM