diff --git a/src/disasm.rs b/src/disasm.rs index 68e3160..358fb39 100644 --- a/src/disasm.rs +++ b/src/disasm.rs @@ -12,7 +12,7 @@ use crate::{ }; use crate::{modrm_8b_register, modrm_16b_register, modrm_sregister}; use core::fmt; -use std::{fs::File, io::Read, process::exit}; +use std::{fs::File, io::Read}; #[derive(Debug)] /// Generic errors, which are encountered during parsing. @@ -820,6 +820,7 @@ impl Disassembler { 0xEE => Mnemonic::OUT_ALDX, 0xEF => Mnemonic::OUT_AXDX, + 0xF0 => Mnemonic::LOCK, 0xF1 => return Err(DisasmError::OpcodeUndefined(opcode)), 0xF2 => Mnemonic::REPNZ, @@ -872,13 +873,6 @@ impl Disassembler { _ => return Err(DisasmError::IllegalGroupMnemonic(5, reg)), } } - - _ => { - eprintln!("Encountered unknown instruction '0x{:x}'", opcode); - eprintln!("Offset might be misaligned and data is being interpreted."); - eprintln!("Existing to avoid further misinterpretation..."); - exit(1); - } }; // Save parsed instruction diff --git a/src/instructions.rs b/src/instructions.rs index 32bcdfb..8b59c5d 100644 --- a/src/instructions.rs +++ b/src/instructions.rs @@ -295,6 +295,7 @@ pub enum Mnemonic { AAD(Byte), // MISC XLAT, + LOCK, } impl fmt::Display for Mnemonic { @@ -533,6 +534,8 @@ impl fmt::Display for Mnemonic { Self::XLAT => write!(f, "xlat"), + Self::LOCK => write!(f, "lock"), + _ => write!(f, "??? ??, ??"), } }