This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH], rs6000, PR 64505 -- Fix issue with -m32 -mpowerpc64
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, gcc-patches at gcc dot gnu dot org, dje dot gcc at gmail dot com, howarth at bromo dot med dot uc dot edu, mikestump at comcast dot net, fxcoudert at gcc dot gnu dot org, aph at redhat dot com, rohitarulraj at freescale dot com, iain at codesourcery dot com
- Date: Mon, 5 Jan 2015 21:31:52 -0600
- Subject: Re: [PATCH], rs6000, PR 64505 -- Fix issue with -m32 -mpowerpc64
- Authentication-results: sourceware.org; auth=none
- References: <20150106005033 dot GA1373 at ibm-tiger dot the-meissners dot org>
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.
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...
Segher