diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-10-18 17:53:19 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-11-09 04:47:29 -0500 |
commit | 0197cd2e350a7151080e7335577e956f1f84a8cb (patch) | |
tree | 4ac1a37fbb9a8b8ec6c98f3d692bcd18c8b439b2 /arch/powerpc/Makefile | |
parent | 688016f4e2028e3c2c27e959ad001536e10ee2c5 (diff) |
[POWERPC] Add -mno-spe for ARCH=powerpc builds
Newer GCC's are capable of autovectorization for ISA extensions like
AltiVec and SPE. If we happen to build with one of those compilers we
will get SPE instructions in random kernel code. Today we only allow
basic interger code in the kernel and FP, AltiVec, or SPE in special
explicit locations that have handled the proper saving and restoring of
the register state (since on uniprocessor we lazy context switch the
register state for FP, AltiVec, and SPE).
-mno-spe disables the compiler for automatically generating SPE
instructions without our knowledge.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/Makefile')
-rw-r--r-- | arch/powerpc/Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 4e165342210..bd87626c1f6 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -107,6 +107,9 @@ endif | |||
107 | # No AltiVec instruction when building kernel | 107 | # No AltiVec instruction when building kernel |
108 | KBUILD_CFLAGS += $(call cc-option,-mno-altivec) | 108 | KBUILD_CFLAGS += $(call cc-option,-mno-altivec) |
109 | 109 | ||
110 | # No SPE instruction when building kernel | ||
111 | KBUILD_CFLAGS += $(call cc-option,-mno-spe) | ||
112 | |||
110 | # Enable unit-at-a-time mode when possible. It shrinks the | 113 | # Enable unit-at-a-time mode when possible. It shrinks the |
111 | # kernel considerably. | 114 | # kernel considerably. |
112 | KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) | 115 | KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) |