aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@imgtec.com>2016-12-20 01:50:24 +0000
committerMaciej W. Rozycki <macro@imgtec.com>2016-12-20 11:49:44 +0000
commitc97dda72b905d5ba9b82004bf4e57dd4cf343147 (patch)
tree3cfc9d566a46332f58d85bf8f4aba1692f67dae3 /gas
parent95f6ac8822ecbad5530c4488ac54fd46b4c658a2 (diff)
downloadfsf-binutils-gdb-c97dda72b905d5ba9b82004bf4e57dd4cf343147.zip
fsf-binutils-gdb-c97dda72b905d5ba9b82004bf4e57dd4cf343147.tar.gz
fsf-binutils-gdb-c97dda72b905d5ba9b82004bf4e57dd4cf343147.tar.bz2
MIPS16/opcodes: Correct I64/SDRASP opcode's ISA membership
Limit the `SD ra, offset(sp)' instruction (I64/SDRASP major/minor opcode) to the MIPS III rather than MIPS I ISA. This is a 64-bit instruction requiring a 64-bit ISA. This bug has been there since forever. opcodes/ * mips16-opc.c (mips16_opcodes): Set membership to I3 rather than I1 for the SP-relative "sd"/$ra entry (SDRASP minor opcode). gas/ * testsuite/gas/mips/mips16-sdrasp.d: New test. * testsuite/gas/mips/mips16-sdrasp.l: New stderr output. * testsuite/gas/mips/mips16-sdrasp.s: New test source. * testsuite/gas/mips/mips.exp: Run the new test.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/testsuite/gas/mips/mips.exp1
-rw-r--r--gas/testsuite/gas/mips/mips16-sdrasp.d3
-rw-r--r--gas/testsuite/gas/mips/mips16-sdrasp.l2
-rw-r--r--gas/testsuite/gas/mips/mips16-sdrasp.s7
5 files changed, 20 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 571c776..1038be9 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,12 @@
2016-12-20 Maciej W. Rozycki <macro@imgtec.com>
+ * testsuite/gas/mips/mips16-sdrasp.d: New test.
+ * testsuite/gas/mips/mips16-sdrasp.l: New stderr output.
+ * testsuite/gas/mips/mips16-sdrasp.s: New test source.
+ * testsuite/gas/mips/mips.exp: Run the new test.
+
+2016-12-20 Maciej W. Rozycki <macro@imgtec.com>
+
* testsuite/gas/mips/mips.exp: Limit remaining tests that
require NewABI support to `has_newabi' targets.
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index a51c2a7..8b80200 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -1313,6 +1313,7 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "mips16-intermix"
run_dump_test "mips16-extend"
run_dump_test "mips16-sprel-swap"
+ run_dump_test "mips16-sdrasp"
run_dump_test "mips16-branch-unextended-1"
run_dump_test "mips16-branch-unextended-2"
diff --git a/gas/testsuite/gas/mips/mips16-sdrasp.d b/gas/testsuite/gas/mips/mips16-sdrasp.d
new file mode 100644
index 0000000..f82e2c6
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips16-sdrasp.d
@@ -0,0 +1,3 @@
+#name: MIPS16 SDRASP opcode with 32-bit ISA
+#as: -32 -march=mips1
+#error-output: mips16-sdrasp.l
diff --git a/gas/testsuite/gas/mips/mips16-sdrasp.l b/gas/testsuite/gas/mips/mips16-sdrasp.l
new file mode 100644
index 0000000..3e90bdd
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips16-sdrasp.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*:3: Error: opcode not supported on this processor: mips1 \(mips1\) `sd \$31,0\(\$29\)'
diff --git a/gas/testsuite/gas/mips/mips16-sdrasp.s b/gas/testsuite/gas/mips/mips16-sdrasp.s
new file mode 100644
index 0000000..306deed
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips16-sdrasp.s
@@ -0,0 +1,7 @@
+ .set mips16
+foo:
+ sd $31, 0($29)
+
+# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 4, 0
+ .space 16