diff --git a/libIRDB/src/core/decode_cs.cpp b/libIRDB/src/core/decode_cs.cpp index f129fd79a71a0105611c789adcea00c4ca03c3c1..f4ab66a9db4df87c3801b4251b50e7efdb5be9ea 100644 --- a/libIRDB/src/core/decode_cs.cpp +++ b/libIRDB/src/core/decode_cs.cpp @@ -595,6 +595,11 @@ virtual_offset_t DecodedInstructionCapstone_t::getMemoryDisplacementOffset(const const auto imm=getImmediate(); const auto disp=t.getMemoryDisplacement(); + if(string((char*)the_insn->detail->x86.opcode)=="\x0f\xc2") // CMPPD, CMPSS + { + return the_insn->size - disp_size - 1; // last byte encodes an immediate value to distinguish pseudo-ops + } + if(imm_count==0) return the_insn->size - disp_size;