diff options
author | iximeow <me@iximeow.net> | 2020-02-11 00:22:16 -0800 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-02-11 00:22:16 -0800 |
commit | bd9ae00ba84275c9414298d016da21e8106cda36 (patch) | |
tree | a671e957288f00459664beaf1b9e13088daafc52 /src/long_mode/mod.rs | |
parent | f08c8bbf9f180283490fc7a4e116e8fa0ffcc681 (diff) |
add `RegSpec::name` to get `&'static str` labels for registers
Diffstat (limited to 'src/long_mode/mod.rs')
-rw-r--r-- | src/long_mode/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index 099cc47..8aa164d 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -59,6 +59,10 @@ pub enum ConditionCode { #[allow(non_snake_case)] impl RegSpec { + pub fn name(&self) -> &'static str { + display::regspec_label(self) + } + #[inline] fn from_parts(num: u8, extended: bool, bank: RegisterBank) -> RegSpec { RegSpec { |