This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[RFA][PATCH][PowerPC] Fix PR36425 (-mno-isel not working)
- From: Edmar Wienskoski-RA8797 <edmar at freescale dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 06 Jun 2008 10:50:39 -0500
- Subject: [RFA][PATCH][PowerPC] Fix PR36425 (-mno-isel not working)
This patch corrects the problem that the option -mno-isel does not
disable isel generation on e500v[12] targets, and also adds a test case.
This problem happens with gcc trunk and 4.3 branch.
Could a PowerPC maintainer review and commit the patch in here:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36425
Thanks
Edmar
2008-06-03 Edmar Wienskoski <edmar@freescale.com>
* config/rs6000/rs6000.c (rs6000_override_options): Set
rs6000_isel conditionally to the absence of comand line
overide.
* config/rs6000/linuxspe.h (SUBSUBTARGET_OVERRIDE_OPTIONS):
Remove duplicate rs6000_isel setting.
* config/rs6000/eabispe.h: Ditto
2008-06-03 Edmar Wienskoski <edmar@freescale.com>
* gcc.targets/powerpc/e500-1.c: New test case to verify
mno-isel option.
Index: gcc/gcc/testsuite/gcc.target/powerpc/e500-1.c
===================================================================
--- gcc/gcc/testsuite/gcc.target/powerpc/e500-1.c (revision 0)
+++ gcc/gcc/testsuite/gcc.target/powerpc/e500-1.c (revision 0)
@@ -0,0 +1,14 @@
+/* Test functioning of command option -mno-isel */
+/* { dg-do compile { target powerpc*-*-linux* } } */
+/* { dg-options "-O2 -mno-isel" } */
+
+/* { dg-final { scan-assembler-not "isel" } } */
+
+int
+foo (int x, int y)
+{
+ if (x < y)
+ return x;
+ else
+ return y;
+}
Index: gcc/gcc/config/rs6000/linuxspe.h
===================================================================
--- gcc/gcc/config/rs6000/linuxspe.h (revision 135576)
+++ gcc/gcc/config/rs6000/linuxspe.h (working copy)
@@ -36,8 +36,6 @@
rs6000_float_gprs = 1; \
if (!rs6000_explicit_options.spe) \
rs6000_spe = 1; \
- if (!rs6000_explicit_options.isel) \
- rs6000_isel = 1; \
if (target_flags & MASK_64BIT) \
error ("-m64 not supported in this configuration")
Index: gcc/gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/gcc/config/rs6000/rs6000.c (revision 135576)
+++ gcc/gcc/config/rs6000/rs6000.c (working copy)
@@ -1549,7 +1549,7 @@
}
}
- if (TARGET_E500)
+ if (TARGET_E500 && !rs6000_explicit_options.isel)
rs6000_isel = 1;
if (rs6000_cpu == PROCESSOR_PPCE300C2 || rs6000_cpu == PROCESSOR_PPCE300C3)
Index: gcc/gcc/config/rs6000/eabispe.h
===================================================================
--- gcc/gcc/config/rs6000/eabispe.h (revision 135576)
+++ gcc/gcc/config/rs6000/eabispe.h (working copy)
@@ -37,8 +37,6 @@
rs6000_float_gprs = 1; \
if (!rs6000_explicit_options.spe) \
rs6000_spe = 1; \
- if (!rs6000_explicit_options.isel) \
- rs6000_isel = 1; \
if (target_flags & MASK_64BIT) \
error ("-m64 not supported in this configuration")