[PATCH][PR debug/83758] look more carefully for internal_arg_pointer in vt_add_function_parameter()

Jakub Jelinek jakub@redhat.com
Mon Jan 29 22:37:00 GMT 2018


On Mon, Jan 29, 2018 at 03:01:10PM -0600, Aaron Sawdey wrote:
>   /* If there is a DRAP register or a pseudo in internal_arg_pointer,
>      rewrite the incoming location of parameters passed on the stack
>      into MEMs based on the argument pointer, so that incoming doesn't
>      depend on a pseudo.  */
>   if (MEM_P (incoming)
>       && (XEXP (incoming, 0) == crtl->args.internal_arg_pointer
> 	  || (GET_CODE (XEXP (incoming, 0)) == PLUS
> 	      && XEXP (XEXP (incoming, 0), 0)
> 		 == crtl->args.internal_arg_pointer
> 	      && CONST_INT_P (XEXP (XEXP (incoming, 0), 1)))))
>     {
>       HOST_WIDE_INT off = -FIRST_PARM_OFFSET (current_function_decl);
>       if (GET_CODE (XEXP (incoming, 0)) == PLUS)
> 	off += INTVAL (XEXP (XEXP (incoming, 0), 1));
>       incoming
> 	= replace_equiv_address_nv (incoming,
> 				    plus_constant (Pmode,
> 						   arg_pointer_rtx, off));
>     }

The code actually meant pointer comparison, the question is what is
different on powerpc* that you end up with a different REG.
>From what I can see, function.c uses crtl->args.internal_arg_pointer
directly rather than a REG with the same REGNO.
Where does it become something different and why?

	Jakub



More information about the Gcc-patches mailing list