[PATCH] Fix ColdFire movem with disp16+reg addressing

Julian Brown julian@codesourcery.com
Tue Oct 18 10:12:00 GMT 2011


Hi,

Both assembly and disassembly of movem for ColdFire has apparently been
broken since the following patch was applied:

http://sourceware.org/ml/binutils/2011-09/msg00005.html

For assembly, the way the table entries for ColdFire moveml in
m68k-opc.c were merged meant that actual mode5 addresses (i.e.
disp16+reg, with non-zero displacement) were actually emitted as mode 7
-- i.e., with bit 1 of the mode set. That gives an illegal instruction
on ColdFire.

Disassembly of those "mode 7" moveml instructions also didn't work, nor
did disassembly of genuine mode 5 moveml instructions. This patch fixes
both problems, and adds a test case for good measure.

OK to apply?

Thanks,

Julian

ChangeLog

    opcodes/
    * m68k-opc.c (m68k_opcodes): Fix entries for ColdFire moveml.

    gas/testsuite/
    * gas/m68k/all.exp (movem-offset): Add test.
    * gas/m68k/movem-offset.s: New test.
    * gas/m68k/movem-offset.d: New.
    
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coldfire-movem-mode-fix-3.diff
Type: text/x-patch
Size: 3066 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20111018/097cb753/attachment.bin>


More information about the Binutils mailing list