This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: apply_result_size vs FUNCTION_VALUE_REGNO_P

> You mean this?
> /* For each hard register, the widest mode object that it can contain.
>    This will be a MODE_INT mode if the register can hold integers.  Otherwise
>    it will be a MODE_FLOAT or a MODE_CC mode, whichever is valid for the
>    register.  */
> But take a look at the head comment for init_reg_modes_once:
> /* Compute the table of register modes.
>    These values are used to record death information for individual registers
>    (as opposed to a multi-register mode).  */
> So clearly reg_raw_mode describes the widest mode of a *single* hard register.  
> Now, before your change, apply_result_size computed the widest mode of 
> *multi* hard registers, that's not the same thing.

Actually I meant this one:

/* If we couldn't find a valid mode, just use the previous mode.
         ??? One situation in which we need to do this is on the mips
         HARD_REGNO_NREGS (fpreg, [SD]Fmode) returns 2.  Ideally we'd
         to use DF mode for the even registers and VOIDmode for the odd
         (for the cpu models where the odd ones are inaccessible).  */
      if (reg_raw_mode[i] == VOIDmode)
        reg_raw_mode[i] = i == 0 ? word_mode : reg_raw_mode[i-1];

I see that's not the problem. AFAICT from the code that deals with
builtin_apply and builtin_return it looks like untyped_call and
untyped_return should be doing what you expect for the code to save the
values (a quick glance at didn't show any problems, but...). Or
is something else clobbering later?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]