aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorPaul Koning <pkoning@equallogic.com>2011-01-06 16:41:35 +0000
committerPaul Koning <pkoning@equallogic.com>2011-01-06 16:41:35 +0000
commit12505806d06803312a664d33cd05ab45067a67f1 (patch)
tree74516feba4b443ec748a383a9a69c33dd09bb3a2 /gas
parent663055845203f3a548a59ffd2849e6e1f9312799 (diff)
downloadgdb-12505806d06803312a664d33cd05ab45067a67f1.zip
gdb-12505806d06803312a664d33cd05ab45067a67f1.tar.gz
gdb-12505806d06803312a664d33cd05ab45067a67f1.tar.bz2
* config/tc-pdp11.c (parse_op_no_deferred): Allow PC-relative
references to absolute addresses.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-pdp11.c7
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/pdp11/absreloc.d15
-rw-r--r--gas/testsuite/gas/pdp11/absreloc.s26
5 files changed, 51 insertions, 7 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 257c830..3177aa5 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-06 Paul Koning <ni1d@arrl.net>
+
+ * config/tc-pdp11.c (parse_op_no_deferred): Allow PC-relative
+ references to absolute addresses.
+
2011-01-05 DJ Delorie <dj@redhat.com>
* config/tc-rx.c (tc_gen_reloc): Emit an RX_OP_NEG expression
diff --git a/gas/config/tc-pdp11.c b/gas/config/tc-pdp11.c
index 41f51bf..98e241f 100644
--- a/gas/config/tc-pdp11.c
+++ b/gas/config/tc-pdp11.c
@@ -501,8 +501,6 @@ parse_op_no_deferred (char *str, struct pdp11_code *operand)
/* label, d(rn), -(rn) */
default:
{
- char *old = str;
-
if (strncmp (str, "-(", 2) == 0) /* -(rn) */
{
str = parse_reg (str + 2, operand);
@@ -527,11 +525,6 @@ parse_op_no_deferred (char *str, struct pdp11_code *operand)
if (*str != '(')
{
- if (operand->reloc.exp.X_op != O_symbol)
- {
- operand->error = _("Label expected");
- return old;
- }
operand->code = 067;
operand->additional = 1;
operand->word = 0;
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 30545fb..d13c734 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2011-01-06 Paul Koning <ni1d@arrl.net>
+ * gas/pdp11/absreloc.s: New.
+ * gas/pdp11/absreloc.d: New.
+
+2011-01-06 Paul Koning <ni1d@arrl.net>
+
* gas/pdp11/opcode.d: Fix expected output for sec instruction.
2011-01-05 Nathan Sidwell <nathan@codesourcery.com>
diff --git a/gas/testsuite/gas/pdp11/absreloc.d b/gas/testsuite/gas/pdp11/absreloc.d
new file mode 100644
index 0000000..1a47310
--- /dev/null
+++ b/gas/testsuite/gas/pdp11/absreloc.d
@@ -0,0 +1,15 @@
+#name: pdp11 absreloc
+#objdump: -drw
+
+dump.o: file format .*
+
+
+Disassembly of section .text:
+
+00000000 <start>:
+ 0: 0bf7 fffc tst \$0 <start>
+ 4: 0bdf 0000 tst \*\$0 6: 16 \*ABS\*
+ 8: 0bf7 0008 tst \$14 <start\+0x14> a: DISP16 \*ABS\*
+ c: 0bdf 0014 tst \*\$24
+ 10: 0bf7 0000 tst \$14 <start\+0x14> 12: DISP16 \*ABS\*
+ 14: 0bdf 0014 tst \*\$24
diff --git a/gas/testsuite/gas/pdp11/absreloc.s b/gas/testsuite/gas/pdp11/absreloc.s
new file mode 100644
index 0000000..e4291f0
--- /dev/null
+++ b/gas/testsuite/gas/pdp11/absreloc.s
@@ -0,0 +1,26 @@
+# Test abs operands with relocatable modes for PDP11.
+# Copyright 2011 Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+aref = 20
+
+start: tst start
+ tst @$start
+ tst aref
+ tst @$aref
+ tst 20
+ tst @$20