x86: checkPrefix() does not set prefix0 in repne case

This commit is contained in:
naq 2019-06-09 01:13:22 +08:00
parent 550a598058
commit 886c535a6e
1 changed files with 6 additions and 4 deletions

View File

@ -794,20 +794,20 @@ static int readOpcode(struct InternalInstruction* insn)
// mmmmmFromVEX2of3(insn->vectorExtensionPrefix[1]));
return -1;
case VEX_LOB_0F:
insn->twoByteEscape = 0x0f;
//insn->twoByteEscape = 0x0f;
insn->opcodeType = TWOBYTE;
return consumeByte(insn, &insn->opcode);
case VEX_LOB_0F38:
insn->twoByteEscape = 0x0f;
//insn->twoByteEscape = 0x0f;
insn->opcodeType = THREEBYTE_38;
return consumeByte(insn, &insn->opcode);
case VEX_LOB_0F3A:
insn->twoByteEscape = 0x0f;
//insn->twoByteEscape = 0x0f;
insn->opcodeType = THREEBYTE_3A;
return consumeByte(insn, &insn->opcode);
}
} else if (insn->vectorExtensionType == TYPE_VEX_2B) {
insn->twoByteEscape = 0x0f;
//insn->twoByteEscape = 0x0f;
insn->opcodeType = TWOBYTE;
return consumeByte(insn, &insn->opcode);
} else if (insn->vectorExtensionType == TYPE_XOP) {
@ -2281,6 +2281,7 @@ static bool checkPrefix(struct InternalInstruction *insn)
}
}
#if 0
// REPNE prefix
if (insn->repeatPrefix) {
// 0xf2 can be a part of instruction encoding, but not really a prefix.
@ -2289,6 +2290,7 @@ static bool checkPrefix(struct InternalInstruction *insn)
insn->prefix0 = 0;
}
}
#endif
// no invalid prefixes
return false;