fixed decoder issue when decoding opcode 8f (aka xop prefix) as well

This commit is contained in:
Stanislav Shwartsman 2017-05-27 10:32:44 +00:00
parent 54c109ceb4
commit bb43ac527b
2 changed files with 6 additions and 0 deletions

View File

@ -1965,6 +1965,9 @@ int decoder_xop32(const Bit8u *iptr, unsigned &remain, bxInstruction_c *i, unsig
// make sure XOP 0x8f prefix
assert(b1 == 0x8f);
if (remain == 0)
return(-1);
if ((*iptr & 0xc8) != 0xc8) {
// not XOP prefix, decode regular opcode
struct bx_modrm modrm;

View File

@ -1457,6 +1457,9 @@ int decoder_xop64(const Bit8u *iptr, unsigned &remain, bxInstruction_c *i, unsig
// 3 byte XOP prefix
assert(b1 == 0x8f);
if (remain == 0)
return(-1);
if ((*iptr & 0x08) != 0x08) {
// not XOP prefix, decode regular opcode
struct bx_modrm modrm;