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]

Check for invalid E500 option combinations


If you try to use a PowerPC compiler with E500 features enabled at the 
same time as some other features (that are not present in E500 CPUs), it 
does not work well and ICEs are likely.  This patch adds a check for such 
combinations and associated errors.  (The situation is most likely to 
arise when users have a wrapper script passing a series of E500 options to 
the compiler, but then try to use that script as a compiler for some other 
variant and fail to override all the options necessary.)

Tested powerpc-none-linux-gnuspe.  OK to commit?

2006-12-21  Joseph Myers  <joseph@codesourcery.com>

	* config/rs6000/rs6000.c (rs6000_override_options): Give errors
	for E500 options together with 64-bit or FPRs.

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 120102)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -1471,6 +1471,16 @@
 	rs6000_long_double_type_size = RS6000_DEFAULT_LONG_DOUBLE_SIZE;
     }
 
+  /* Detect invalid option combinations with E500.  */
+  if (TARGET_E500 || TARGET_SPE || TARGET_SPE_ABI || TARGET_ISEL
+      || TARGET_E500_SINGLE || TARGET_E500_DOUBLE)
+    {
+      if (TARGET_64BIT)
+	error ("64-bit E500 not supported");
+      if (TARGET_HARD_FLOAT && TARGET_FPRS)
+	error ("E500 and FPRs not supported");
+    }
+
   rs6000_always_hint = (rs6000_cpu != PROCESSOR_POWER4
 			&& rs6000_cpu != PROCESSOR_POWER5
                         && rs6000_cpu != PROCESSOR_POWER6

-- 
Joseph S. Myers
joseph@codesourcery.com


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