[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: offset calculation bug(?) in GNU as 2.13.2.1 for v850e
From: |
Alan Modra |
Subject: |
Re: offset calculation bug(?) in GNU as 2.13.2.1 for v850e |
Date: |
Mon, 14 Jul 2003 22:14:05 +0930 |
User-agent: |
Mutt/1.4i |
On Mon, Jul 14, 2003 at 07:00:04PM +0900, Miles Bader wrote:
> * This code used to assemble and work properly with GNU as from a few
> years ago (I'm not sure the exact version, as that was some weird
> release from NEC/Cygnus -- the version number given by --version is
> 2.9-v850ice-000414-nmit-20010327).
That may well have been two bugs cancelling out.
> * Oddly, all of the lines in the above example seem to be necessary --
> if I delete any of the (apparently extraneous to the bug) lines
> before the jarl/add, it starts working properly!
The following also shows the problem.
.text
start:
nop
add 3f - ., lp
nop
3:
> Any ideas?
Yes, line 2219 of tc-v850.c is always making pcrel fixups. There's
even a FIXME..
fix_new_exp (frag_now,
f - frag_now->fr_literal, 4,
& fixups[i].exp,
1 /* FIXME: V850_OPERAND_RELATIVE ??? */,
(bfd_reloc_code_real_type) (fixups[i].opindex
+ (int) BFD_RELOC_UNUSED));
As it is the code is fairly obviously wrong for the testcase. I'm not
familiar enough with v850 assembly to know whether replacing the 1 with
a 0 is correct, but that would be my guess.
--
Alan Modra
IBM OzLabs - Linux Technology Centre