Selaa lähdekoodia

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>
Nigel Croxon 12 vuotta sitten
vanhempi
commit
0f42f7579c
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      gnu-efi-3.0/Make.defaults

+ 2 - 1
gnu-efi-3.0/Make.defaults

@@ -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