aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-07-03 09:55:11 -0700
committeriximeow <me@iximeow.net>2021-07-03 09:55:11 -0700
commite095342c536ce282a80b010ddedcd43900b85f7b (patch)
treea45c37f3d0917fe6ba8bac32379f8a4a005d2602
parentd548b9d8b7d2163d524c2a25ff0cb7e794e4e11d (diff)
vbroadcastsd requires W
-rw-r--r--src/shared/evex.in9
-rw-r--r--src/shared/generated_evex.in4
2 files changed, 5 insertions, 8 deletions
diff --git a/src/shared/evex.in b/src/shared/evex.in
index f9574db..b9a77e8 100644
--- a/src/shared/evex.in
+++ b/src/shared/evex.in
@@ -4616,12 +4616,9 @@ pub(crate) fn read_evex_operands<T: Reader<<Arch as yaxpeax_arch::Arch>::Address
set_reg_sizes(instruction, RegisterBank::X);
}
- generated::EVEXOperandCode::Gm_V_E_xmm_imm8_sae => {
- if instruction.opcode == Opcode::VRNDSCALESD {
- if instruction.prefixes.evex_unchecked().vex().w() {
- return Err(DecodeError::InvalidOpcode);
- }
- }
+ generated::EVEXOperandCode::Gm_V_E_xmm_imm8_sae_W1 => {
+ ensure_W(instruction, 1)?;
+
let modrm = read_modrm(words)?;
set_rrr(instruction, modrm);
let mem_oper = read_E_vex(words, instruction, modrm, RegisterBank::X)?;
diff --git a/src/shared/generated_evex.in b/src/shared/generated_evex.in
index 4f4c518..7f2d192 100644
--- a/src/shared/generated_evex.in
+++ b/src/shared/generated_evex.in
@@ -580,7 +580,7 @@ pub(crate) enum EVEXOperandCode {
Gm_V_E_LL_sae_bcast,
Gm_V_E_LL_sae_bcast_W0,
Gm_V_E_LL_sae_bcast_W1,
- Gm_V_E_xmm_imm8_sae,
+ Gm_V_E_xmm_imm8_sae_W1,
Gm_V_E_xmm_sae,
Gm_V_E_xmm_sae_W1,
Gm_V_Ed_LL_bcast,
@@ -992,7 +992,7 @@ const EVEX_66_0f3a: [(u8, [(super::Opcode, EVEXOperandCode); 4]); 51] = [
(0x08, [(super::Opcode::VRNDSCALEPS, EVEXOperandCode::Gm_E_LL_imm8_sae_W0), (super::Opcode::VRNDSCALEPS, EVEXOperandCode::Gm_E_LL_imm8_sae_W0), (super::Opcode::VRNDSCALEPS, EVEXOperandCode::Gm_E_LL_imm8_sae_W0), (super::Opcode::VRNDSCALEPS, EVEXOperandCode::Gm_E_LL_imm8_sae_W0)]),
(0x09, [(super::Opcode::VRNDSCALEPD, EVEXOperandCode::Gm_E_LL_imm8_sae_W1), (super::Opcode::VRNDSCALEPD, EVEXOperandCode::Gm_E_LL_imm8_sae_W1), (super::Opcode::VRNDSCALEPD, EVEXOperandCode::Gm_E_LL_imm8_sae_W1), (super::Opcode::VRNDSCALEPD, EVEXOperandCode::Gm_E_LL_imm8_sae_W1)]),
(0x0a, [(super::Opcode::VRNDSCALESS, EVEXOperandCode::Gm_V_Ed_xmm_imm8_sae), (super::Opcode::VRNDSCALESS, EVEXOperandCode::Gm_V_Ed_xmm_imm8_sae), (super::Opcode::VRNDSCALESS, EVEXOperandCode::Gm_V_Ed_xmm_imm8_sae), (super::Opcode::VRNDSCALESS, EVEXOperandCode::Gm_V_Ed_xmm_imm8_sae)]),// W0
- (0x0b, [(super::Opcode::VRNDSCALESD, EVEXOperandCode::Gm_V_E_xmm_imm8_sae), (super::Opcode::VRNDSCALESD, EVEXOperandCode::Gm_V_E_xmm_imm8_sae), (super::Opcode::VRNDSCALESD, EVEXOperandCode::Gm_V_E_xmm_imm8_sae), (super::Opcode::VRNDSCALESD, EVEXOperandCode::Gm_V_E_xmm_imm8_sae)]),// W1
+ (0x0b, [(super::Opcode::VRNDSCALESD, EVEXOperandCode::Gm_V_E_xmm_imm8_sae_W1), (super::Opcode::VRNDSCALESD, EVEXOperandCode::Gm_V_E_xmm_imm8_sae_W1), (super::Opcode::VRNDSCALESD, EVEXOperandCode::Gm_V_E_xmm_imm8_sae_W1), (super::Opcode::VRNDSCALESD, EVEXOperandCode::Gm_V_E_xmm_imm8_sae_W1)]),// W1
(0x0f, [(super::Opcode::VPALIGNR, EVEXOperandCode::Gm_V_E_LL_imm8), (super::Opcode::VPALIGNR, EVEXOperandCode::Gm_V_E_LL_imm8), (super::Opcode::VPALIGNR, EVEXOperandCode::Gm_V_E_LL_imm8), (super::Opcode::Invalid, EVEXOperandCode::Nothing)]),
(0x14, [(super::Opcode::VPEXTRB, EVEXOperandCode::Ebd_G_xmm_imm8), (super::Opcode::Invalid, EVEXOperandCode::Nothing), (super::Opcode::Invalid, EVEXOperandCode::Nothing), (super::Opcode::Invalid, EVEXOperandCode::Nothing)]),
(0x15, [(super::Opcode::VPEXTRW, EVEXOperandCode::Ewd_G_xmm_imm8), (super::Opcode::Invalid, EVEXOperandCode::Nothing), (super::Opcode::Invalid, EVEXOperandCode::Nothing), (super::Opcode::Invalid, EVEXOperandCode::Nothing)]),