This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch: disable string insns on ppc e500
- From: Aldy Hernandez <aldy at quesejoda dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Geoff Keating <geoffk at geoffk dot org>, David Edelsohn <dje at watson dot ibm dot com>
- Date: Tue, 11 Mar 2003 13:23:04 -0800
- Subject: patch: disable string insns on ppc e500
As discussed. This fixes a gazillion -Os regressions on the e500.
Applied to mainline.
2003-03-11 Aldy Hernandez <aldyh at redhat dot com>
* config/rs6000/rs6000.c (rs6000_override_options): Disable string
instructions for e500.
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.436
diff -c -p -r1.436 rs6000.c
*** config/rs6000/rs6000.c 11 Mar 2003 20:40:53 -0000 1.436
--- config/rs6000/rs6000.c 11 Mar 2003 21:21:24 -0000
*************** rs6000_override_options (default_cpu)
*** 698,703 ****
--- 698,708 ----
SUBSUBTARGET_OVERRIDE_OPTIONS;
#endif
+ /* The e500 does not have string instructions, and we set
+ MASK_STRING above when optimizing for size. */
+ if (TARGET_SPE && (target_flags & MASK_STRING) != 0)
+ target_flags = target_flags & ~MASK_STRING;
+
/* Handle -m(no-)longcall option. This is a bit of a cheap hack,
using TARGET_OPTIONS to handle a toggle switch, but we're out of
bits in target_flags so TARGET_SWITCHES cannot be used.