Update rex opcode handler

This commit is contained in:
wtfsck 2021-05-15 00:01:45 +02:00
parent 7e81953666
commit 3276bb06b6
2 changed files with 4 additions and 4 deletions

View File

@ -195,9 +195,9 @@ namespace Iced.Intel.DecoderInternal {
decoder.state.flags |= StateFlags.HasRex;
decoder.state.flags &= ~StateFlags.W;
if ((decoder.state.flags & StateFlags.Has66) == 0)
decoder.state.operandSize = decoder.defaultOperandSize;
decoder.state.operandSize = OpSize.Size32;
else
decoder.state.operandSize = decoder.defaultInvertedOperandSize;
decoder.state.operandSize = OpSize.Size16;
}
decoder.state.extraRegisterBase = (rex & 4) << 1;
decoder.state.extraIndexRegisterBase = (rex & 2) << 2;

View File

@ -314,9 +314,9 @@ impl OpCodeHandler_PrefixREX {
} else {
decoder.state.flags &= !StateFlags::W;
if (decoder.state.flags & StateFlags::HAS66) == 0 {
decoder.state.operand_size = decoder.default_operand_size;
decoder.state.operand_size = OpSize::Size32;
} else {
decoder.state.operand_size = decoder.default_inverted_operand_size;
decoder.state.operand_size = OpSize::Size16;
}
}
decoder.state.extra_register_base = (b & 4) << 1;