x86: checkPrefix() does not set prefix0 in repne case
This commit is contained in:
parent
550a598058
commit
886c535a6e
|
@ -794,20 +794,20 @@ static int readOpcode(struct InternalInstruction* insn)
|
||||||
// mmmmmFromVEX2of3(insn->vectorExtensionPrefix[1]));
|
// mmmmmFromVEX2of3(insn->vectorExtensionPrefix[1]));
|
||||||
return -1;
|
return -1;
|
||||||
case VEX_LOB_0F:
|
case VEX_LOB_0F:
|
||||||
insn->twoByteEscape = 0x0f;
|
//insn->twoByteEscape = 0x0f;
|
||||||
insn->opcodeType = TWOBYTE;
|
insn->opcodeType = TWOBYTE;
|
||||||
return consumeByte(insn, &insn->opcode);
|
return consumeByte(insn, &insn->opcode);
|
||||||
case VEX_LOB_0F38:
|
case VEX_LOB_0F38:
|
||||||
insn->twoByteEscape = 0x0f;
|
//insn->twoByteEscape = 0x0f;
|
||||||
insn->opcodeType = THREEBYTE_38;
|
insn->opcodeType = THREEBYTE_38;
|
||||||
return consumeByte(insn, &insn->opcode);
|
return consumeByte(insn, &insn->opcode);
|
||||||
case VEX_LOB_0F3A:
|
case VEX_LOB_0F3A:
|
||||||
insn->twoByteEscape = 0x0f;
|
//insn->twoByteEscape = 0x0f;
|
||||||
insn->opcodeType = THREEBYTE_3A;
|
insn->opcodeType = THREEBYTE_3A;
|
||||||
return consumeByte(insn, &insn->opcode);
|
return consumeByte(insn, &insn->opcode);
|
||||||
}
|
}
|
||||||
} else if (insn->vectorExtensionType == TYPE_VEX_2B) {
|
} else if (insn->vectorExtensionType == TYPE_VEX_2B) {
|
||||||
insn->twoByteEscape = 0x0f;
|
//insn->twoByteEscape = 0x0f;
|
||||||
insn->opcodeType = TWOBYTE;
|
insn->opcodeType = TWOBYTE;
|
||||||
return consumeByte(insn, &insn->opcode);
|
return consumeByte(insn, &insn->opcode);
|
||||||
} else if (insn->vectorExtensionType == TYPE_XOP) {
|
} else if (insn->vectorExtensionType == TYPE_XOP) {
|
||||||
|
@ -2281,6 +2281,7 @@ static bool checkPrefix(struct InternalInstruction *insn)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
// REPNE prefix
|
// REPNE prefix
|
||||||
if (insn->repeatPrefix) {
|
if (insn->repeatPrefix) {
|
||||||
// 0xf2 can be a part of instruction encoding, but not really a prefix.
|
// 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;
|
insn->prefix0 = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// no invalid prefixes
|
// no invalid prefixes
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue