This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Patch H8/300 : Objdump bug for plain H8/300 target
- From: Nick Clifton <nickc at redhat dot com>
- To: Anil Paranjape <AnilP1 at KPITCummins dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 13 Apr 2004 17:19:22 +0100
- Subject: Re: Patch H8/300 : Objdump bug for plain H8/300 target
- References: <69595093233BB547BB70CF5E492B63F204EC69AE@sohm.kpit.com>
Hi Anil,
ChangeLog
2004-06-04 Anil Paranjpe <anilp1@kpitcummins.com>
opcodes/h8300-dis.c (bfd_h8_disassemble) : Treat "adds" & "subs" separately.
That patch does work, but it is a bit heavy handed. Please could you
try out this alternative patch which just alters the settings in the
h8300.h header file so that the "adds" and "subs" instructions are
displayed using the non-extended registers. If it works for you, please
let me know and I will apply it.
Cheers
Nick
Index: include/opcode/h8300.h
===================================================================
RCS file: /cvs/src/src/include/opcode/h8300.h,v
retrieving revision 1.22
diff -c -3 -p -r1.22 h8300.h
*** include/opcode/h8300.h 9 Feb 2004 12:15:57 -0000 1.22
--- include/opcode/h8300.h 13 Apr 2004 16:09:00 -0000
*************** struct h8_opcode h8_opcodes[] =
*** 1206,1212 ****
{O (O_ADD, SL), AV_H8SX, 0, "add.l", {{IMM3NZ_NS, RD32, E}}, {{0x0, 0xa, B31 | IMM3NZ, B31 | RD32, E}}},
EXPAND_TWOOP_L (O (O_ADD, SL), "add.l", 0x1),
! {O (O_ADDS, SL), AV_H8, 2, "adds", {{KBIT, RDP, E}}, {{0x0, 0xB,KBIT, RDP, E}}},
{O (O_ADDX, SB), AV_H8, 2, "addx", {{IMM8, RD8, E}}, {{0x9, RD8, IMM8LIST, E}}},
{O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{IMM8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0x9, IGNORE, IMM8LIST, E}}},
--- 1206,1212 ----
{O (O_ADD, SL), AV_H8SX, 0, "add.l", {{IMM3NZ_NS, RD32, E}}, {{0x0, 0xa, B31 | IMM3NZ, B31 | RD32, E}}},
EXPAND_TWOOP_L (O (O_ADD, SL), "add.l", 0x1),
! {O (O_ADDS, SL), AV_H8, 2, "adds", {{KBIT, RD16, E}}, {{0x0, 0xB,KBIT, RDP, E}}},
{O (O_ADDX, SB), AV_H8, 2, "addx", {{IMM8, RD8, E}}, {{0x9, RD8, IMM8LIST, E}}},
{O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{IMM8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0x9, IGNORE, IMM8LIST, E}}},
*************** struct h8_opcode h8_opcodes[] =
*** 1828,1834 ****
{O (O_SUB, SL), AV_H8SX, 0, "sub.l", {{IMM3NZ_NS, RD32, E}}, {{0x1, 0xa, B31 | IMM3NZ, B31 | RD32, E}}},
EXPAND_TWOOP_L (O (O_SUB, SL), "sub.l", 0x3),
! {O (O_SUBS, SL), AV_H8, 2, "subs", {{KBIT, RDP, E}}, {{0x1, 0xB,KBIT, RDP, E}}},
{O (O_SUBX, SB), AV_H8, 2, "subx", {{IMM8, RD8, E}}, {{0xb, RD8, IMM8LIST, E}}},
{O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{IMM8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0xb, IGNORE, IMM8LIST, E}}},
--- 1828,1834 ----
{O (O_SUB, SL), AV_H8SX, 0, "sub.l", {{IMM3NZ_NS, RD32, E}}, {{0x1, 0xa, B31 | IMM3NZ, B31 | RD32, E}}},
EXPAND_TWOOP_L (O (O_SUB, SL), "sub.l", 0x3),
! {O (O_SUBS, SL), AV_H8, 2, "subs", {{KBIT, RD16, E}}, {{0x1, 0xB,KBIT, RDP, E}}},
{O (O_SUBX, SB), AV_H8, 2, "subx", {{IMM8, RD8, E}}, {{0xb, RD8, IMM8LIST, E}}},
{O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{IMM8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0xb, IGNORE, IMM8LIST, E}}},