Skip to content

Commit

Permalink
Only decode segment register operands for i386
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Dec 27, 2023
1 parent c02087a commit c1e01b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion instructionAPI/src/x86/decoder.C
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ namespace Dyninst { namespace InstructionAPI {
if(operand.mem.base != X86_REG_INVALID) {
auto baseRegister = makeRegisterExpression(x86::translate_register(operand.mem.base, this->mode));

if(operand.mem.segment != X86_REG_INVALID) {
if(this->mode == CS_MODE_32 && operand.mem.segment != X86_REG_INVALID) {
auto segmentRegister = makeRegisterExpression(x86::translate_register(operand.mem.segment, this->mode));

/* Intel 64 and IA-32 Architectures Software Developer’s Manual
Expand Down

0 comments on commit c1e01b1

Please sign in to comment.