aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2020-08-03 02:03:51 -0700
committeriximeow <me@iximeow.net>2020-08-09 01:38:57 -0700
commitc7caf34a152cc4103c1ba0e7a8da22ea340aaa3d (patch)
treea174213cf90b8c7a3d6d77cba5f598469c778196
parentda67f024060e36b016c2554fdca91a2a70ece235 (diff)
vextractf128
-rw-r--r--src/long_mode/vex.rs4
-rw-r--r--test/long_mode/mod.rs1
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]