From: Jan Beulich Date: Tue, 16 Jun 2020 08:34:55 +0000 (+0200) Subject: x86: drop SSE4a from SSE check again X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2106ed9baf1098a5d76469ecde30813065c46c68;p=binutils-gdb.git x86: drop SSE4a from SSE check again Upon re-consideration in commit 569d50f1c611 ("x86: further refine SSE check (SSE4a, SHA, GFNI)") I went too far: Mixing of SSE and AVX insns doesn't suffer as bad a penalty on AMD CPUs as on Intel ones. SSE4a being an AMD-only extension, it shouldn't be part of the ISA extensions set for which the diagnostic may get issued. Undo that part. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index ef4eb8fec33..4c31ecff952 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,13 @@ +2020-06-16 Jan Beulich + + * config/tc-i386.c (md_assemble): Drop SSE4a from SSE check + conditional. + * testsuite/gas/i386/sse-check.s: Adjust comment. + * testsuite/gas/i386/sse-check-error.l, + testsuite/gas/i386/sse-check-warn.e, + testsuite/gas/i386/x86-64-sse-check-error.l: Adjust + expectations. + 2020-06-16 Alan Modra * config/tc-tic30.h: Remove OBJ_AOUT support. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index a5b9061f058..b5d7e1cc6d4 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -4753,7 +4753,6 @@ md_assemble (char *line) || i.tm.cpu_flags.bitfield.cpussse3 || i.tm.cpu_flags.bitfield.cpusse4_1 || i.tm.cpu_flags.bitfield.cpusse4_2 - || i.tm.cpu_flags.bitfield.cpusse4a || i.tm.cpu_flags.bitfield.cpupclmul || i.tm.cpu_flags.bitfield.cpuaes || i.tm.cpu_flags.bitfield.cpusha diff --git a/gas/testsuite/gas/i386/sse-check-error.l b/gas/testsuite/gas/i386/sse-check-error.l index 30498b7e39e..782e50bc040 100644 --- a/gas/testsuite/gas/i386/sse-check-error.l +++ b/gas/testsuite/gas/i386/sse-check-error.l @@ -5,7 +5,6 @@ .*:16: Error: .* .*:19: Error: .* .*:20: Error: .* -.*:23: Error: .* .*:26: Error: .* .*:29: Error: .* .*:32: Error: .* @@ -44,9 +43,8 @@ GAS LISTING .* .* Error: SSE instruction `pcmpgtq' is used [ ]*20[ ]+C1 [ ]*21[ ]+ -[ ]*22[ ]+\# SSE4a instruction +[ ]*22[ ]+\# SSE4a instruction.* [ ]*23[ ]+\?\?\?\? 660F78C0 extrq \$0, \$0, %xmm0 -.* Error: SSE instruction `extrq' is used [ ]*23[ ]+0000 [ ]*24[ ]+ [ ]*25[ ]+\# PCMUL instruction @@ -70,7 +68,7 @@ GAS LISTING .* [ ]*36[ ]+\?\?\?\? 62F27D09 vgf2p8mulb %xmm0, %xmm0, %xmm0\{%k1\} [ ]*36[ ]+CFC0 [ ]*37[ ]+\?\?\?\? 62F27D48 vgf2p8mulb %zmm0, %zmm0, %zmm0 +[ ]*37[ ]+CFC0 GAS LISTING .* -[ ]*37[ ]+CFC0 diff --git a/gas/testsuite/gas/i386/sse-check-warn.e b/gas/testsuite/gas/i386/sse-check-warn.e index 33f07b24eba..b8dba94a06c 100644 --- a/gas/testsuite/gas/i386/sse-check-warn.e +++ b/gas/testsuite/gas/i386/sse-check-warn.e @@ -5,7 +5,6 @@ .*:16: Warning: SSE instruction `phaddw' is used .*:19: Warning: SSE instruction `blendvpd' is used .*:20: Warning: SSE instruction `pcmpgtq' is used -.*:23: Warning: SSE instruction `extrq' is used .*:26: Warning: SSE instruction `pclmulqdq' is used .*:29: Warning: SSE instruction `aesdec' is used .*:32: Warning: SSE instruction `sha1nexte' is used diff --git a/gas/testsuite/gas/i386/sse-check.s b/gas/testsuite/gas/i386/sse-check.s index a76d1ef9bc4..43a351495a1 100644 --- a/gas/testsuite/gas/i386/sse-check.s +++ b/gas/testsuite/gas/i386/sse-check.s @@ -19,7 +19,7 @@ _start: blendvpd %xmm0,%xmm1,%xmm0 pcmpgtq %xmm1,%xmm0 -# SSE4a instruction +# SSE4a instruction (no diagnostic) extrq $0, $0, %xmm0 # PCMUL instruction diff --git a/gas/testsuite/gas/i386/x86-64-sse-check-error.l b/gas/testsuite/gas/i386/x86-64-sse-check-error.l index 30498b7e39e..782e50bc040 100644 --- a/gas/testsuite/gas/i386/x86-64-sse-check-error.l +++ b/gas/testsuite/gas/i386/x86-64-sse-check-error.l @@ -5,7 +5,6 @@ .*:16: Error: .* .*:19: Error: .* .*:20: Error: .* -.*:23: Error: .* .*:26: Error: .* .*:29: Error: .* .*:32: Error: .* @@ -44,9 +43,8 @@ GAS LISTING .* .* Error: SSE instruction `pcmpgtq' is used [ ]*20[ ]+C1 [ ]*21[ ]+ -[ ]*22[ ]+\# SSE4a instruction +[ ]*22[ ]+\# SSE4a instruction.* [ ]*23[ ]+\?\?\?\? 660F78C0 extrq \$0, \$0, %xmm0 -.* Error: SSE instruction `extrq' is used [ ]*23[ ]+0000 [ ]*24[ ]+ [ ]*25[ ]+\# PCMUL instruction @@ -70,7 +68,7 @@ GAS LISTING .* [ ]*36[ ]+\?\?\?\? 62F27D09 vgf2p8mulb %xmm0, %xmm0, %xmm0\{%k1\} [ ]*36[ ]+CFC0 [ ]*37[ ]+\?\?\?\? 62F27D48 vgf2p8mulb %zmm0, %zmm0, %zmm0 +[ ]*37[ ]+CFC0 GAS LISTING .* -[ ]*37[ ]+CFC0