aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2020-06-26 16:42:55 +0200
committerJan Beulich <jbeulich@suse.com>2020-06-26 16:42:55 +0200
commit2a1bb84c67d974b10f2ea76f8ed43244f19ed21e (patch)
tree2325a9a4109ea5199526833165a56fb365ad81dc /gas
parentf53b3eeb677aace413d45b4b3c9d23d57d7167fc (diff)
downloadgdb-2a1bb84c67d974b10f2ea76f8ed43244f19ed21e.zip
gdb-2a1bb84c67d974b10f2ea76f8ed43244f19ed21e.tar.gz
gdb-2a1bb84c67d974b10f2ea76f8ed43244f19ed21e.tar.bz2
x86: fix processing of -M disassembler option
Multiple -M options can be specified in any order. Therefore stright assignment to fields affected needs to be avoided, such that earlier options' effects won't be discarded. This was in particular a problem for -Msuffix followed by certain of the other sub-options. While updating documentation, take the liberty and also drop the redundant mentioning of being able to comma-separate multiple options.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/testsuite/gas/i386/i386.exp1
-rw-r--r--gas/testsuite/gas/i386/nop-1-suffix.d60
3 files changed, 66 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index f60fde6..3ad1394 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-26 Jan Beulich <jbeulich@suse.com>
+
+ * testsuite/gas/i386/nop-1-suffix.d: New.
+ * testsuite/gas/i386/i386.exp: Run new test.
+
2020-06-26 Pat Bernardi <bernardi@adacore.com>
* config/tc-m68k.c (m68k_elf_gnu_attribute): New function.
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index e567633..6bee5fc 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -502,6 +502,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_dump_test "align-1b"
run_list_test "inval-pseudo" "-al"
run_dump_test "nop-1"
+ run_dump_test "nop-1-suffix"
run_dump_test "nop-2"
run_dump_test "optimize-1"
run_dump_test "optimize-1a"
diff --git a/gas/testsuite/gas/i386/nop-1-suffix.d b/gas/testsuite/gas/i386/nop-1-suffix.d
new file mode 100644
index 0000000..f9f09fe
--- /dev/null
+++ b/gas/testsuite/gas/i386/nop-1-suffix.d
@@ -0,0 +1,60 @@
+#objdump: -dwMsuffix,i386
+#name: i386 .nops 1 w/ suffix and forced arch
+#source: nop-1.s
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <single>:
+ +[a-f0-9]+: 90 nop
+
+0+1 <pseudo_1>:
+ +[a-f0-9]+: 90 nop
+
+0+2 <pseudo_8>:
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 90 nop
+
+0+a <pseudo_8_4>:
+ +[a-f0-9]+: 8d 74 26 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d 74 26 00 leal 0x0\(%esi,%eiz,1\),%esi
+
+0+12 <pseudo_20>:
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b6 00 00 00 00 leal 0x0\(%esi\),%esi
+
+0+26 <pseudo_30>:
+ +[a-f0-9]+: eb 1c jmp 44 <pseudo_129>
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+
+0+44 <pseudo_129>:
+ +[a-f0-9]+: eb 7f jmp c5 <end>
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 8d b4 26 00 00 00 00 leal 0x0\(%esi,%eiz,1\),%esi
+ +[a-f0-9]+: 90 nop
+
+0+c5 <end>:
+ +[a-f0-9]+: 31 c0 xorl %eax,%eax
+#pass