aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorStephen Casner <casner@acm.org>2020-05-27 18:40:38 -0700
committerStephen Casner <casner@acm.org>2020-05-27 18:40:38 -0700
commit1c912705af057b0d30ea51af46d8a00014a84034 (patch)
treec1ee20550f9f18c06ad31ae480c4440d76c3510f /gas/testsuite
parent92eb6ed1779e5bb675d99b2be472021ac0703656 (diff)
downloadgdb-1c912705af057b0d30ea51af46d8a00014a84034.zip
gdb-1c912705af057b0d30ea51af46d8a00014a84034.tar.gz
gdb-1c912705af057b0d30ea51af46d8a00014a84034.tar.bz2
Fix PR gas/26001 (pdp11-*-*)
PR gas/26001 * gas/config/tc-pdp11.c (parse_reg): Distinguish register names from symbols that begin with a register name. * gas/testsuite/gas/pdp11/pdp11.exp: Add test of such symbols. * gas/testsuite/gas/pdp11/pr26001.s: Likewise. * gas/testsuite/gas/pdp11/pr26001.d: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/pdp11/pdp11.exp1
-rw-r--r--gas/testsuite/gas/pdp11/pr26001.d12
-rw-r--r--gas/testsuite/gas/pdp11/pr26001.s9
3 files changed, 22 insertions, 0 deletions
diff --git a/gas/testsuite/gas/pdp11/pdp11.exp b/gas/testsuite/gas/pdp11/pdp11.exp
index e27dd05..65c6a05 100644
--- a/gas/testsuite/gas/pdp11/pdp11.exp
+++ b/gas/testsuite/gas/pdp11/pdp11.exp
@@ -23,4 +23,5 @@ if [expr [istarget "pdp11-*-*"]] then {
run_dump_test "absreloc"
run_dump_test "pr14480"
run_dump_test "pr23481"
+ run_dump_test "pr26001"
}
diff --git a/gas/testsuite/gas/pdp11/pr26001.d b/gas/testsuite/gas/pdp11/pr26001.d
new file mode 100644
index 0000000..a6ccdef
--- /dev/null
+++ b/gas/testsuite/gas/pdp11/pr26001.d
@@ -0,0 +1,12 @@
+#name: PR 26001 - distinguish register names from symbols
+#objdump: -dw
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+00 <start>:
+[ ]+0:[ ]+09f7 fffc[ ]+jsr[ ]+pc, 0 <start>
+[ ]+4:[ ]+1037 0004[ ]+mov[ ]+r0, \$c <space>
+[ ]+8:[ ]+1dc1 0002[ ]+mov[ ]+\$e <r00f>, r1
+#pass
diff --git a/gas/testsuite/gas/pdp11/pr26001.s b/gas/testsuite/gas/pdp11/pr26001.s
new file mode 100644
index 0000000..44faa14
--- /dev/null
+++ b/gas/testsuite/gas/pdp11/pr26001.s
@@ -0,0 +1,9 @@
+ .text
+ .globl sprintf
+start: jsr pc,sprintf
+ mov r0,space
+ mov r00f,r1
+ .data
+space: .word 0
+r00f: .word 0
+ .end