> > 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 before:
operands = force_const_mem (mode, operands);
and after. But the test is on the address of the MEM, not on the MEM itself:
&& GET_CODE (XEXP (operands, 0)) == SYMBOL_REF
&& use_toc_relative_ref (XEXP (operands, 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).