From 77efbb834a5119b93e656dce6189f36df89645bb Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 3 Jul 2021 09:41:31 -0700 Subject: reject instructions when their opcode is `Invalid` the evex route would allow "valid" instructions that have the opcode `invalid`. this is.. not correct. --- src/long_mode/display.rs | 5 ----- src/long_mode/mod.rs | 2 +- src/shared/evex.in | 3 +++ 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index e60645b..049b96d 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -1806,11 +1806,6 @@ impl Opcode { } } - // AVX512CD - - - // MPX - impl Colorize for Opcode { fn colorize(&self, colors: &Y, out: &mut T) -> fmt::Result { match self { diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index 769706f..41e24e6 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -6967,7 +6967,7 @@ fn read_0f3a_opcode(opcode: u8, prefixes: &mut Prefixes) -> OpcodeRecord { 0x61 => OpcodeRecord(Interpretation::Instruction(Opcode::PCMPESTRI), OperandCode::G_E_xmm_Ib), 0x62 => OpcodeRecord(Interpretation::Instruction(Opcode::PCMPISTRM), OperandCode::G_E_xmm_Ib), 0x63 => OpcodeRecord(Interpretation::Instruction(Opcode::PCMPISTRI), OperandCode::G_E_xmm_Ib), - 0xcc => OpcodeRecord(Interpretation::Instruction(Opcode::SHA1RNDS4), OperandCode::G_E_xmm_Ib), +// 0xcc => OpcodeRecord(Interpretation::Instruction(Opcode::SHA1RNDS4), OperandCode::G_E_xmm_Ib), 0xce => OpcodeRecord(Interpretation::Instruction(Opcode::GF2P8AFFINEQB), OperandCode::G_E_xmm_Ub), 0xcf => OpcodeRecord(Interpretation::Instruction(Opcode::GF2P8AFFINEINVQB), OperandCode::G_E_xmm_Ub), 0xdf => OpcodeRecord(Interpretation::Instruction(Opcode::AESKEYGENASSIST), OperandCode::G_E_xmm_Ub), diff --git a/src/shared/evex.in b/src/shared/evex.in index 2bcd2f4..f9574db 100644 --- a/src/shared/evex.in +++ b/src/shared/evex.in @@ -86,6 +86,9 @@ pub(crate) fn read_evex::Address,