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 : problem solved
- From: "Anil Paranjape" <AnilP1 at KPITCummins dot com>
- To: "Richard Sandiford" <rsandifo at redhat dot com>
- Cc: <binutils at sources dot redhat dot com>
- Date: Fri, 11 Jul 2003 12:24:32 +0530
- Subject: RE: Object dump problem for H8/300 target : problem solved
Hi Richard,
Objdump problem is tested for H8/300 target using snapshot from binutils.
It is working fine now.
Thanks for your mail.
Warm Regards,
Anil
-----Original Message-----
From: Richard Sandiford [mailto:rsandifo@redhat.com]
Sent: Tuesday, July 08, 2003 3:21 PM
To: Anil Paranjape
Cc: binutils@sources.redhat.com
Subject: Re: Object dump problem for H8/300 target
"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)
{