aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2016-01-08 11:38:00 +0100
committerAndreas Schwab <schwab@linux-m68k.org>2016-01-08 11:42:10 +0100
commit83c3256ef5afe10625fd55dda2df5fc56b9b7393 (patch)
tree5a00903aaff4ac87e1b440fc5983d6dc47eb6e14 /gas
parent109575d7ebac21a0eb67980001ecd4173d696f88 (diff)
downloadgdb-83c3256ef5afe10625fd55dda2df5fc56b9b7393.zip
gdb-83c3256ef5afe10625fd55dda2df5fc56b9b7393.tar.gz
gdb-83c3256ef5afe10625fd55dda2df5fc56b9b7393.tar.bz2
m68k: fix constraints of move.[bw] for ISA_B/C
For ISA_B/C only the combination #,d(An) is allowed in addition to the ISA_A combinations for move.b and move.w (and pc-relative is never allowed as destination). opcodes/ PR gas/13050 * m68k-opc.c (moveb, movew): For ISA_B/C only allow #,d(An) in addition to ISA_A. gas/ PR gas/13050 * testsuite/gas/m68k/all.exp: Add tests p13050-1 and p13050-2. * testsuite/gas/m68k/p13050-1.s: New file. * testsuite/gas/m68k/p13050-2.d: New file. * testsuite/gas/m68k/p13050-2.s: New file.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/testsuite/gas/m68k/all.exp3
-rw-r--r--gas/testsuite/gas/m68k/p13050-1.s2
-rw-r--r--gas/testsuite/gas/m68k/p13050-2.d11
-rw-r--r--gas/testsuite/gas/m68k/p13050-2.s3
5 files changed, 27 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 8e8a79c..509dc96 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,11 @@
+2016-01-08 Andreas Schwab <schwab@linux-m68k.org>
+
+ PR gas/13050
+ * testsuite/gas/m68k/all.exp: Add tests p13050-1 and p13050-2.
+ * testsuite/gas/m68k/p13050-1.s: New file.
+ * testsuite/gas/m68k/p13050-2.d: New file.
+ * testsuite/gas/m68k/p13050-2.s: New file.
+
2016-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
* testsuite/gas/arc/adc.d: Add 'R_' prefix to relocation names.
diff --git a/gas/testsuite/gas/m68k/all.exp b/gas/testsuite/gas/m68k/all.exp
index 2f7a655..ace776f 100644
--- a/gas/testsuite/gas/m68k/all.exp
+++ b/gas/testsuite/gas/m68k/all.exp
@@ -90,6 +90,9 @@ if { [istarget m68*-*-*] || [istarget fido*-*-*] } then {
gas_test_error "p11673.s" "-march=isab" "movel immediate with offset unsupported on isab"
+ gas_test_error "p13050-1.s" "-march=isab" "moveb (d8,An,Xi),(d16,An) unsupported on isab"
+ run_dump_test p13050-2
+
if { [istarget *-*-*aout] || [istarget *-*-netbsd] || [istarget *-*-openbsd*] } then {
run_dump_test p3041
run_dump_test p3041data
diff --git a/gas/testsuite/gas/m68k/p13050-1.s b/gas/testsuite/gas/m68k/p13050-1.s
new file mode 100644
index 0000000..7750eab
--- /dev/null
+++ b/gas/testsuite/gas/m68k/p13050-1.s
@@ -0,0 +1,2 @@
+# The following addressing mode is forbidden even on isab or higher (PR13050)
+ move.b (2,%a0,%d0.l),1(%a1)
diff --git a/gas/testsuite/gas/m68k/p13050-2.d b/gas/testsuite/gas/m68k/p13050-2.d
new file mode 100644
index 0000000..cedcdc6
--- /dev/null
+++ b/gas/testsuite/gas/m68k/p13050-2.d
@@ -0,0 +1,11 @@
+#name: p13050-2.d
+#objdump: -dr
+#as: -march=isab
+
+.*: file format .*
+
+Disassembly of section .text:
+
+0+ <.*>:
+ 0: 137c 0005 0001 moveb #5,%a1@\(1\)
+ 6: 337c 0005 0001 movew #5,%a1@\(1\)
diff --git a/gas/testsuite/gas/m68k/p13050-2.s b/gas/testsuite/gas/m68k/p13050-2.s
new file mode 100644
index 0000000..191954f
--- /dev/null
+++ b/gas/testsuite/gas/m68k/p13050-2.s
@@ -0,0 +1,3 @@
+# Test that #,(d16,An) is accepted on ISA_B with move.[bw]
+ move.b #5,1(%a1)
+ move.w #5,1(%a1)