aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@imgtec.com>2016-12-09 22:27:00 +0000
committerMaciej W. Rozycki <macro@imgtec.com>2016-12-09 23:18:06 +0000
commit55af478400524cba7994e353fd9a98ef1543df2f (patch)
treeec2194cbeaf5733b21fc26a20d2d6d82b37d6339 /binutils
parent1736a7bd96e8927c3f889a35f9153df4fd19d833 (diff)
downloadgdb-55af478400524cba7994e353fd9a98ef1543df2f.zip
gdb-55af478400524cba7994e353fd9a98ef1543df2f.tar.gz
gdb-55af478400524cba7994e353fd9a98ef1543df2f.tar.bz2
MIPS16/opcodes: Reformat raw EXTEND and undecoded output
Use a tab rather than a space to separate `extend' and its uninterpreted argument output, like with regular instructions. Separate hexadecimal halves of undecoded extended instructions output with a space instead of presenting them concatenated. opcodes/ * mips-dis.c (print_insn_mips16): Use a tab rather than a space to separate `extend' and its uninterpreted argument output. Separate hexadecimal halves of undecoded extended instructions output. binutils/ * testsuite/binutils-all/mips/mips16-extend-noinsn.d: New test. * testsuite/binutils-all/mips/mips16-extend-noinsn.s: New test source. * testsuite/binutils-all/mips/mips.exp: Run the new test.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog7
-rw-r--r--binutils/testsuite/binutils-all/mips/mips.exp1
-rw-r--r--binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.d33
-rw-r--r--binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.s25
4 files changed, 66 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index f41e4ff..9d5c119 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,10 @@
+2016-12-09 Maciej W. Rozycki <macro@imgtec.com>
+
+ * testsuite/binutils-all/mips/mips16-extend-noinsn.d: New test.
+ * testsuite/binutils-all/mips/mips16-extend-noinsn.s: New test
+ source.
+ * testsuite/binutils-all/mips/mips.exp: Run the new test.
+
2016-12-08 Maciej W. Rozycki <macro@imgtec.com>
* testsuite/binutils-all/mips/mips16-pcrel.d: New test.
diff --git a/binutils/testsuite/binutils-all/mips/mips.exp b/binutils/testsuite/binutils-all/mips/mips.exp
index 5dc872d..f3d956f 100644
--- a/binutils/testsuite/binutils-all/mips/mips.exp
+++ b/binutils/testsuite/binutils-all/mips/mips.exp
@@ -25,4 +25,5 @@ if [is_elf_format] {
run_dump_test "mixed-mips16-micromips"
run_dump_test "mips16-undecoded"
run_dump_test "mips16-pcrel"
+ run_dump_test "mips16-extend-noinsn"
}
diff --git a/binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.d b/binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.d
new file mode 100644
index 0000000..5694de6
--- /dev/null
+++ b/binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.d
@@ -0,0 +1,33 @@
+#PROG: objcopy
+#objdump: -d --prefix-addresses --show-raw-insn
+#name: MIPS16 unsupported EXTEND and undefined opcode disassembly
+#as: -32
+
+# Verify raw hexadecimal EXTEND and inexistent opcode disassembly.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> f123 extend 0x123
+[0-9a-f]+ <[^>]*> f456 extend 0x456
+[0-9a-f]+ <[^>]*> f765 extend 0x765
+[0-9a-f]+ <[^>]*> 1800 0000 jal 00000000 <foo>
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> f432 extend 0x432
+[0-9a-f]+ <[^>]*> 1c00 0000 jalx 00000000 <foo>
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> f123 6621 0xf123 0x6621
+[0-9a-f]+ <[^>]*> f456 e935 0xf456 0xe935
+[0-9a-f]+ <[^>]*> f765 ea60 0xf765 0xea60
+[0-9a-f]+ <[^>]*> f432 ece0 0xf432 0xece0
+[0-9a-f]+ <[^>]*> f5aa e971 0xf5aa 0xe971
+[0-9a-f]+ <[^>]*> f655 ebf1 0xf655 0xebf1
+[0-9a-f]+ <[^>]*> 6621 0x6621
+[0-9a-f]+ <[^>]*> e935 0xe935
+[0-9a-f]+ <[^>]*> ea60 0xea60
+[0-9a-f]+ <[^>]*> ece0 0xece0
+[0-9a-f]+ <[^>]*> e971 0xe971
+[0-9a-f]+ <[^>]*> ebf1 0xebf1
+[0-9a-f]+ <[^>]*> 6500 nop
+ \.\.\.
diff --git a/binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.s b/binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.s
new file mode 100644
index 0000000..252cacf
--- /dev/null
+++ b/binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.s
@@ -0,0 +1,25 @@
+ .set mips16
+foo:
+ nop
+ .half 0xf123, 0xf456
+ .half 0xf765
+ jal bar
+ .half 0xf432
+ jalx baz
+ .half 0xf123, 0x6621
+ .half 0xf456, 0xe935
+ .half 0xf765, 0xea60
+ .half 0xf432, 0xece0
+ .half 0xf5aa, 0xe971
+ .half 0xf655, 0xebf1
+ .half 0x6621
+ .half 0xe935
+ .half 0xea60
+ .half 0xece0
+ .half 0xe971
+ .half 0xebf1
+ nop
+
+# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 4, 0
+ .space 16