This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
objdump fails for ColdFire
- From: Peter Barada <peter at the-baradas dot com>
- To: binutils at sources dot redhat dot com
- Date: Sat, 8 May 2004 10:43:02 -0400 (EDT)
- Subject: objdump fails for ColdFire
The simple testfile:
.text
move.l #1234,%d0
Assembles correctly, and disassemble to to followign for the default
m68k:
00000000 <.text>:
0: 203c 0000 04d2 movel #1234,%d0
But for coldfire '-mm68k:5200' it comes out as:
00000000 <.text>:
0: 203c 020074
2: 0000 00
4: Address 0x6 is out of bounds.
I think this is caused by the disassembler picking only *one* entry
out of the table and then checking the if the args match the
patterns:
{"movel", one(0020000), one(0170000), "ms%d", mcf },
{"movel", one(0020000), one(0170000), "nspd", mcf },
{"movel", one(0020000), one(0170000), "olmd", mcf },
Note that the mask and bits are the same for each pattern, its down to
the args to determine which form is valid.
To fix this I'm thinking of looping over the table for each match of
the masked opcode and if the args match, accept it.
COmments?
--
Peter Barada
peter@the-baradas.com