[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/9779] New: indexed and indexed addressing modes are broken on p
From: |
vince at csl dot cornell dot edu |
Subject: |
[Bug gas/9779] New: indexed and indexed addressing modes are broken on pdp11-dec-aout |
Date: |
23 Jan 2009 18:28:16 -0000 |
this is a fix to a long-standing bug in gas with
pdp-dec-aout. It was reported previously
back in 2004 on this list, as problem #3 in this e-mail:
http://lists.gnu.org/archive/html/bug-binutils/2004-10/msg00002.html
The indexed and indexed addressing modes are broken.
Sample code:
main:
tstb hello_world(r0)
tstb *hello_world(r0)
hello_world: .word 0
Current binutils generates:
00000000 <main>:
0: 8bf0 0000 tstb 0(r0)
4: 8bf8 0000 tstb *0(r0)
00000008 <hello_world>:
The proper results are:
00000000 <main>:
0: 8bf0 0008 tstb 10(r0)
4: 8bf8 0008 tstb *10(r0)
00000008 <hello_world>:
Below is a patch that fixes this for me below.
The results have been tested on actual (well, emulated) pdp-11 hardware.
--- gas/config/tc-pdp11.c.orig 2009-01-23 12:33:59.000000000 -0500
+++ gas/config/tc-pdp11.c 2009-01-23 13:14:58.000000000 -0500
@@ -558,8 +558,8 @@
switch (operand->reloc.exp.X_op)
{
case O_symbol:
- operand->word = 0;
- operand->reloc.pc_rel = 1;
+ operand->reloc.type = BFD_RELOC_16;
+ operand->reloc.pc_rel = 0;
break;
case O_constant:
if ((operand->code & 7) == 7)
--
Summary: indexed and indexed addressing modes are broken on
pdp11-dec-aout
Product: binutils
Version: 2.19
Status: NEW
Severity: normal
Priority: P2
Component: gas
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: vince at csl dot cornell dot edu
CC: bug-binutils at gnu dot org
GCC target triplet: pdp11-dec-aout
http://sourceware.org/bugzilla/show_bug.cgi?id=9779
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug gas/9779] New: indexed and indexed addressing modes are broken on pdp11-dec-aout,
vince at csl dot cornell dot edu <=