SH: use register names instead of numbers

Joern Rennecke amylaar@redhat.com
Wed Nov 22 13:26:00 GMT 2000


> 	* config/sh/sh.md (mova_const): New pattern.
> 	(GOTaddr2picreg): Use it.
> 	* config/sh/sh.c (broken_move): Match it.
> 	(mova_p): Don't match it.
> 	(machine_dependent_reorg): Adjust it.
> 
> Index: gcc/config/sh/sh.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/config/sh/sh.c,v
> retrieving revision 1.70
> diff -u -p -r1.70 sh.c
> --- gcc/config/sh/sh.c 2000/11/09 07:45:15 1.70
> +++ gcc/config/sh/sh.c 2000/11/18 22:11:53
> @@ -2071,7 +2071,10 @@ broken_move (insn)
>  	  /* We can load any 8 bit value if we don't care what the high
>  	     order bits end up as.  */
>  	  && GET_MODE (SET_DEST (pat)) != QImode
> -	  && CONSTANT_P (SET_SRC (pat))
> +	  && (CONSTANT_P (SET_SRC (pat))

Add a comment here saying that is to recognize the mova_const pattern.

> +	      || (GET_CODE (SET_SRC (pat)) == UNSPEC
> +		  && XINT (SET_SRC (pat), 1) == 1
> +		  && GET_CODE (XVECEXP (SET_SRC (pat), 0, 0)) == CONST))

With that change, it's OK to install.

Eventually, I'd like to see the assorted literal constants used in UNSPEC
to be replaced with symbolic constants - but let's sort out the dependency
problems first...


More information about the Gcc-patches mailing list