aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
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/mixed-mips16-micromips.d30
-rw-r--r--binutils/testsuite/binutils-all/mips/mixed-mips16-micromips.s32
4 files changed, 70 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 6eb3fa7..c4bb34e 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,10 @@
+2016-05-18 Maciej W. Rozycki <macro@imgtec.com>
+
+ * testsuite/binutils-all/mips/mixed-mips16-micromips.d: New test.
+ * testsuite/binutils-all/mips/mixed-mips16-micromips.s: New test
+ source.
+ * testsuite/binutils-all/mips/mips.exp: Run the new test.
+
2016-05-18 Nick Clifton <nickc@redhat.com>
* po/sv.po: Updated Swedish translation.
diff --git a/binutils/testsuite/binutils-all/mips/mips.exp b/binutils/testsuite/binutils-all/mips/mips.exp
index 5c93959..4dab9a6 100644
--- a/binutils/testsuite/binutils-all/mips/mips.exp
+++ b/binutils/testsuite/binutils-all/mips/mips.exp
@@ -22,5 +22,6 @@ if ![istarget mips*-*-*] {
if [is_elf_format] {
run_dump_test "mixed-mips16"
run_dump_test "mixed-micromips"
+ run_dump_test "mixed-mips16-micromips"
run_dump_test "mips16-undecoded"
}
diff --git a/binutils/testsuite/binutils-all/mips/mixed-mips16-micromips.d b/binutils/testsuite/binutils-all/mips/mixed-mips16-micromips.d
new file mode 100644
index 0000000..4a53dfb
--- /dev/null
+++ b/binutils/testsuite/binutils-all/mips/mixed-mips16-micromips.d
@@ -0,0 +1,30 @@
+#PROG: objcopy
+#objdump: -drt
+#name: Mixed MIPS16 and microMIPS disassembly
+
+# Test mixed-mode compressed disassembly.
+
+.*: +file format .*mips.*
+
+SYMBOL TABLE:
+#...
+[0-9a-f]+ g +F +\.text 0+00000c 0xf0 foo
+#...
+[0-9a-f]+ g +F +\.text 0+00000c 0x80 bar
+
+Disassembly of section \.text:
+[0-9a-f]+ <foo>:
+ +[0-9a-f]+: b202 lw v0,8 <\.foo\.data>
+ +[0-9a-f]+: 9a60 lw v1,0\(v0\)
+ +[0-9a-f]+: eb00 jr v1
+ +[0-9a-f]+: 653b move t9,v1
+
+[0-9a-f]+ <\.foo\.data>:
+ +[0-9a-f]+: 4040 4040 0000 0000 @@@@\.\.\.\.
+
+[0-9a-f]+ <bar>:
+ +[0-9a-f]+: 41a3 0000 lui v1,0x0
+ +[0-9a-f]+: ff23 0000 lw t9,0\(v1\)
+ +[0-9a-f]+: 45b9 jrc t9
+ +[0-9a-f]+: 0c00 nop
+ \.\.\.
diff --git a/binutils/testsuite/binutils-all/mips/mixed-mips16-micromips.s b/binutils/testsuite/binutils-all/mips/mixed-mips16-micromips.s
new file mode 100644
index 0000000..07dcceb
--- /dev/null
+++ b/binutils/testsuite/binutils-all/mips/mixed-mips16-micromips.s
@@ -0,0 +1,32 @@
+ .align 4, 0
+ .set mips16
+ .globl foo
+ .ent foo
+foo:
+ lw $v0, .foo.data
+ lw $v1, 0($v0)
+ move $t9, $v1
+ jr $v1
+
+ .type .foo.data, @object
+.foo.data:
+ .word 0x40404040
+ .size .foo.data, . - .foo.data
+ .end foo
+ .set nomips16
+
+ .align 4, 0
+ .set micromips
+ .globl bar
+ .ent bar
+bar:
+ lui $v1, 0
+ lw $t9, 0($v1)
+ jrc $t9
+ nop
+ .end bar
+ .set nomicromips
+
+# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 4, 0
+ .space 16