[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86: also suppress use of MMX insns


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 20 Jul 2022 15:30:20 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ai2kHb5xY3mXJsaE8dKL6c2HKnZO7qf+tGSpE0LkuW8=; b=Eb0jbRdApBcjSZtTAvfs3tSmVyYyhVt2PNk54VRRhghusmL7E9+kGOJtDSlXHsyn3tSABapEgLZkfuZZeCb38+7+nW3bTjz3/W/2ONg4vKViyCDuwo29948n8dbPoaF+NZnEEw8Itnmz2cQjj28Ejq+MJcu0RHlgU2p9Z5D5P7RXDnd6aRu26M6uR1L+MFOnGsZ9LkNy1g5EQ+IuXVgaTR55TIR/EiziEYlqkKuR8eYQLfdqd68nFk19n3tx9IJr+pvdKvK4CjxYh9Klpbr9xFXLc3XYyk868i63Er718d7PlescAm0T3sdX+Mx/KdzsKlBR1uLHZ+CuUeoekH20sw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VX3D8StgsgPxvjFwq5G4a8CnBh5u2PdpoWi9MSn+8e+ru9rryyLPs3CsNnL2Wt61Htr6vIYC/li/472LbtFZIwtNrxqCZTPteG8KPAAGdhoSybtTRaiDVVRXAqQn+85Yqi/uun+AER8h70KXKgi5gZf2yda/2ID1iERb9CesG+9TphFExqrvTja2kuJEmoBQ0czvXs4QyzFNulCzyxLux2si5w7cqXTit+NnSfjJ1RZLselgg3PyqhJ15SMMhUwhkI5mk813HqCEw7eqskZZFKg8NfTh6iYR12tpRgVTG8C5q08hYNkSoL+6YQBoAR2qQJdTxiOI3SmC6m9YIIMCUA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, ChrisD <chris@xxxxxxxxxxxx>
  • Delivery-date: Wed, 20 Jul 2022 13:30:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/arch.mk
+++ b/xen/arch/x86/arch.mk
@@ -36,9 +36,9 @@ $(call cc-option-add,CFLAGS,CC,-Wa$$(com
 
 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.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.