Fixed invalid decoding of INSERTPS instruction

closes #4
This commit is contained in:
flobernd 2016-03-23 18:06:42 +01:00
parent f8ed7e1bac
commit aa684c1bcc
2 changed files with 3 additions and 3 deletions

View File

@ -578,7 +578,7 @@ bool InstructionDecoder::decodeOperand(InstructionInfo& info, OperandInfo& opera
case DefinedOperandType::F:
// TODO: FAR flag
case DefinedOperandType::M:
// ModR/M byte may refer only to a register
// ModR/M byte may refer only to memory
if (info.modrm_mod == 3)
{
info.flags |= IF_ERROR_OPERAND;
@ -638,7 +638,7 @@ bool InstructionDecoder::decodeOperand(InstructionInfo& info, OperandInfo& opera
GetComplexOperandRegSize(operandSize) :
GetComplexOperandMemSize(operandSize));
case DefinedOperandType::N:
// ModR/M byte may refer only to memory
// ModR/M byte may refer only to a register
if (info.modrm_mod != 3)
{
info.flags |= IF_ERROR_OPERAND;

View File

@ -7558,7 +7558,7 @@ const InstructionDefinition instrDefinitions[] =
/* 2B4 */ { InstructionMnemonic::INC, { OPI_R5z, OPI_NONE, OPI_NONE, OPI_NONE }, IDF_ACCEPTS_OPERAND_SIZE_PREFIX | IDF_OPERAND1_READWRITE },
/* 2B5 */ { InstructionMnemonic::INSB, { OPI_NONE, OPI_NONE, OPI_NONE, OPI_NONE }, IDF_ACCEPTS_REP_PREFIX |IDF_ACCEPTS_SEGMENT_PREFIX },
/* 2B6 */ { InstructionMnemonic::INSD, { OPI_NONE, OPI_NONE, OPI_NONE, OPI_NONE }, IDF_ACCEPTS_REP_PREFIX |IDF_ACCEPTS_OPERAND_SIZE_PREFIX | IDF_ACCEPTS_SEGMENT_PREFIX },
/* 2B7 */ { InstructionMnemonic::INSERTPS, { OPI_V, OPI_Md, OPI_Ib, OPI_NONE }, IDF_ACCEPTS_ADDRESS_SIZE_PREFIX | IDF_ACCEPTS_REXR | IDF_ACCEPTS_REXW | IDF_ACCEPTS_REXX | IDF_ACCEPTS_REXB | IDF_OPERAND1_WRITE },
/* 2B7 */ { InstructionMnemonic::INSERTPS, { OPI_V, OPI_W, OPI_Ib, OPI_NONE }, IDF_ACCEPTS_ADDRESS_SIZE_PREFIX | IDF_ACCEPTS_REXR | IDF_ACCEPTS_REXW | IDF_ACCEPTS_REXX | IDF_ACCEPTS_REXB | IDF_OPERAND1_WRITE },
/* 2B8 */ { InstructionMnemonic::INSW, { OPI_NONE, OPI_NONE, OPI_NONE, OPI_NONE }, IDF_ACCEPTS_REP_PREFIX |IDF_ACCEPTS_OPERAND_SIZE_PREFIX | IDF_ACCEPTS_SEGMENT_PREFIX },
/* 2B9 */ { InstructionMnemonic::INT, { OPI_Ib, OPI_NONE, OPI_NONE, OPI_NONE }, 0 },
/* 2BA */ { InstructionMnemonic::INT1, { OPI_NONE, OPI_NONE, OPI_NONE, OPI_NONE }, 0 },