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: Fix for compile/20000804-1.c on ppc


> Date: Mon, 3 Dec 2001 17:15:28 +1030
> From: Alan Modra <amodra@bigpond.net.au>
> Content-Disposition: inline
> User-Agent: Mutt/1.3.17i
> 
> On Mon, Dec 03, 2001 at 04:53:31PM +1030, Alan Modra wrote:
> > On Sat, Dec 01, 2001 at 09:01:32AM -0800, Geoff Keating wrote:
> > > @@ -1640,9 +1641,9 @@ rs6000_legitimize_address (x, oldx, mode
> > >  	   && GET_CODE (x) != CONST_INT
> > >  	   && GET_CODE (x) != CONST_DOUBLE 
> > >  	   && CONSTANT_P (x)
> > > -	   && (TARGET_HARD_FLOAT || mode != DFmode)
> > > -	   && mode != DImode 
> > > -	   && mode != TImode)
> > > +	   && GET_MODE_NUNITS (mode) == 1
> > > +	   && (GET_MODE_BITSIZE (mode) <= 32
> > > +	       || (TARGET_HARD_FLOAT && mode != DFmode)))
> > 
> > Uh, so if TARGET_HARD_FLOAT, we accept any mode but DFmode??  Don't you
> > want
> > 
> > +	       || (TARGET_HARD_FLOAT && mode == DFmode)))
> 
> And similarly in LEGITIMATE_LO_SUM_ADDRESS_P, like so:
> 
> 	* config/rs6000/rs6000.c (rs6000_legitimize_address): Fix typo.
> 	* config/rs6000/rs6000.h (LEGITIMATE_LO_SUM_ADDRESS_P): Here too.

This is OK.  (Please test it before committing, though.)

> Index: gcc/config/rs6000/rs6000.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
> retrieving revision 1.249
> diff -u -p -r1.249 rs6000.c
> --- rs6000.c	2001/12/03 00:49:41	1.249
> +++ rs6000.c	2001/12/03 06:41:44
> @@ -1674,7 +1674,7 @@ rs6000_legitimize_address (x, oldx, mode
>  	   && CONSTANT_P (x)
>  	   && GET_MODE_NUNITS (mode) == 1
>  	   && (GET_MODE_BITSIZE (mode) <= 32
> -	       || (TARGET_HARD_FLOAT && mode != DFmode)))
> +	       || (TARGET_HARD_FLOAT && mode == DFmode)))
>      {
>        rtx reg = gen_reg_rtx (Pmode);
>        emit_insn (gen_elf_high (reg, (x)));
> Index: gcc/config/rs6000/rs6000.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v
> retrieving revision 1.149
> diff -u -p -r1.149 rs6000.h
> --- rs6000.h	2001/12/03 00:49:41	1.149
> +++ rs6000.h	2001/12/03 06:41:48
> @@ -2008,7 +2008,7 @@ typedef struct rs6000_args
>     && ! flag_pic && ! TARGET_TOC			\
>     && GET_MODE_NUNITS (MODE) == 1			\
>     && (GET_MODE_BITSIZE (MODE) <= 32 			\
> -       || (TARGET_HARD_FLOAT && (MODE) != DFmode))	\
> +       || (TARGET_HARD_FLOAT && (MODE) == DFmode))	\
>     && GET_CODE (X) == LO_SUM				\
>     && GET_CODE (XEXP (X, 0)) == REG			\
>     && INT_REG_OK_FOR_BASE_P (XEXP (X, 0), (STRICT))	\
> 


-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>


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