[PATCH] Fix PR57386 for 4.8/4.9 on powerpc

Michael Meissner meissner@linux.vnet.ibm.com
Mon Jan 6 19:33:00 GMT 2014


I could have sworn I sent this patch out in mid-December, but I don't see it,
so I'm resending this now.

This patch fixes the problem that breaks some code on the SPE.  I have patches
for 4.8 and 4.9.  Roland says that it fixes the problem in 4.8.  In 4.9 there
are other unrelated problems that Roland is currently working on.

I tested these patches on powerpc linux, and I did not see a regression.  Are
these patches ok to check into both the 4.8 and 4.9 branches?

2013-12-12  Roland Stigge  <stigge@antcom.de>
	    Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_legitimate_offset_address_p):
	Only check TFmode for SPE constants.  Don't check TImode or
	TDmode.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797
-------------- next part --------------
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 205902)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -5428,12 +5428,13 @@ rs6000_legitimate_offset_address_p (enum
       break;
 
     case TFmode:
-    case TDmode:
-    case TImode:
       if (TARGET_E500_DOUBLE)
 	return (SPE_CONST_OFFSET_OK (offset)
 		&& SPE_CONST_OFFSET_OK (offset + 8));
+      /* fall through */
 
+    case TDmode:
+    case TImode:
       extra = 8;
       if (!worst_case)
 	break;
-------------- next part --------------
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 205896)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -6321,13 +6321,14 @@ rs6000_legitimate_offset_address_p (enum
       break;
 
     case TFmode:
-    case TDmode:
-    case TImode:
-    case PTImode:
       if (TARGET_E500_DOUBLE)
 	return (SPE_CONST_OFFSET_OK (offset)
 		&& SPE_CONST_OFFSET_OK (offset + 8));
+      /* fall through */
 
+    case TDmode:
+    case TImode:
+    case PTImode:
       extra = 8;
       if (!worst_case)
 	break;


More information about the Gcc-patches mailing list