This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Object dump problem for H8/300 target
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: "Anil Paranjape" <AnilP1 at KPITCummins dot com>
- Cc: <binutils at sources dot redhat dot com>
- Date: 08 Jul 2003 10:50:33 +0100
- Subject: Re: Object dump problem for H8/300 target
- References: <69595093233BB547BB70CF5E492B63F20160AFFF@sohm.kpit.com>
"Anil Paranjape" <AnilP1@KPITCummins.com> writes:
> I have found a bug in objdump utility for H8/300 target.
> My binutils version is 2.13.2.1, but same problem is also observed in binutils version 2.14 also.
> [...]
> 0: 6d f6 6d f6 mov.w r6,@-e7
> [...]
> The problem is, dump file is showing "-e7" instead of "-r7".
The attached patch should fix this for 2.14. It's no longer
a problem on trunk.
Tested on h8300-elf, no regressions. OK for branch?
Richard
* h8300-dis.c (bfd_h8_disassemble): Mask off the high bit of rd and rd
for INC and DEC operands.
Index: opcodes/h8300-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/h8300-dis.c,v
retrieving revision 1.12
diff -u -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.12 h8300-dis.c
--- opcodes/h8300-dis.c 30 Nov 2002 08:39:46 -0000 1.12
+++ opcodes/h8300-dis.c 8 Jul 2003 09:35:20 -0000
@@ -348,11 +348,11 @@ bfd_h8_disassemble (addr, info, mode)
}
else if (x & INC)
{
- fprintf (stream, "@%s+", pregnames[rs]);
+ fprintf (stream, "@%s+", pregnames[rs & 7]);
}
else if (x & DEC)
{
- fprintf (stream, "@-%s", pregnames[rd]);
+ fprintf (stream, "@-%s", pregnames[rd & 7]);
}
else if (x & IND)
{