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 powerpc64 long double ice


On Wed, Feb 04, 2004 at 12:17:09PM -0800, Geoff Keating wrote:
> Alan Modra <amodra@bigpond.net.au> writes:
> 
> > Telling gcc that reg1+reg2 addressing is invalid for TFmode cures
> > the problem of a post-reload split that wants to generate
> > reg1+reg2+8 when breaking a TFmode mem into two pieces.
> > 
> > 	PR target/14010
> > 	* config/rs6000/rs6000.c (rs6000_legitimate_address): Disallow
> > 	indexed addressing for TFmode when TARGET_LONG_DOUBLE_128.
> 
> No, this is the wrong approach.

Is it that I missed a similar place that needs patching in
rs6000_legitimize_address?  ie. don't create a problem address in the
first place..

	* config/rs6000/rs6000.c (rs6000_legitimize_address): Don't
	create TFmode indexed addresses when TARGET_LONG_DOUBLE_128.
	(rs6000_legitimate_address): Disallow indexed addressing for
	TFmode when TARGET_LONG_DOUBLE_128.

Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.609
diff -u -p -r1.609 rs6000.c
--- gcc/config/rs6000/rs6000.c	13 Mar 2004 07:51:58 -0000	1.609
+++ gcc/config/rs6000/rs6000.c	14 Mar 2004 13:02:22 -0000
@@ -2707,6 +2744,7 @@ rs6000_legitimize_address (rtx x, rtx ol
 	   && ((TARGET_HARD_FLOAT && TARGET_FPRS)
 	       || TARGET_POWERPC64
 	       || (mode != DFmode && mode != TFmode))
+	   && !(mode == TFmode && TARGET_LONG_DOUBLE_128)
 	   && (TARGET_POWERPC64 || mode != DImode)
 	   && mode != TImode)
     {
@@ -3232,6 +3270,7 @@ rs6000_legitimate_address (enum machine_
       && ((TARGET_HARD_FLOAT && TARGET_FPRS)
 	  || TARGET_POWERPC64
 	  || (mode != DFmode && mode != TFmode))
+      && !(mode == TFmode && TARGET_LONG_DOUBLE_128)
       && (TARGET_POWERPC64 || mode != DImode)
       && legitimate_indexed_address_p (x, reg_ok_strict))
     return 1;

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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