aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2019-08-06 20:52:04 -0700
committeriximeow <me@iximeow.net>2020-01-12 17:28:07 -0800
commit458d864bf0e787c77f1958a316378cb7cf9afb62 (patch)
tree8185df9831212cd3d6d1ff36ab4cf32ca2590069 /src
parente138f730146099690e6187dacf9544b715ed7fb4 (diff)
armv8 serde/no-serde support plus contextual display .. ish
Diffstat (limited to 'src')
-rw-r--r--src/armv8/a64.rs12
1 files changed, 12 insertions, 0 deletions
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 <T: std::fmt::Write> ShowContextual<u64, [Option<String>], T> for Instruction {
+ fn contextualize(&self, colors: Option<&ColorSettings>, address: u64, context: Option<&[Option<String>]>, 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 { }