regmove fixups vs pseudos

Ian Lance Taylor ian@airs.com
Wed Sep 14 06:05:00 GMT 2005


DJ Delorie <dj@redhat.com> writes:

> Any reason why we blindly assume destination registers will be hard
> registers here?
> 
> Index: regmove.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/regmove.c,v
> retrieving revision 1.173
> diff -p -U3 -r1.173 regmove.c
> --- regmove.c	25 Aug 2005 06:44:09 -0000	1.173
> +++ regmove.c	14 Sep 2005 00:27:34 -0000
> @@ -1020,7 +1020,8 @@ fixup_match_2 (rtx insn, rtx dst, rtx sr
>  	  if (REG_N_CALLS_CROSSED (REGNO (src)) == 0)
>  	    break;
>  
> -	  if (call_used_regs [REGNO (dst)]
> +	  if ((REGNO(dst) < FIRST_PSEUDO_REGISTER
> +	       && call_used_regs [REGNO (dst)])
>  	      || find_reg_fusage (p, CLOBBER, dst))
>  	    break;
>  	}

The destination register which is set by a CALL will normally be
FUNCTION_VALUE, which is normally a hard register.

Do you have an example in which something else happens?

Ian



More information about the Gcc mailing list