This is the mail archive of the gcc-patches@gcc.gnu.org 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/11/14 03:32, Joern Rennecke wrote:
On 10 October 2014 21:13, Jeff Law <law@redhat.com> wrote:
...
ISTM it would be better to find the mode of the same class that corresponds
to GET_MODE_SIZE (mode) / nregs.  In your case that's obviously QImode :-)

Like this?
Or did you mean to remove the save_mode[regno] use altogether?  I can
think of arguments for or against, but got no
concrete examples for either.
Yea, that's basically what I was thinking. I probably wouldn't have bothered with the if (hard_regno ...) check, but I can see why you might want that added measure of safety before slamming in a new mode.

I think you want "smode" in the mode_for_size call rather than "mode", right (both instances)?

If that fixes your your problem and passes the usual bootstrap and regression test, then it's OK with me.

I can see Richard S. getting in here one day and saying, umm, this all needs further refinement, but at least this hunk of code is in better shape.

jeff



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