This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [rs6000] Fix reload failures in 64-bit mode with no special constant pool
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 18 Oct 2016 13:09:24 +0200
- Subject: Re: [rs6000] Fix reload failures in 64-bit mode with no special constant pool
- Authentication-results: sourceware.org; auth=none
- References: <11068946.f4xvach6CP@polaris> <3136000.cIEFSGsaEs@polaris> <20161018105622.GC6677@gate.crashing.org>
> > 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). IOW you could theoretically have mode == SImode
and we would still need to pass Pmode to use_toc_relative_ref (of course the
whole thing is guarded with mode == Pmode so that's a little artificial).
--
Eric Botcazou