* config/tc-pdp11.c (parse_op_no_deferred): Allow PC-relative
references to absolute addresses.
This commit is contained in:
parent
6630558452
commit
12505806d0
@ -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
|
||||
|
@ -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;
|
||||
|
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
15
gas/testsuite/gas/pdp11/absreloc.d
Normal file
15
gas/testsuite/gas/pdp11/absreloc.d
Normal file
@ -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
|
26
gas/testsuite/gas/pdp11/absreloc.s
Normal file
26
gas/testsuite/gas/pdp11/absreloc.s
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user