This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] objdump target msp430
- From: "Albert Bartoszko" <albar at nt dot kegel dot com dot pl>
- To: <binutils at sources dot redhat dot com>
- Date: Tue, 23 Dec 2003 13:41:10 +0100
- Subject: [PATCH] objdump target msp430
Hi!
disassembly for this target have a bug:
echo "add &0x200, &0x172" > test.s
msp430-gcc -c test.s
objdump -D test.o:
[...]
0: 92 52 00 02 rla &0x0200 ;
4: 72 01
[...]
insted of:
[...]
0: 92 52 00 02 add &0x0200,&0x0172 ;0x0200
4: 72 01
[...]
There is simple patch:
*** binutils-031223/opcodes/msp430-dis.c.org Mon Dec 30 20:25:14 2002
--- binutils-031223/opcodes/msp430-dis.c Tue Dec 23 12:52:14 2003
***************
*** 490,496 ****
--- 490,499 ----
else if (regd == 2)
{
/* Absolute. */
+ short src;
+ src = msp430dis_opcode (addr + 4, info);
dst = msp430dis_opcode (addr + 2, info);
+ if (src != dst) return 0;
cmd_len += 4;
*cycles = 6;
sprintf (op1, "&0x%04x", PS (dst));
Albert