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]

Patch to rs6000/eabispe.h and rs6000/linuxspe.h to disallow -m64


powerpc-eabispe and powerpc-linuxspe should not support -m64, but
wrongly permitted that option.  Fixed thus.

Cross tested with no regressions to powerpc-eabispe, and tested that
cc1 builds and produces the proper messages for powerpc-linuxspe.  OK
to commit?  (Testing was done on 3.4 branch because of a pre-existing 
build failure for powerpc-eabispe on mainline.  The same patch will apply 
without changes to both mainline and 3.4 branch.)

-- 
Joseph S. Myers
joseph@codesourcery.com

2004-10-14  Joseph S. Myers  <joseph@codesourcery.com>

	* config/rs6000/eabispe.h (SUBSUBTARGET_OVERRIDE_OPTIONS),
	config/rs6000/linuxspe.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Disallow
	-m64.

testsuite:
2004-10-14  Joseph S. Myers  <joseph@codesourcery.com>

	* gcc.dg/ppc-spe64-1.c: New test.

diff -rupN GCC.orig/gcc/config/rs6000/eabispe.h GCC/gcc/config/rs6000/eabispe.h
--- GCC.orig/gcc/config/rs6000/eabispe.h	2004-03-08 10:05:20.000000000 +0000
+++ GCC/gcc/config/rs6000/eabispe.h	2004-10-13 15:31:17.000000000 +0000
@@ -40,7 +40,9 @@
   if (rs6000_spe_string == NULL) \
     rs6000_spe = 1; \
   if (rs6000_isel_string == NULL) \
-    rs6000_isel = 1
+    rs6000_isel = 1; \
+  if (target_flags & MASK_64BIT) \
+    error ("-m64 not supported in this configuration")
 
 /* The e500 ABI says that either long doubles are 128 bits, or if
    implemented in any other size, the compiler/linker should error out.
diff -rupN GCC.orig/gcc/config/rs6000/linuxspe.h GCC/gcc/config/rs6000/linuxspe.h
--- GCC.orig/gcc/config/rs6000/linuxspe.h	2003-10-06 12:25:14.000000000 +0000
+++ GCC/gcc/config/rs6000/linuxspe.h	2004-10-13 15:31:52.000000000 +0000
@@ -53,7 +53,9 @@
   if (rs6000_spe_string == NULL) \
     rs6000_spe = 1; \
   if (rs6000_isel_string == NULL) \
-    rs6000_isel = 1
+    rs6000_isel = 1; \
+  if (target_flags & MASK_64BIT) \
+    error ("-m64 not supported in this configuration")
 
 /* The e500 ABI says that either long doubles are 128 bits, or if
    implemented in any other size, the compiler/linker should error out.
diff -rupN GCC.orig/gcc/testsuite/gcc.dg/ppc-spe64-1.c GCC/gcc/testsuite/gcc.dg/ppc-spe64-1.c
--- GCC.orig/gcc/testsuite/gcc.dg/ppc-spe64-1.c	1970-01-01 00:00:00.000000000 +0000
+++ GCC/gcc/testsuite/gcc.dg/ppc-spe64-1.c	2004-10-13 15:33:40.000000000 +0000
@@ -0,0 +1,6 @@
+/* Test that SPE targets do not permit -m64.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile { target powerpc-*-*spe } } */
+/* { dg-options "-m64" } */
+
+/* { dg-error "-m64 not supported in this configuration" "SPE not 64-bit" { target *-*-* } 0 } */


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