Skip to content

Commit

Permalink
[POWERPC] Add -mno-spe for ARCH=powerpc builds
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kumar Gala committed Nov 9, 2007
1 parent 688016f commit 0197cd2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/powerpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ endif
# No AltiVec instruction when building kernel
KBUILD_CFLAGS += $(call cc-option,-mno-altivec)

# No SPE instruction when building kernel
KBUILD_CFLAGS += $(call cc-option,-mno-spe)

# Enable unit-at-a-time mode when possible. It shrinks the
# kernel considerably.
KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
Expand Down

0 comments on commit 0197cd2

Please sign in to comment.