Skip to content

Fix #296: Fix disassembly of MOVD instruction

Raymond Toy requested to merge issue-296-fix-movd-disassembly into master

It's not really clear why this is happening in some cases. When it does happen, the destination register is a general purpose register.

To fix this, define a new argument type, word-reg/mem that is just like reg/mem, but calls print-word-reg/mem instead of print-reg/mem. The new function print-word-reg/mem calls print-word-reg to print the register instead of print-reg.

To minimize the impact of this change, only use this new type in the movd instruction when the source is an xmm register.

Tested this by disassembling the xoroshiro-update assembly routine and a few other random functions that use movd, like single-float-bits and make-single-float.

Merge request reports

Loading