diff options
| -rw-r--r-- | src/long_mode/vex.rs | 4 | ||||
| -rw-r--r-- | test/long_mode/mod.rs | 1 | 
2 files changed, 4 insertions, 1 deletions
| diff --git a/src/long_mode/vex.rs b/src/long_mode/vex.rs index 889d0a8..7cfcc3d 100644 --- a/src/long_mode/vex.rs +++ b/src/long_mode/vex.rs @@ -461,7 +461,9 @@ fn read_vex_operands<T: Iterator<Item=u8>>(bytes: &mut T, instruction: &mut Inst              let mem_oper = read_E_xmm(bytes, instruction, modrm, length)?;              instruction.operands[0] = mem_oper;              instruction.operands[1] = OperandSpec::RegRRR; -            instruction.operand_count = 2; +            instruction.imm = read_imm_unsigned(bytes, 1, length)?; +            instruction.operands[2] = OperandSpec::ImmU8; +            instruction.operand_count = 3;              Ok(())          } diff --git a/test/long_mode/mod.rs b/test/long_mode/mod.rs index 686ba6b..1ff699e 100644 --- a/test/long_mode/mod.rs +++ b/test/long_mode/mod.rs @@ -1390,6 +1390,7 @@ fn test_vex() {      test_instr(&[0xc4, 0xe3, 0xfd, 0x00, 0xc1, 0xa8], "vpermq ymm0, ymm1, 0xa8");      test_instr(&[0xc5, 0xfd, 0xea, 0xd1], "vpminsw ymm2, ymm0, ymm1");      test_instr(&[0xc5, 0xfd, 0xee, 0xd9], "vpmaxsw ymm3, ymm0, ymm1"); +    test_instr(&[0xc4, 0xe3, 0x7d, 0x19, 0xd1, 0x01], "vextractf128 xmm1, ymm2, 0x1");  }  #[test] | 
