From a781322552d9fb52b7b5e51641f49f12678f682f Mon Sep 17 00:00:00 2001 From: iximeow Date: Thu, 1 Jul 2021 23:54:06 -0700 Subject: reallocate OperandCode, convert disparate registers to array also remove redundant assignments of operand_count and some OperandSpec, bulk-assign all registers and operands on entry to `read_instr`. this all, taken together, shaves off about 7 cycles per decode. --- src/long_mode/evex.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/long_mode/evex.rs') diff --git a/src/long_mode/evex.rs b/src/long_mode/evex.rs index 483747b..7f456e7 100644 --- a/src/long_mode/evex.rs +++ b/src/long_mode/evex.rs @@ -1,6 +1,7 @@ // use crate::long_mode::{OperandSpec, DecodeError, RegSpec, RegisterBank, Instruction, Opcode}; -use crate::long_mode::{DecodeError, RegSpec, RegisterBank, Instruction, Opcode}; +use crate::long_mode::{Arch, DecodeError, RegSpec, RegisterBank, Instruction, Opcode}; use crate::long_mode::{read_modrm, read_E_vex, read_imm_unsigned}; +use yaxpeax_arch::Reader; const DEFAULT_EVEX_REGISTER_SIZE: RegisterBank = RegisterBank::Q; const DEFAULT_EVEX_REGISTER_WIDTH: u8 = 8; -- cgit v1.1