[RFC/PATCH] powerpc: Always use -mno-string & -mno-multiple

3 messages, 2 authors, 2007-03-22 · open the first message on its own page

[RFC/PATCH] powerpc: Always use -mno-string & -mno-multiple

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-03-22 06:10:50

powerpc: Always use -mno-string and -mno-multiple

The string and multiple load/store instructions are causing more
damage than help on a lot of processors where they are microcoded
and are generally no good for the kernel to use. Let's make sure
we don't emit them on any powerpc variant.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

Is that actually true ? What about 601 ? 4xx ? Do we want to keep
generating those for space on embedded processors where they actually
work (if they do) ?

Index: linux-cell/arch/powerpc/Makefile
===================================================================
--- linux-cell.orig/arch/powerpc/Makefile	2007-03-22 17:02:42.000000000 +1100
+++ linux-cell/arch/powerpc/Makefile	2007-03-22 17:05:23.000000000 +1100
@@ -102,9 +102,9 @@ CFLAGS += $(call cc-option,-mno-altivec)
 # kernel considerably.
 CFLAGS += $(call cc-option,-funit-at-a-time)
 
-ifndef CONFIG_FSL_BOOKE
-CFLAGS		+= -mstring
-endif
+# Never use string and multiple load/store instructions as they are
+# often slow when they are implemented at all
+CFLAGS		+= -mno-string -mno-multiple
 
 ifeq ($(CONFIG_6xx),y)
 CFLAGS		+= -mcpu=powerpc

Re: [RFC/PATCH] powerpc: Always use -mno-string & -mno-multiple

From: Segher Boessenkool <hidden>
Date: 2007-03-22 12:03:55

powerpc: Always use -mno-string and -mno-multiple

The string and multiple load/store instructions are causing more
damage than help on a lot of processors where they are microcoded
and are generally no good for the kernel to use. Let's make sure
we don't emit them on any powerpc variant.
And they help a lot on many 32-bit CPUs.  NAK.

If you tell your GCC to compile for a certain CPU where
these insns would be very slow, GCC will automagically
not generate them, already.


Segher

Re: [RFC/PATCH] powerpc: Always use -mno-string & -mno-multiple

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-03-22 12:06:39

On Thu, 2007-03-22 at 13:02 +0100, Segher Boessenkool wrote:
quoted
powerpc: Always use -mno-string and -mno-multiple

The string and multiple load/store instructions are causing more
damage than help on a lot of processors where they are microcoded
and are generally no good for the kernel to use. Let's make sure
we don't emit them on any powerpc variant.
And they help a lot on many 32-bit CPUs.  NAK.

If you tell your GCC to compile for a certain CPU where
these insns would be very slow, GCC will automagically
not generate them, already.
multiple do, strings really don't much except maybe on 601.... we don't
quite yet have the options to compile for specific CPUs on arch/powerpc
so -mno-string is a good idea generally, though I agree -mno-multiple
isn't, thus my next patch :-)

Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help