[PATCH], rs6000, PR 64505 -- Fix issue with -m32 -mpowerpc64
Michael Meissner
meissner@linux.vnet.ibm.com
Tue Jan 6 19:12:00 GMT 2015
On Mon, Jan 05, 2015 at 09:31:52PM -0600, Segher Boessenkool wrote:
> On Mon, Jan 05, 2015 at 07:50:33PM -0500, Michael Meissner wrote:
> > This patch fixes PR 64505, which is an issue that one of the users of the
> > Advance Toolchain found where -m32 -mpowerpc64 generated an insn not found
> > message in some cases. I traced this down to rs6000_secondary_reload
> > generating a reload helper that uses a DImode scratch register, when in this
> > case, it should use a SImode scratch register.
>
> That looks correct.
>
> > I think the patch is safe, but -m32 -mpowerpc64 is not legitimate for the Linux
> > environment.
Yep, but even so, the compiler should not throw an insn not found error.
> The high halves of the registers are clobbered by some signal things.
> It works without problems otherwise; you can run the testsuite just fine
> with -m32 -mpowerpc64.
>
> > + /* -m32 -mpowerpc64 needs to use a 32-bit scratch register. */
> > if (in_p)
> > - sri->icode = CODE_FOR_reload_di_load;
> > + sri->icode = ((TARGET_32BIT) ? CODE_FOR_reload_si_load
> > + : CODE_FOR_reload_di_load);
> > else
> > - sri->icode = CODE_FOR_reload_di_store;
> > + sri->icode = ((TARGET_32BIT) ? CODE_FOR_reload_si_store
> > + : CODE_FOR_reload_di_store);
>
> You really like parentheses do you? :-) You could drop them all...
The outer parenthesis is so that auto indent under emacs properly aligns the
code. The parenthesis around the test for ?: is more of a style issue.
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797
More information about the Gcc-patches
mailing list