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: RFA: fix mode confusion in caller-save.c:replace_reg_with_saved_mem

On 10/13/14 18:16, Joern Rennecke wrote:
On 13 October 2014 20:43, Jeff Law <> wrote: ...
I think you want "smode" in the mode_for_size call rather than
"mode", right (both instances)?

No, nregs is the number of hard registers of regno in "mode".  Hence
we must use the size of "mode".
OK.  My bad.

To get some case where there's a difference, I was thinking of an
architecture that has partial integer mode registers that can be
grouped together as integral integer mode registers (e.g. one reg is
HImode or PSImode, save_mode would be PSImode, two regs form SImode).
In that case, you'd want something so that you can piece together
"mode", i.e. either GET_MODE_CLASS (mode) or MODE_INT (which happen
to be again the same), but not GET_MODE_CLASS(smode), which would be
You're right.  We definitely don't want MODE_PARTIAL_INT here.

So if your patch resolves your issue, passes the usual bootstrap/regression test, then let's go with it.


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