Capstone correctly identifies that the LOCK prefix (0xf0) is incompatible with the movzx instruction. It also has no problem with the REPNE/REPNZ prefix (0xf2). However, it fails to recognize that the prefixes 0xf2 and 0xf0 are mutually exclusive and cannot appear together in a single instruction. In contrast, both XED and Zydis disassemblers return an 'invalid assembly code' error for the sequence 0xf0, 0xf2, 0x41, 0x0f, 0xb7, 0xd6
Work environment
git clone
, default onnext
branch.Instruction bytes giving faulty results
Expected results
It should be:
Steps to get the wrong result
With
cstool
:Additional Logs, screenshots, source code, configuration dump, ...
Capstone correctly identifies that the
LOCK
prefix (0xf0) is incompatible with themovzx
instruction. It also has no problem with theREPNE/REPNZ
prefix (0xf2). However, it fails to recognize that the prefixes0xf2
and0xf0
are mutually exclusive and cannot appear together in a single instruction. In contrast, both XED and Zydis disassemblers return an 'invalid assembly code' error for the sequence0xf0, 0xf2, 0x41, 0x0f, 0xb7, 0xd6