[kvm-unit-tests,PULL,11/12] x86: disable SSE on 32-bit hosts
diff mbox series

Message ID 20200616185622.8644-12-thuth@redhat.com
State New
Headers show
  • [kvm-unit-tests,PULL,01/12] Fix out-of-tree builds
Related show

Commit Message

Thomas Huth June 16, 2020, 6:56 p.m. UTC
From: Paolo Bonzini <pbonzini@redhat.com>

On 64-bit hosts we are disabling SSE and SSE2.  Depending on the
compiler however it may use movq instructions for 64-bit transfers
even when targeting 32-bit processors; when CR4.OSFXSR is not set,
this results in an undefined opcode exception, so tell the compiler
to avoid those instructions on 32-bit hosts as well.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200616140217.104362-1-pbonzini@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
 x86/Makefile.i386 | 1 +
 1 file changed, 1 insertion(+)

diff mbox series

diff --git a/x86/Makefile.i386 b/x86/Makefile.i386
index d801b80..be9d6bc 100644
--- a/x86/Makefile.i386
+++ b/x86/Makefile.i386
@@ -1,6 +1,7 @@ 
 cstart.o = $(TEST_DIR)/cstart.o
 bits = 32
 ldarch = elf32-i386
+COMMON_CFLAGS += -mno-sse -mno-sse2
 cflatobjs += lib/x86/setjmp32.o