From: "H.J. Lu" <hjl.tools@gmail.com>
To: Alan Modra <amodra@gmail.com>
Cc: Jan Beulich <jbeulich@suse.com>,
"binutils@sourceware.org" <binutils@sourceware.org>
Subject: [committed, PATCH] Don't disable SSE3 when disabling SSE4a
Date: Mon, 17 Feb 2020 04:16:00 -0000 [thread overview]
Message-ID: <CAMe9rOofWpT-dgiDdbzbt6hnGUNShLthm6iSMzEgQ4HKnVysxQ@mail.gmail.com> (raw)
In-Reply-To: <20200217031228.GC5570@bubble.grove.modra.org>
[-- Attachment #1: Type: text/plain, Size: 1342 bytes --]
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.
[-- Attachment #2: 0001-x86-Don-t-disable-SSE3-when-disabling-SSE4a.patch --]
[-- Type: text/x-patch, Size: 1972 bytes --]
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
next prev parent reply other threads:[~2020-02-17 4:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-12 17:08 [PATCH] x86: fix SSE4a dependencies of ".arch .nosse*" Jan Beulich
2020-02-12 17:19 ` H.J. Lu
2020-02-16 16:48 ` [committed, PATCH] x86: Don't disable SSE4a when disabling SSE4 H.J. Lu
2020-02-17 1:06 ` Alan Modra
2020-02-17 1:20 ` H.J. Lu
2020-02-17 1:32 ` Alan Modra
2020-02-17 3:12 ` Alan Modra
2020-02-17 4:16 ` H.J. Lu [this message]
2020-02-17 15:27 ` Jan Beulich
2020-02-17 15:30 ` H.J. Lu
2020-02-17 15:32 ` Jan Beulich
2020-02-17 15:45 ` H.J. Lu
2020-02-17 15:49 ` Jan Beulich
2020-02-17 16:53 ` H.J. Lu
2020-02-17 17:01 ` Jan Beulich
2020-02-17 17:05 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMe9rOofWpT-dgiDdbzbt6hnGUNShLthm6iSMzEgQ4HKnVysxQ@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=jbeulich@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).