When disassemble asm code vcmpnlesd %xmm2,%xmm0,%xmm3, whose machine codes are \xc5\xfb\xc2\xda\x06, capstone got a wrong opcode 804(X86_INS_VCOMPRESSPD in x86.h enum x86_insn).
The origin opcode is 797(X86_INS_VCMP in x86.h enum x86_insn), while is adjusted to 804 in cs_disasm function. The displacement(7) is from printSSEAVXCC.
We can reproduce the problem by disassemble \xc5\xfb\xc2\xda\x06 machine codes alonely by capstone. Such as code snippets below:
When disassemble asm code
vcmpnlesd %xmm2,%xmm0,%xmm3
, whose machine codes are\xc5\xfb\xc2\xda\x06
, capstone got a wrong opcode 804(X86_INS_VCOMPRESSPD in x86.henum x86_insn
).The origin opcode is 797(X86_INS_VCMP in x86.h
enum x86_insn
), while is adjusted to 804 in cs_disasm function. The displacement(7) is from printSSEAVXCC.We can reproduce the problem by disassemble
\xc5\xfb\xc2\xda\x06
machine codes alonely by capstone. Such as code snippets below:Compiling with
gcc test.c -I include/capstone/ -L. -lcapstone
and run with./a.out
, the output isopcode: 804, mnemonic: vcmpnlesd
.