On Tue, 2018-01-30 at 14:04 +0100, Jakub Jelinek wrote:
> On IRC when discussing it with Segher this morning we've come to the
> conclusion that it would be best if rs6000 just followed what all
> other
> ports to, i.e. return a pseudo from the target hook, like:
>
> --- gcc/config/rs6000/rs6000.c 2018-01-30 12:30:27.416360076
> +0100
> +++ gcc/config/rs6000/rs6000.c 2018-01-30 13:59:07.360639803
> +0100
> @@ -29602,8 +29602,9 @@ rs6000_internal_arg_pointer (void)
> emit_insn_after (pat, get_insns ());
> pop_topmost_sequence ();
> }
> - return plus_constant (Pmode, cfun->machine-
> >split_stack_arg_pointer,
> - FIRST_PARM_OFFSET
> (current_function_decl));
> + rtx ret = plus_constant (Pmode, cfun->machine-
> >split_stack_arg_pointer,
> + FIRST_PARM_OFFSET
> (current_function_decl));
> + return copy_to_reg (ret);
> }
> return virtual_incoming_args_rtx;
> }
>
> copy_to_reg is what e.g. the generic or pa target hook conditionally
> uses.
This fix looks good, passes bootstrap, go tests run.
Segher is currently regtesting on ppc64le power9. OK for trunk if tests
pass?
2018-01-30 Aaron Sawdey <acsaw...@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_internal_arg_pointer ): Only return
a reg rtx.
--
Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com
050-2/C113 (507) 253-7520 home: 507/263-0782
IBM Linux Technology Center - PPC Toolchain
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c (revision 257188)
+++ gcc/config/rs6000/rs6000.c (working copy)
@@ -29602,8 +29602,9 @@
emit_insn_after (pat, get_insns ());
pop_topmost_sequence ();
}
- return plus_constant (Pmode, cfun->machine->split_stack_arg_pointer,
- FIRST_PARM_OFFSET (current_function_decl));
+ rtx ret = plus_constant (Pmode, cfun->machine->split_stack_arg_pointer,
+ FIRST_PARM_OFFSET (current_function_decl));
+ return copy_to_reg (ret);
}
return virtual_incoming_args_rtx;
}