aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2020-07-14 10:26:51 +0200
committerJan Beulich <jbeulich@suse.com>2020-07-14 10:26:51 +0200
commit9ab00b61a9d7d84313b1793255a1bc63b97fd9b7 (patch)
treeae53c9173c9172dcf50282c39d1f20a7c1c8a9d6 /gas
parent2875b28aa871395dc17182f0bacfe40a68b1ad05 (diff)
downloadgdb-9ab00b61a9d7d84313b1793255a1bc63b97fd9b7.zip
gdb-9ab00b61a9d7d84313b1793255a1bc63b97fd9b7.tar.gz
gdb-9ab00b61a9d7d84313b1793255a1bc63b97fd9b7.tar.bz2
x86: don't disassemble MOVBE with two suffixes
MOVBE_Fixup() is entirely redundant with the S macro already used on the mnemonics, leading to double suffixes in suffix-always mode. Drop the function.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/testsuite/gas/i386/i386.exp2
-rw-r--r--gas/testsuite/gas/i386/movbe-suffix.d22
-rw-r--r--gas/testsuite/gas/i386/x86-64-movbe-suffix.d28
4 files changed, 58 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 5b44cce..83f0d8c 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,11 @@
2020-07-14 Jan Beulich <jbeulich@suse.com>
+ * testsuite/gas/i386/movbe-suffix.d,
+ testsuite/gas/i386/x86-64-movbe-suffix.d: New.
+ * testsuite/gas/i386/i386.exp: Run new tests.
+
+2020-07-14 Jan Beulich <jbeulich@suse.com>
+
* testsuite/gas/i386/crc32-suffix.d,
testsuite/gas/i386/x86-64-crc32-suffix.d: New.
* testsuite/gas/i386/i386.exp: Run new tests.
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 42d3577..8544177 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -270,6 +270,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_dump_test "sse-noavx"
run_dump_test "movbe"
run_dump_test "movbe-intel"
+ run_dump_test "movbe-suffix"
run_list_test "inval-movbe" "-al"
run_dump_test "ept"
run_dump_test "ept-intel"
@@ -876,6 +877,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "x86-64-sse-noavx"
run_dump_test "x86-64-movbe"
run_dump_test "x86-64-movbe-intel"
+ run_dump_test "x86-64-movbe-suffix"
run_list_test "x86-64-inval-movbe" "-al"
run_dump_test "x86-64-ept"
run_dump_test "x86-64-ept-intel"
diff --git a/gas/testsuite/gas/i386/movbe-suffix.d b/gas/testsuite/gas/i386/movbe-suffix.d
new file mode 100644
index 0000000..83de18e
--- /dev/null
+++ b/gas/testsuite/gas/i386/movbe-suffix.d
@@ -0,0 +1,22 @@
+#objdump: -dwMsuffix
+#name: i386 movbe w/ suffix
+#source: movbe.s
+
+.*: file format .*
+
+Disassembly of section .text:
+
+0+ <foo>:
+[ ]*[a-f0-9]+: 66 0f 38 f0 19 movbew \(%ecx\),%bx
+[ ]*[a-f0-9]+: 0f 38 f0 19 movbel \(%ecx\),%ebx
+[ ]*[a-f0-9]+: 66 0f 38 f1 19 movbew %bx,\(%ecx\)
+[ ]*[a-f0-9]+: 0f 38 f1 19 movbel %ebx,\(%ecx\)
+[ ]*[a-f0-9]+: 66 0f 38 f0 19 movbew \(%ecx\),%bx
+[ ]*[a-f0-9]+: 0f 38 f0 19 movbel \(%ecx\),%ebx
+[ ]*[a-f0-9]+: 66 0f 38 f1 19 movbew %bx,\(%ecx\)
+[ ]*[a-f0-9]+: 0f 38 f1 19 movbel %ebx,\(%ecx\)
+[ ]*[a-f0-9]+: 66 0f 38 f0 19 movbew \(%ecx\),%bx
+[ ]*[a-f0-9]+: 0f 38 f0 19 movbel \(%ecx\),%ebx
+[ ]*[a-f0-9]+: 66 0f 38 f1 19 movbew %bx,\(%ecx\)
+[ ]*[a-f0-9]+: 0f 38 f1 19 movbel %ebx,\(%ecx\)
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-movbe-suffix.d b/gas/testsuite/gas/i386/x86-64-movbe-suffix.d
new file mode 100644
index 0000000..f6a98b1
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-movbe-suffix.d
@@ -0,0 +1,28 @@
+#objdump: -dwMsuffix
+#name: x86-64 movbe w/ suffix
+#source: x86-64-movbe.s
+
+.*: file format .*
+
+Disassembly of section .text:
+
+0+ <foo>:
+[ ]*[a-f0-9]+: 66 45 0f 38 f0 29 movbew \(%r9\),%r13w
+[ ]*[a-f0-9]+: 45 0f 38 f0 29 movbel \(%r9\),%r13d
+[ ]*[a-f0-9]+: 4d 0f 38 f0 29 movbeq \(%r9\),%r13
+[ ]*[a-f0-9]+: 66 45 0f 38 f1 29 movbew %r13w,\(%r9\)
+[ ]*[a-f0-9]+: 45 0f 38 f1 29 movbel %r13d,\(%r9\)
+[ ]*[a-f0-9]+: 4d 0f 38 f1 29 movbeq %r13,\(%r9\)
+[ ]*[a-f0-9]+: 66 45 0f 38 f0 29 movbew \(%r9\),%r13w
+[ ]*[a-f0-9]+: 45 0f 38 f0 29 movbel \(%r9\),%r13d
+[ ]*[a-f0-9]+: 4d 0f 38 f0 29 movbeq \(%r9\),%r13
+[ ]*[a-f0-9]+: 66 45 0f 38 f1 29 movbew %r13w,\(%r9\)
+[ ]*[a-f0-9]+: 45 0f 38 f1 29 movbel %r13d,\(%r9\)
+[ ]*[a-f0-9]+: 4d 0f 38 f1 29 movbeq %r13,\(%r9\)
+[ ]*[a-f0-9]+: 66 0f 38 f0 19 movbew \(%rcx\),%bx
+[ ]*[a-f0-9]+: 0f 38 f0 19 movbel \(%rcx\),%ebx
+[ ]*[a-f0-9]+: 48 0f 38 f0 19 movbeq \(%rcx\),%rbx
+[ ]*[a-f0-9]+: 66 0f 38 f1 19 movbew %bx,\(%rcx\)
+[ ]*[a-f0-9]+: 0f 38 f1 19 movbel %ebx,\(%rcx\)
+[ ]*[a-f0-9]+: 48 0f 38 f1 19 movbeq %rbx,\(%rcx\)
+#pass