aboutsummaryrefslogtreecommitdiff
path: root/src/real_mode
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2026-05-03 17:56:19 +0000
committeriximeow <me@iximeow.net>2026-05-25 01:35:24 +0000
commit485851c914695e0884609c68e318d22fee1db9b8 (patch)
tree676cb0aed7fef203107f704cdcc74f74ec640649 /src/real_mode
parent351adb926722b626a3fdc85b4d42303d37678fd3 (diff)
more precision for vinsert/vextract/vblendv{ps,pd}
Diffstat (limited to 'src/real_mode')
-rw-r--r--src/real_mode/vex.rs46
1 files changed, 31 insertions, 15 deletions
diff --git a/src/real_mode/vex.rs b/src/real_mode/vex.rs
index 9651760..1c1470a 100644
--- a/src/real_mode/vex.rs
+++ b/src/real_mode/vex.rs
@@ -2642,16 +2642,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);
@@ -2672,16 +2680,24 @@ fn read_vex_instruction<
} else {
return Err(DecodeError::InvalidOpcode);
}),
- 0x4A => (Opcode::VBLENDVPS, if L {
- VEXOperandCode::G_V_E_ymm_ymm4
+ 0x4A => if instruction.prefixes.vex_unchecked().w() {
+ return Err(DecodeError::InvalidOpcode);
} else {
- VEXOperandCode::G_V_E_xmm_xmm4
- }),
- 0x4B => (Opcode::VBLENDVPD, if L {
- VEXOperandCode::G_V_E_ymm_ymm4
+ (Opcode::VBLENDVPS, if L {
+ VEXOperandCode::G_V_E_ymm_ymm4
+ } else {
+ VEXOperandCode::G_V_E_xmm_xmm4
+ })
+ },
+ 0x4B => if instruction.prefixes.vex_unchecked().w() {
+ return Err(DecodeError::InvalidOpcode);
} else {
- VEXOperandCode::G_V_E_xmm_xmm4
- }),
+ (Opcode::VBLENDVPD, if L {
+ VEXOperandCode::G_V_E_ymm_ymm4
+ } else {
+ VEXOperandCode::G_V_E_xmm_xmm4
+ })
+ },
0x4C => if instruction.prefixes.vex_unchecked().w() {
return Err(DecodeError::InvalidOpcode);
} else {