aboutsummaryrefslogtreecommitdiff
path: root/src/real_mode/display.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/real_mode/display.rs')
-rw-r--r--src/real_mode/display.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/real_mode/display.rs b/src/real_mode/display.rs
index 258f5d9..0ae0a46 100644
--- a/src/real_mode/display.rs
+++ b/src/real_mode/display.rs
@@ -3,6 +3,7 @@ use core::fmt;
use yaxpeax_arch::{Colorize, ShowContextual, NoColors, YaxColors};
use yaxpeax_arch::display::*;
+use crate::safer_unchecked::GetSaferUnchecked as _;
use crate::MEM_SIZE_STRINGS;
use crate::real_mode::{RegSpec, Opcode, Operand, MergeMode, InstDecoder, Instruction, Segment, PrefixVex, OperandSpec};
@@ -123,7 +124,7 @@ const REG_NAMES: &[&'static str] = &[
];
pub(crate) fn regspec_label(spec: &RegSpec) -> &'static str {
- unsafe { REG_NAMES.get_unchecked((spec.num as u16 + ((spec.bank as u16) << 3)) as usize) }
+ unsafe { REG_NAMES.get_kinda_unchecked((spec.num as u16 + ((spec.bank as u16) << 3)) as usize) }
}
impl fmt::Display for RegSpec {
@@ -1811,7 +1812,7 @@ const MNEMONICS: &[&'static str] = &[
impl Opcode {
fn name(&self) -> &'static str {
unsafe {
- MNEMONICS.get_unchecked(*self as usize)
+ MNEMONICS.get_kinda_unchecked(*self as usize)
}
}
}