aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2026-05-03 17:56:19 +0000
committeriximeow <me@iximeow.net>2026-05-03 17:56:50 +0000
commit5e42a8bf68f369eb4d5017993e403308fd02ca67 (patch)
tree394400242457f0a2307530aa9740f58794f9a6f3 /src
parent6eb2af6a3aba7bfad21775319c3a200c5c723918 (diff)
more precision for vinsert/vextract
Diffstat (limited to 'src')
-rw-r--r--src/long_mode/vex.rs22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/long_mode/vex.rs b/src/long_mode/vex.rs
index a847fc0..2a98166 100644
--- a/src/long_mode/vex.rs
+++ b/src/long_mode/vex.rs
@@ -2787,16 +2787,24 @@ fn read_vex_instruction<
VEXOperandCode::G_V_xmm_Ev_imm8
})
},
- 0x38 => (Opcode::VINSERTI128, if L {
- VEXOperandCode::G_ymm_V_ymm_E_xmm_imm8
- } else {
+ 0x38 => if instruction.prefixes.vex_unchecked().w() {
return Err(DecodeError::InvalidOpcode);
- }),
- 0x39 => (Opcode::VEXTRACTI128, if L {
- VEXOperandCode::E_xmm_G_ymm_imm8
} else {
+ (Opcode::VINSERTI128, if L {
+ VEXOperandCode::G_ymm_V_ymm_E_xmm_imm8
+ } else {
+ return Err(DecodeError::InvalidOpcode);
+ })
+ },
+ 0x39 => if instruction.prefixes.vex_unchecked().w() {
return Err(DecodeError::InvalidOpcode);
- }),
+ } else {
+ (Opcode::VEXTRACTI128, if L {
+ VEXOperandCode::E_xmm_G_ymm_imm8
+ } else {
+ return Err(DecodeError::InvalidOpcode);
+ })
+ },
0x40 => (Opcode::VDPPS, VEXOperandCode::G_V_E_xyLmm_imm8),
0x41 => (Opcode::VDPPD, if L {
return Err(DecodeError::InvalidOpcode);