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: [PATCH], rs6000, PR 64505 -- Fix issue with -m32 -mpowerpc64


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


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