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]

Re: SUBREGs of hard registers: when not to simplify


On Wed, Oct 27, 1999 at 02:25:49PM +1000, Geoff Keating wrote:
> 
> If you turn (subreg:SF (reg/i:SC r3) 1) into (reg:SF r4) before function
> inlining has finished, integrate will have trouble when it goes to
> look for the return value because you've lost the '/i'.  This was causing
> complex-5 to fail at -O3.

This looks reasonable.  Note, movsf seems to have such extra baggage compared
to movdf, that I wonder sometimes if it is worth it to keep around (either by
simplifying movsf so it is like movdf, or adding the same stuff to movdf).
Note, this will obviously affect AIX (or sysv/eabi's -mcall-aix) more than
sysv/eabi, since there fp is never passed in integer registers.

> -- 
> Geoffrey Keating <geoffk@cygnus.com>
> 
> ===File ~/patches/cygnus/egcs-ppc-cret-2.patch==============
> md5sum: f9ed65f0e9c8ab84 1c3e70723be6246c 377605
> Index: egcs/gcc/ChangeLog
> 0a
> Sun Oct 24 20:18:10 1999  Geoff Keating  <geoffk@cygnus.com>
> 
> 	* config/rs6000/rs6000.md (movsf): Don't convert a SUBREG
> 	of the function return register into a plain REG until
> 	after function inlining is done.
> 
> .
> Changed files:
> egcs/gcc/ChangeLog
> egcs/gcc/config/rs6000/rs6000.md
> md5sum: 7a40a6f95a3322fb fd8de47ac12278a9 359681
> --- /sloth/disk0/co/egcs-mainline/egcs/gcc/config/rs6000/rs6000.md	Fri Oct 15 18:39:51 1999
> +++ egcs/gcc/config/rs6000/rs6000.md	Wed Oct 27 14:01:57 1999
> @@ -6256,7 +6256,9 @@ (define_expand "movsf"
>       reg.  So expand it.  */
>    if (GET_CODE (operands[0]) == SUBREG
>        && GET_CODE (SUBREG_REG (operands[0])) == REG
> -      && REGNO (SUBREG_REG (operands[0])) < FIRST_PSEUDO_REGISTER)
> +      && REGNO (SUBREG_REG (operands[0])) < FIRST_PSEUDO_REGISTER
> +      && (! REG_FUNCTION_VALUE_P (SUBREG_REG (operands[0]))
> +	  || ! rtx_equal_function_value_matters))
>      operands[0] = alter_subreg (operands[0]);
>    if (GET_CODE (operands[1]) == SUBREG
>        && GET_CODE (SUBREG_REG (operands[1])) == REG
> ============================================================

-- 
Michael Meissner, Cygnus Solutions
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886
email: meissner@cygnus.com	phone: 978-486-9304	fax: 978-692-4482


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