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: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 17 Jan 2017 06:25:42 -0600
- 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> <4833987.MWR9OqUvYI@polaris>
Hi Eric,
On Mon, Nov 07, 2016 at 10:44:44AM +0100, Eric Botcazou wrote:
> Tested on PowerPC64/Linux, OK for the mainline?
>
>
> * config/rs6000/rs6000.c (rs6000_emit_move): Also use a TOC reference
> after forcing to constant memory when the code model is medium.
Sorry I lost track of this patch again.
After a lot of staring it does seem okay. Approved for trunk. Please
watch out for fallout though.
Thanks,
Segher
> --- config/rs6000/rs6000.c (revision 241856)
> +++ config/rs6000/rs6000.c (working copy)
> @@ -10673,10 +10673,7 @@ rs6000_emit_move (rtx dest, rtx source,
>
> if (TARGET_TOC
> && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF
> - && constant_pool_expr_p (XEXP (operands[1], 0))
> - && ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (
> - get_pool_constant (XEXP (operands[1], 0)),
> - get_pool_mode (XEXP (operands[1], 0))))
> + && use_toc_relative_ref (XEXP (operands[1], 0), mode))
> {
> rtx tocref = create_TOC_reference (XEXP (operands[1], 0),
> operands[0]);