This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] S/390: Fix varargs alias set


Andreas Krebbel wrote:

> +  if (regnum >= 16 && regnum <= (16 + (TARGET_64BIT ? 4 : 2)))

Please use FP_ARG_NUM_REG.

> @@ -6302,7 +6300,8 @@ save_gprs (rtx base, int offset, int fir
>  
>    addr = plus_constant (base, offset);
>    addr = gen_rtx_MEM (Pmode, addr);
> -  set_mem_alias_set (addr, s390_sr_alias_set);
> +
> +  set_mem_alias_set (addr, get_frame_alias_set ());
>  
>    /* Special-case single register.  */
>    if (first == last)
> @@ -6321,6 +6320,16 @@ save_gprs (rtx base, int offset, int fir
>  			     gen_rtx_REG (Pmode, first),
>  			     GEN_INT (last - first + 1));
>  
> +  if (first <= 6 && current_function_stdarg)
> +    for (i = 0; i < XVECLEN (PATTERN (insn), 0); i++)
> +      {
> +	rtx mem = XEXP (XVECEXP (PATTERN (insn), 0, i), 0);
> +	
> +	if (first + i <= 6)
> +	  set_mem_alias_set (mem, get_varargs_alias_set ());
> +	else
> +	  set_mem_alias_set (mem, get_frame_alias_set ());
> +      }

The get_frame_alias_set path should be redundant here, as that's
already the default from above, right?

Otherwise OK, thanks!

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  Linux on zSeries Development
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]