aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-04-04 13:12:12 -0700
committerH.J. Lu <hjl.tools@gmail.com>2024-04-04 13:16:20 -0700
commitc2d698fe03a6092d58a07de96068b87836daced0 (patch)
tree24a5ff2e1bc799771f259dd02e90b79f63e35a44 /gas
parent16810e455feb26ef826a3ed876d6d7e6d24818b0 (diff)
downloadbinutils-c2d698fe03a6092d58a07de96068b87836daced0.zip
binutils-c2d698fe03a6092d58a07de96068b87836daced0.tar.gz
binutils-c2d698fe03a6092d58a07de96068b87836daced0.tar.bz2
x86: Restore APX shift-double instructions with omitted shift count
Restore APX shift-double instructions with omitted shift count since they are generated by GCC as shown in: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114590 gas/ PR gas/31606 * testsuite/gas/i386/x86-64-apx-ndd-wig.d: Updated. * testsuite/gas/i386/x86-64-apx-ndd.d: Likewise. * testsuite/gas/i386/x86-64-apx-ndd.s: Add tests for APX shift-double instructions with omitted shift count. opcodes/ PR gas/31606 * i386-opc.tbl: Restore APX shift-double instructions with omitted shift count. * i386-tbl.h: Regenerated.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-ndd-wig.d6
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-ndd.d6
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-ndd.s6
3 files changed, 18 insertions, 0 deletions
diff --git a/gas/testsuite/gas/i386/x86-64-apx-ndd-wig.d b/gas/testsuite/gas/i386/x86-64-apx-ndd-wig.d
index 3fbb809..0a80f9e 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-ndd-wig.d
+++ b/gas/testsuite/gas/i386/x86-64-apx-ndd-wig.d
@@ -126,8 +126,11 @@ Disassembly of section .text:
[ ]*[a-f0-9]+:[ ]*62 74 04 10 24 38 02 shld \$0x2,%r15d,\(%rax\),%r31d
[ ]*[a-f0-9]+:[ ]*62 54 05 10 24 c4 02 shld \$0x2,%r8w,%r12w,%r31w
[ ]*[a-f0-9]+:[ ]*62 7c bc 18 a5 e0 shld %cl,%r12,%r16,%r8
+[ ]*[a-f0-9]+:[ ]*62 7c bc 18 a5 e0 shld %cl,%r12,%r16,%r8
+[ ]*[a-f0-9]+:[ ]*62 7c 05 10 a5 2c 83 shld %cl,%r13w,\(%r19,%rax,4\),%r31w
[ ]*[a-f0-9]+:[ ]*62 7c 05 10 a5 2c 83 shld %cl,%r13w,\(%r19,%rax,4\),%r31w
[ ]*[a-f0-9]+:[ ]*62 74 05 10 a5 08 shld %cl,%r9w,\(%rax\),%r31w
+[ ]*[a-f0-9]+:[ ]*62 74 05 10 a5 08 shld %cl,%r9w,\(%rax\),%r31w
[ ]*[a-f0-9]+:[ ]*62 f4 04 10 c1 20 02 shl \$0x2,\(%rax\),%r31d
[ ]*[a-f0-9]+:[ ]*62 f4 04 10 c1 20 02 shl \$0x2,\(%rax\),%r31d
[ ]*[a-f0-9]+:[ ]*62 f4 05 10 d1 20 shl \$1,\(%rax\),%r31w
@@ -141,8 +144,11 @@ Disassembly of section .text:
[ ]*[a-f0-9]+:[ ]*62 74 04 10 2c 38 02 shrd \$0x2,%r15d,\(%rax\),%r31d
[ ]*[a-f0-9]+:[ ]*62 54 05 10 2c c4 02 shrd \$0x2,%r8w,%r12w,%r31w
[ ]*[a-f0-9]+:[ ]*62 7c bc 18 ad e0 shrd %cl,%r12,%r16,%r8
+[ ]*[a-f0-9]+:[ ]*62 7c bc 18 ad e0 shrd %cl,%r12,%r16,%r8
+[ ]*[a-f0-9]+:[ ]*62 7c 05 10 ad 2c 83 shrd %cl,%r13w,\(%r19,%rax,4\),%r31w
[ ]*[a-f0-9]+:[ ]*62 7c 05 10 ad 2c 83 shrd %cl,%r13w,\(%r19,%rax,4\),%r31w
[ ]*[a-f0-9]+:[ ]*62 74 05 10 ad 08 shrd %cl,%r9w,\(%rax\),%r31w
+[ ]*[a-f0-9]+:[ ]*62 74 05 10 ad 08 shrd %cl,%r9w,\(%rax\),%r31w
[ ]*[a-f0-9]+:[ ]*62 f4 04 10 c1 28 02 shr \$0x2,\(%rax\),%r31d
[ ]*[a-f0-9]+:[ ]*62 f4 05 10 d1 28 shr \$1,\(%rax\),%r31w
[ ]*[a-f0-9]+:[ ]*62 fc 05 10 d3 2c 83 shr %cl,\(%r19,%rax,4\),%r31w
diff --git a/gas/testsuite/gas/i386/x86-64-apx-ndd.d b/gas/testsuite/gas/i386/x86-64-apx-ndd.d
index e08a2dd..8c5ad23 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-ndd.d
+++ b/gas/testsuite/gas/i386/x86-64-apx-ndd.d
@@ -126,8 +126,11 @@ Disassembly of section .text:
\s*[a-f0-9]+:\s*62 74 04 10 24 38 02 shld \$0x2,%r15d,\(%rax\),%r31d
\s*[a-f0-9]+:\s*62 54 05 10 24 c4 02 shld \$0x2,%r8w,%r12w,%r31w
\s*[a-f0-9]+:\s*62 7c bc 18 a5 e0 shld %cl,%r12,%r16,%r8
+\s*[a-f0-9]+:\s*62 7c bc 18 a5 e0 shld %cl,%r12,%r16,%r8
+\s*[a-f0-9]+:\s*62 7c 05 10 a5 2c 83 shld %cl,%r13w,\(%r19,%rax,4\),%r31w
\s*[a-f0-9]+:\s*62 7c 05 10 a5 2c 83 shld %cl,%r13w,\(%r19,%rax,4\),%r31w
\s*[a-f0-9]+:\s*62 74 05 10 a5 08 shld %cl,%r9w,\(%rax\),%r31w
+\s*[a-f0-9]+:\s*62 74 05 10 a5 08 shld %cl,%r9w,\(%rax\),%r31w
\s*[a-f0-9]+:\s*62 f4 04 10 c1 20 02 shl \$0x2,\(%rax\),%r31d
\s*[a-f0-9]+:\s*62 f4 04 10 c1 20 02 shl \$0x2,\(%rax\),%r31d
\s*[a-f0-9]+:\s*62 f4 05 10 d1 20 shl \$1,\(%rax\),%r31w
@@ -141,8 +144,11 @@ Disassembly of section .text:
\s*[a-f0-9]+:\s*62 74 04 10 2c 38 02 shrd \$0x2,%r15d,\(%rax\),%r31d
\s*[a-f0-9]+:\s*62 54 05 10 2c c4 02 shrd \$0x2,%r8w,%r12w,%r31w
\s*[a-f0-9]+:\s*62 7c bc 18 ad e0 shrd %cl,%r12,%r16,%r8
+\s*[a-f0-9]+:\s*62 7c bc 18 ad e0 shrd %cl,%r12,%r16,%r8
+\s*[a-f0-9]+:\s*62 7c 05 10 ad 2c 83 shrd %cl,%r13w,\(%r19,%rax,4\),%r31w
\s*[a-f0-9]+:\s*62 7c 05 10 ad 2c 83 shrd %cl,%r13w,\(%r19,%rax,4\),%r31w
\s*[a-f0-9]+:\s*62 74 05 10 ad 08 shrd %cl,%r9w,\(%rax\),%r31w
+\s*[a-f0-9]+:\s*62 74 05 10 ad 08 shrd %cl,%r9w,\(%rax\),%r31w
\s*[a-f0-9]+:\s*62 f4 04 10 c1 28 02 shr \$0x2,\(%rax\),%r31d
\s*[a-f0-9]+:\s*62 f4 05 10 d1 28 shr \$1,\(%rax\),%r31w
\s*[a-f0-9]+:\s*62 fc 05 10 d3 2c 83 shr %cl,\(%r19,%rax,4\),%r31w
diff --git a/gas/testsuite/gas/i386/x86-64-apx-ndd.s b/gas/testsuite/gas/i386/x86-64-apx-ndd.s
index 4e248f7..122b3bc 100644
--- a/gas/testsuite/gas/i386/x86-64-apx-ndd.s
+++ b/gas/testsuite/gas/i386/x86-64-apx-ndd.s
@@ -120,8 +120,11 @@ _start:
shld $0x2,%r15d,(%rax),%r31d
shld $0x2,%r8w,%r12w,%r31w
shld %cl,%r12,%r16,%r8
+ shld %r12,%r16,%r8
shld %cl,%r13w,(%r19,%rax,4),%r31w
+ shld %r13w,(%r19,%rax,4),%r31w
shld %cl,%r9w,(%rax),%r31w
+ shld %r9w,(%rax),%r31w
shll $0x2,(%rax),%r31d
shll $0x2,(%rax),%r31d
shlw $0x1,(%rax),%r31w
@@ -135,8 +138,11 @@ _start:
shrd $0x2,%r15d,(%rax),%r31d
shrd $0x2,%r8w,%r12w,%r31w
shrd %cl,%r12,%r16,%r8
+ shrd %r12,%r16,%r8
shrd %cl,%r13w,(%r19,%rax,4),%r31w
+ shrd %r13w,(%r19,%rax,4),%r31w
shrd %cl,%r9w,(%rax),%r31w
+ shrd %r9w,(%rax),%r31w
shrl $0x2,(%rax),%r31d
shrw $0x1,(%rax),%r31w
shrw %cl,(%r19,%rax,4),%r31w