Disable MMX and SSE

GCC 4.8.0 adds some optimizations that will use movups/movaps (and use
%xmm* registers) when they're faster, and of course that won't work at
all since UEFI firmwares aren't guaranteed to initialize the mmx/sse
instructions.

This will be even more annoying, since most UEFI firmwares don't
initialize the #DE or #UD trap handlers, and your backtrace will be a
random path through uninitialized memory, occasionally including
whatever address the IDT has for #UD, but also addresses like "0x4" and
"0x507" that you don't normally expect to see in your call path.

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Nigel Croxon 2013-06-12 10:38:10 -04:00
parent 525455a9ea
commit 0f42f7579c

View File

@ -94,13 +94,14 @@ ifeq ($(ARCH),ia64)
endif
ifeq ($(ARCH),ia32)
CFLAGS += -mno-mmx -mno-sse
ifeq ($(HOSTARCH),x86_64)
ARCH3264 = -m32
endif
endif
ifeq ($(ARCH),x86_64)
CFLAGS += -mno-red-zone
CFLAGS += -mno-red-zone -nmo-mmx -mno-sse
ifeq ($(HOSTARCH),ia32)
ARCH3264 = -m64
endif