x86: also suppress use of MMX insns
authorJan Beulich <jbeulich@suse.com>
Wed, 20 Jul 2022 13:48:49 +0000 (15:48 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 20 Jul 2022 13:48:49 +0000 (15:48 +0200)
Passing -mno-sse alone is not enough: The compiler may still find
(questionable) reasons to use MMX insns. In particular with gcc12 use
of MOVD+PUNPCKLDQ+MOVQ was observed in an apparent attempt to auto-
vectorize the storing of two adjacent zeroes, 32 bits each.

Reported-by: ChrisD <chris@dalessio.org>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/arch.mk

index fb86cbda46d2feab82b6fd951022d8dd9c73556b..227d439a45239085100159ace8a7fc70f4d9242d 100644 (file)
@@ -36,9 +36,9 @@ $(call as-option-add,CFLAGS,CC,\
 
 CFLAGS += -mno-red-zone -fpic
 
-# Xen doesn't use SSE interally.  If the compiler supports it, also skip the
-# SSE setup for variadic function calls.
-CFLAGS += -mno-sse $(call cc-option,$(CC),-mskip-rax-setup)
+# Xen doesn't use MMX or SSE interally.  If the compiler supports it, also skip
+# the SSE setup for variadic function calls.
+CFLAGS += -mno-mmx -mno-sse $(call cc-option,$(CC),-mskip-rax-setup)
 
 ifeq ($(CONFIG_INDIRECT_THUNK),y)
 # Compile with gcc thunk-extern, indirect-branch-register if available.