objdump fails for ColdFire
Peter Barada
peter@the-baradas.com
Sat May 8 15:40:00 GMT 2004
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
More information about the Binutils
mailing list