[rs6000] Fix reload failures in 64-bit mode with no special constant pool

Segher Boessenkool segher@kernel.crashing.org
Tue Oct 18 11:47:00 GMT 2016


On Tue, Oct 18, 2016 at 01:09:24PM +0200, Eric Botcazou wrote:
> > > No, "mode" is the mode of the MEM, not that of the SYMBOL_REF.
> > 
> > I still don't see it, could you explain a bit more?
> 
> MODE is the mode of operands[1] before:
> 
> 	  operands[1] = force_const_mem (mode, operands[1]);
> 
> and after.  But the test is on the address of the MEM, not on the MEM itself:
> 
>  	  if (TARGET_TOC
>  	      && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF
> 	      && use_toc_relative_ref (XEXP (operands[1], 0), Pmode))
> 
> because it's the mode of SYMBOL_REF we are interesting in (and force_const_mem 
> guarantees that it's Pmode).

We need to pass the mode of the actual datum we would put in the TOC to
the use_toc_relative_ref function, not the mode of its address.

I must be missing something...


Segher



More information about the Gcc-patches mailing list