This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed, PATCH] Don't disable SSE3 when disabling SSE4a


On Sun, Feb 16, 2020 at 7:12 PM Alan Modra <amodra@gmail.com> wrote:
>
> On Mon, Feb 17, 2020 at 12:01:56PM +1030, Alan Modra wrote:
> > It doesn't compile.  The CPU_ANY_SSE4A_FLAGS entry is added inside the
> > CPU_ANY_SSE3_FLAGS entry.  Take a look at the diff.
>
> Since it is probably getting late for you I committed this to fix the
> problem.
>
>         * i386-gen.c (cpu_flag_init): Correct last change.
>
> diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c
> index 45106bcf6d..407479261c 100644
> --- a/opcodes/i386-gen.c
> +++ b/opcodes/i386-gen.c
> @@ -326,8 +326,6 @@ static initializer cpu_flag_init[] =
>    { "CPU_ANY_SSE2_FLAGS",
>      "CPU_ANY_SSE3_FLAGS|CpuSSE2" },
>    { "CPU_ANY_SSE3_FLAGS",
> -  { "CPU_ANY_SSE4A_FLAGS",
> -    "CPU_ANY_SSE3_FLAGS|CpuSSE4a" },
>      "CPU_ANY_SSSE3_FLAGS|CpuSSE3|CpuSSE4a" },
>    { "CPU_ANY_SSSE3_FLAGS",
>      "CPU_ANY_SSE4_1_FLAGS|CpuSSSE3" },
> @@ -335,6 +333,8 @@ static initializer cpu_flag_init[] =
>      "CPU_ANY_SSE4_2_FLAGS|CpuSSE4_1" },
>    { "CPU_ANY_SSE4_2_FLAGS",
>      "CpuSSE4_2" },
> +  { "CPU_ANY_SSE4A_FLAGS",
> +    "CPU_ANY_SSE3_FLAGS|CpuSSE4a" },
>    { "CPU_ANY_AVX_FLAGS",
>      "CPU_ANY_AVX2_FLAGS|CpuF16C|CpuFMA|CpuFMA4|CpuXOP|CpuAVX" },
>    { "CPU_ANY_AVX2_FLAGS",
>

I checked in this patch to avoid disabling SSE3 when
disabling SSE4a.


-- 
H.J.
From ce504911e5c4068a3498eebde4064b24382c7598 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Sun, 16 Feb 2020 20:10:20 -0800
Subject: [PATCH] x86: Don't disable SSE3 when disabling SSE4a

Since SSE3 is independent of SSE4a, don't disable SSE3 when disabling
SSE4a.

	* i386-gen.c (cpu_flag_init): Remove CPU_ANY_SSE3_FLAGS from
	CPU_ANY_SSE4A_FLAGS.
---
 opcodes/ChangeLog   | 5 +++++
 opcodes/i386-gen.c  | 2 +-
 opcodes/i386-init.h | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 908afdd9a0..9d02fc45e7 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2020-02-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* i386-gen.c (cpu_flag_init): Remove CPU_ANY_SSE3_FLAGS from
+	CPU_ANY_SSE4A_FLAGS.
+
 2020-02-17  Alan Modra  <amodra@gmail.com>
 
 	* i386-gen.c (cpu_flag_init): Correct last change.
diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c
index 407479261c..4d98d31b74 100644
--- a/opcodes/i386-gen.c
+++ b/opcodes/i386-gen.c
@@ -334,7 +334,7 @@ static initializer cpu_flag_init[] =
   { "CPU_ANY_SSE4_2_FLAGS",
     "CpuSSE4_2" },
   { "CPU_ANY_SSE4A_FLAGS",
-    "CPU_ANY_SSE3_FLAGS|CpuSSE4a" },
+    "CpuSSE4a" },
   { "CPU_ANY_AVX_FLAGS",
     "CPU_ANY_AVX2_FLAGS|CpuF16C|CpuFMA|CpuFMA4|CpuXOP|CpuAVX" },
   { "CPU_ANY_AVX2_FLAGS",
diff --git a/opcodes/i386-init.h b/opcodes/i386-init.h
index d4674fc02a..36660b109b 100644
--- a/opcodes/i386-init.h
+++ b/opcodes/i386-init.h
@@ -1172,7 +1172,7 @@
 
 #define CPU_ANY_SSE4A_FLAGS \
   { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
-      0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+      0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
-- 
2.24.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]