From 22f9afd31c902ded123f175a95812955c965233f Mon Sep 17 00:00:00 2001 From: iximeow Date: Tue, 6 Aug 2019 20:52:04 -0700 Subject: armv8 serde/no-serde support plus contextual display .. ish --- src/armv8/a64.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/armv8/a64.rs b/src/armv8/a64.rs index d640292..e58d2a2 100644 --- a/src/armv8/a64.rs +++ b/src/armv8/a64.rs @@ -116,6 +116,18 @@ mod docs { } } +#[allow(non_snake_case)] +impl ShowContextual], T> for Instruction { + fn contextualize(&self, colors: Option<&ColorSettings>, address: u64, context: Option<&[Option]>, out: &mut T) -> std::fmt::Result { + write!(out, "{}", self) + } +} + +#[cfg(feature="use-serde")] +#[derive(Copy, Clone, Debug, Serialize, Deserialize)] +pub struct ARMv8 { } + +#[cfg(not(feature="use-serde"))] #[derive(Copy, Clone, Debug)] pub struct ARMv8 { } -- cgit v1.1