Skip to content

Fix #95: Fix disassembly for je and movzx/movsx instructions

Raymond Toy requested to merge issue-95-fix-disassem-syntax into master

We were printing jeq for the branch on equal instruction, but it should be je. This is fixed by changing the order of the options in the defconstant conditions. The first in the list is the preferred value, so we can write je, jeq, or jz, but these will all get printed out as je instead of the previous jeq.

For movzx and movsx, we need to specify the size of the memory object to match Intel syntax. This is done by changing the reg/mem slot of the ext-reg-reg/mem format so that the reg/mem field has type sized-reg/mem instead of just reg/mem.

Also for consistency, we might as well make other uses of reg-reg/mem use sized-reg-mem so that memory pointers use a size. But we don't want that for the LEA instruction since we're not accessing memory. objdump doesn't print any size for the LEA instruction either.

Finally, we just added a note that the break instruction is really the int3 instruction. I don't know why it's called break instead of int3.

Edited by Raymond Toy

Merge request reports