Skip to content

Commit

Permalink
x86: handle f2/f3 prefix for 16bit. see issue capstone-engine#452
Browse files Browse the repository at this point in the history
  • Loading branch information
aquynh committed May 7, 2017
1 parent 64328e3 commit 2b84c0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/X86/X86DisassemblerDecoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1246,9 +1246,9 @@ static int getID(struct InternalInstruction *insn)
attrMask |= ATTR_OPSIZE;
} else if (isPrefixAtLocation(insn, 0x67, insn->necessaryPrefixLocation)) {
attrMask |= ATTR_ADSIZE;
} else if (isPrefixAtLocation(insn, 0xf3, insn->necessaryPrefixLocation)) {
} else if (insn->mode != MODE_16BIT && isPrefixAtLocation(insn, 0xf3, insn->necessaryPrefixLocation)) {
attrMask |= ATTR_XS;
} else if (isPrefixAtLocation(insn, 0xf2, insn->necessaryPrefixLocation)) {
} else if (insn->mode != MODE_16BIT && isPrefixAtLocation(insn, 0xf2, insn->necessaryPrefixLocation)) {
attrMask |= ATTR_XD;
}
}
Expand Down Expand Up @@ -1299,6 +1299,7 @@ static int getID(struct InternalInstruction *insn)
}
}


/*
* Absolute moves need special handling.
* -For 16-bit mode because the meaning of the AdSize and OpSize prefixes are
Expand Down

0 comments on commit 2b84c0c

Please sign in to comment.