aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-08-21 12:13:01 -0700
committeriximeow <me@iximeow.net>2021-08-21 12:13:01 -0700
commitcef4feeaf9c64e03a6728f267750ac2fb32eb9ff (patch)
treedcfc974ad5d1beffe629138aebdfa92fbf7f90a5 /src/lib.rs
parent4612215ddc98dabaffedc36f6fe402bb9f04119a (diff)
report memory sizes for push, pop, call, ret
these instructions had memory sizes reported for the operand, if it was a memory operand, but for versions with non-memory operands the decoded `Instruction` would imply that non memory access would happen at all. now, decoded instructions in these cases will report a more useful memory size.
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 84353ba..46bebdb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -185,3 +185,10 @@ impl core::fmt::Display for MemoryAccessSize {
f.write_str(self.size_name())
}
}
+
+#[cfg(feature = "fmt")]
+impl core::fmt::Debug for MemoryAccessSize {
+ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
+ core::fmt::Display::fmt(self, f)
+ }
+}