AnsweredAssumed Answered

Question on MOVE Instruction Behavior

Question asked by Dan Filbey on Mar 3, 2020
Latest reply on Mar 6, 2020 by TomE

My question is: How do the MOVE.B or MOVE.W instructions behave when the source is a byte or word, but the destination is a long register (e.g. D0)?

 

For example, Figure 1 describes memory contents before a MOVE.B:

Assuming the instruction is something like: MOVE.B (A0), D0  ; Move indirect byte at A0 into D0

Does the execution of the instruction perform the behavior described in Figure 2 or Figure 3:

 

 

 

For either answer, where does a datasheet describe the behavior? The descriptions of MOVEQ, MOV3Q, and MOVEA in the CFPRM (https://www.nxp.com/docs/en/reference-manual/CFPRM.pdf) match Figure 3, but the description for MOVE (PDF pg. 123 or printed pg. 4-47) is not clear on its behavior.

 

Edit: Followup question if Figure 3 is correct: Would the 0xAA value be sign-extended to 0xFFFFFFAA?

Outcomes