From e02b7c2c5cfc5ff55f725b00039c8f81be8229f0 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 3 Jul 2021 13:42:30 -0700 Subject: defer checking invalid lengths for multi-prefix instructions this profiles slightly better? not entirely sure why... --- src/long_mode/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/long_mode/mod.rs') diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index b75f354..8ed68fb 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -7024,9 +7024,6 @@ fn read_instr::Address, = 15 { - return Err(DecodeError::TooLong); - } if b == 0x0f { let b = words.next().ok().ok_or(DecodeError::ExhaustedInput)?; if b == 0x38 { @@ -7088,6 +7085,9 @@ fn read_instr::Address, = 15 { + return Err(DecodeError::TooLong); + } prefixes.rex_from(0); match b { 0x26 | -- cgit v1.1