From: Jan Beulich Date: Thu, 13 Feb 2020 09:19:28 +0000 (+0100) Subject: x86: fix SSE4a dependencies of ".arch .nosse*" X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7deea9aad86683a4bcc68d6dd073038039f7a267;p=binutils-gdb.git x86: fix SSE4a dependencies of ".arch .nosse*" Since ".arch .sse4a" enables SSE3 and earlier, disabling SSE3 should also disable SSE4a. And as per its name, ".arch .nosse4" should also do so. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index cf1266a33ec..7f110e938d5 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2020-02-13 Jan Beulich + + * config/tc-i386.c (cpu_noarch): Use CPU_ANY_SSE4_FLAGS in + "nosse4" entry. + 2020-02-12 Jan Beulich * config/tc-i386.c (avx512): New (at file scope), moved from diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 680016ae457..6b923ccb81b 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1180,7 +1180,7 @@ static const noarch_entry cpu_noarch[] = { STRING_COMMA_LEN ("nossse3"), CPU_ANY_SSSE3_FLAGS }, { STRING_COMMA_LEN ("nosse4.1"), CPU_ANY_SSE4_1_FLAGS }, { STRING_COMMA_LEN ("nosse4.2"), CPU_ANY_SSE4_2_FLAGS }, - { STRING_COMMA_LEN ("nosse4"), CPU_ANY_SSE4_1_FLAGS }, + { STRING_COMMA_LEN ("nosse4"), CPU_ANY_SSE4_FLAGS }, { STRING_COMMA_LEN ("noavx"), CPU_ANY_AVX_FLAGS }, { STRING_COMMA_LEN ("noavx2"), CPU_ANY_AVX2_FLAGS }, { STRING_COMMA_LEN ("noavx512f"), CPU_ANY_AVX512F_FLAGS }, diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index ad10bf1cb50..6b0c17f8ae1 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,10 @@ +2020-02-13 Jan Beulich + + * i386-gen.c (cpu_flag_init): Move CpuSSE4a from + CPU_ANY_SSE_FLAGS entry to CPU_ANY_SSE3_FLAGS one. Add + CPU_ANY_SSE4_FLAGS entry. + * i386-init.h: Re-generate. + 2020-02-12 Jan Beulich * i386-opc.tbl (vfpclasspd, vfpclassps): Add Intel sytax form diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index e1cc4932303..79f4cc9d252 100644 --- a/opcodes/i386-gen.c +++ b/opcodes/i386-gen.c @@ -322,17 +322,19 @@ static initializer cpu_flag_init[] = { "CPU_ANY_MMX_FLAGS", "CPU_3DNOWA_FLAGS" }, { "CPU_ANY_SSE_FLAGS", - "CPU_ANY_SSE2_FLAGS|CpuSSE|CpuSSE4a" }, + "CPU_ANY_SSE2_FLAGS|CpuSSE" }, { "CPU_ANY_SSE2_FLAGS", "CPU_ANY_SSE3_FLAGS|CpuSSE2" }, { "CPU_ANY_SSE3_FLAGS", - "CPU_ANY_SSSE3_FLAGS|CpuSSE3" }, + "CPU_ANY_SSSE3_FLAGS|CpuSSE3|CpuSSE4a" }, { "CPU_ANY_SSSE3_FLAGS", "CPU_ANY_SSE4_1_FLAGS|CpuSSSE3" }, { "CPU_ANY_SSE4_1_FLAGS", "CPU_ANY_SSE4_2_FLAGS|CpuSSE4_1" }, { "CPU_ANY_SSE4_2_FLAGS", "CpuSSE4_2" }, + { "CPU_ANY_SSE4_FLAGS", + "CPU_ANY_SSE4_1_FLAGS|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 2c93158844e..8ecf1171968 100644 --- a/opcodes/i386-init.h +++ b/opcodes/i386-init.h @@ -1132,7 +1132,7 @@ #define CPU_ANY_SSE2_FLAGS \ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, \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