[PATCH] S/390: Fix varargs alias set

Ulrich Weigand uweigand@de.ibm.com
Thu Sep 8 10:41:00 GMT 2005


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



More information about the Gcc-patches mailing list