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.exp2
-rw-r--r--binutils/testsuite/binutils-all/mips/mips16-alias.d15
-rw-r--r--binutils/testsuite/binutils-all/mips/mips16-alias.s20
-rw-r--r--binutils/testsuite/binutils-all/mips/mips16-noalias.d16
5 files changed, 60 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index eb540fa..d5b515f 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,10 @@
+2017-04-25 Maciej W. Rozycki <macro@imgtec.com>
+
+ * testsuite/binutils-all/mips/mips16-alias.d: New test.
+ * testsuite/binutils-all/mips/mips16-noalias.d: New test.
+ * testsuite/binutils-all/mips/mips16-alias.s: New test source.
+ * testsuite/binutils-all/mips/mips.exp: Run the new tests.
+
2017-04-23 Alan Modra <amodra@gmail.com>
PR 21418
diff --git a/binutils/testsuite/binutils-all/mips/mips.exp b/binutils/testsuite/binutils-all/mips/mips.exp
index 255d4f7..672515c 100644
--- a/binutils/testsuite/binutils-all/mips/mips.exp
+++ b/binutils/testsuite/binutils-all/mips/mips.exp
@@ -30,4 +30,6 @@ if [is_elf_format] {
run_dump_test "mips16-pcrel"
run_dump_test "mips16-extend-noinsn"
run_dump_test "mips16-extend-insn"
+ run_dump_test "mips16-alias"
+ run_dump_test "mips16-noalias"
}
diff --git a/binutils/testsuite/binutils-all/mips/mips16-alias.d b/binutils/testsuite/binutils-all/mips/mips16-alias.d
new file mode 100644
index 0000000..875615b
--- /dev/null
+++ b/binutils/testsuite/binutils-all/mips/mips16-alias.d
@@ -0,0 +1,15 @@
+#PROG: objcopy
+#objdump: -d --prefix-addresses --show-raw-insn
+#name: MIPS16 instruction alias disassembly
+#as: -32 -mips3
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> 0a08 la v0,00000020 <bar>
+[0-9a-f]+ <[^>]*> b207 lw v0,00000020 <bar>
+[0-9a-f]+ <[^>]*> fe47 dla v0,00000020 <bar>
+[0-9a-f]+ <[^>]*> fc43 ld v0,00000020 <bar>
+ \.\.\.
+ \.\.\.
diff --git a/binutils/testsuite/binutils-all/mips/mips16-alias.s b/binutils/testsuite/binutils-all/mips/mips16-alias.s
new file mode 100644
index 0000000..bda4f9e
--- /dev/null
+++ b/binutils/testsuite/binutils-all/mips/mips16-alias.s
@@ -0,0 +1,20 @@
+ .text
+ .set mips16
+ .ent foo
+foo:
+ nop
+ la $2, bar
+ lw $2, bar
+ dla $2, bar
+ ld $2, bar
+ .set nomips16
+ .end foo
+
+# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 4, 0
+ .space 16
+
+ .type bar, @object
+bar:
+ .long 0
+ .size bar, . - bar
diff --git a/binutils/testsuite/binutils-all/mips/mips16-noalias.d b/binutils/testsuite/binutils-all/mips/mips16-noalias.d
new file mode 100644
index 0000000..76f61bd
--- /dev/null
+++ b/binutils/testsuite/binutils-all/mips/mips16-noalias.d
@@ -0,0 +1,16 @@
+#PROG: objcopy
+#objdump: -M no-aliases -d --prefix-addresses --show-raw-insn
+#name: MIPS16 canonical alias disassembly
+#as: -32 -mips3
+#source: mips16-alias.s
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 6500 move zero,s0
+[0-9a-f]+ <[^>]*> 0a08 addiu v0,\$pc,32
+[0-9a-f]+ <[^>]*> b207 lw v0,28\(\$pc\)
+[0-9a-f]+ <[^>]*> fe47 daddiu v0,\$pc,28
+[0-9a-f]+ <[^>]*> fc43 ld v0,24\(\$pc\)
+ \.\.\.
+ \.\.\.