[PATCH][updated] Force SDmode function args into FP registers per the ABI

Peter Bergner bergner@vnet.ibm.com
Tue Jun 19 13:49:00 GMT 2007


On Tue, 2007-06-19 at 09:04 +0200, Paolo Bonzini wrote:
> This can be simplified to be just
> 
> enum machine_mode mode = PSEUDO_REGNO_MODE (i);
> unsigned int inherent_size = targetm.min_stack_slot_size_for_mode (mode);
> unsigned int total_size = MAX (inherent_size, reg_max_ref_width[i]);
[snip]
> Sorry for the further nitpicking...  I can take care of this, but I 
> wouldn't mind preapproval since this was what Mark mentioned here:
> 
> > The
> > default would be PSEUDO_REGNO_BYTES (REGNO (reg)).  Then, in alter reg,
> > use the max of reg_max_ref_width and the value of the hook?

I debated about setting inherent_size with the target hook like you
did above, but decided against it given all of the other uses of
inherent_size in alter_reg and the fact that by changing its value
like this (ie, inherent_size will be less than total_size), we will
cause it to go down different paths in this routine and pass different
function args to assign_stack_local.  Maybe it would be ok, but errored
on the side of caution.



> because of these definitions
> 
> /* this is exactly how mode is computed above */
> #define PSEUDO_REGNO_MODE(N) GET_MODE (regno_reg_rtx[N])

I noticed there are quite a few uses of "GET_MODE (regno_reg_rtx[N])"
in reload1.c, but thought they could all be cleaned up together in
a separate patch.  I can do that or if you're going to be cleaning
things up, I can leave it to you.  Just let me know what you want
to do.


Peter





More information about the Gcc-patches mailing list