From 071ad7f0e0b2c5d80f3c5ff6c9e7aff19808eae1 Mon Sep 17 00:00:00 2001 From: "J.T. Conklin" Date: Fri, 24 Jan 1997 20:14:26 +0000 Subject: [PATCH] * m68k-opc.c (m68k_opcodes): Changed operand specifier for the coldfire moveb instruction to not allow an address register as destination. Although the documentation does not indicate that this is invalid, experiments uncovered unexpected behavior. Added a comment explaining the situation. Thanks to Andreas Schwab for pointing this out to me. --- opcodes/ChangeLog | 9 +++++++++ opcodes/m68k-opc.c | 19 ++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 95e3fb279af..82ca249f97d 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,12 @@ +Fri Jan 24 12:08:21 1997 J.T. Conklin + + * m68k-opc.c (m68k_opcodes): Changed operand specifier for the + coldfire moveb instruction to not allow an address register as + destination. Although the documentation does not indicate that + this is invalid, experiments uncovered unexpected behavior. + Added a comment explaining the situation. Thanks to Andreas + Schwab for pointing this out to me. + start-sanitize-tic80 Wed Jan 22 20:13:51 1997 Fred Fish diff --git a/opcodes/m68k-opc.c b/opcodes/m68k-opc.c index 6c5716a47a1..4a9220fbd68 100644 --- a/opcodes/m68k-opc.c +++ b/opcodes/m68k-opc.c @@ -1230,6 +1230,23 @@ const struct m68k_opcode m68k_opcodes[] = {"lsrl", one(0160210), one(0170770), "QdDs", m68000up | mcf5200 }, {"lsrl", one(0160250), one(0170770), "DdDs", m68000up | mcf5200 }, +/* NOTE: The mcf5200 family programmer's reference manual does not + indicate the byte form of the movea instruction is invalid (as it + is on 68000 family cpus). However, experiments on the 5202 yeild + unexpected results. The value is copied, but it is not sign extended + (as is done with movea.w) and the top three bytes in the address + register are not disturbed. I don't know if this is the intended + behavior --- it could be a hole in instruction decoding (Motorola + decided not to trap all invalid instructions for performance reasons) + --- but I suspect that it is not. + + I reported this to Motorola ISD Technical Communications Support, + which replied that other coldfire assemblers reject movea.b. For + this reason I've decided to not allow moveab. + + jtc@cygnus.com - 97/01/24 + */ + {"moveal", one(0020100), one(0170700), "*lAd", m68000up | mcf5200 }, {"moveaw", one(0030100), one(0170700), "*wAd", m68000up | mcf5200 }, @@ -1268,7 +1285,7 @@ const struct m68k_opcode m68k_opcodes[] = /* The move opcode can generate the movea and moveq instructions. */ {"moveb", one(0010000), one(0170000), ";b$d", m68000up }, -{"moveb", one(0010000), one(0170000), "ms%d", mcf5200 }, +{"moveb", one(0010000), one(0170000), "ms$d", mcf5200 }, {"moveb", one(0010000), one(0170000), "nspd", mcf5200 }, {"moveb", one(0010000), one(0170000), "obmd", mcf5200 }, -- 2.30.2