summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2020-05-03 14:06:21 -0700
committeriximeow <me@iximeow.net>2020-05-03 14:06:21 -0700
commit2b33746fd0f947b0343981941cc49f59e88daa4b (patch)
treecfc2bc6818306be8cc3d2c996c3b918ebde83713
parenta3d7fba380fad8e66529b908fb0a09024a41d699 (diff)
version bump, bumping yaxpeax-arch to 0.0.40.0.3
-rw-r--r--Cargo.toml6
-rw-r--r--src/lib.rs10
2 files changed, 8 insertions, 8 deletions
diff --git a/Cargo.toml b/Cargo.toml
index dd9c3c4..5bb0f5e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,14 +1,14 @@
[package]
name = "yaxpeax-pic18"
-version = "0.0.2"
+version = "0.0.3"
authors = [ "iximeow <me@iximeow.net>" ]
license = "0BSD"
repository = "http://git.iximeow.net/yaxpeax-pic18/"
description = "pic18 decoders for the yaxpeax project"
[dependencies]
-yaxpeax-arch = { version = "0.0.3", default-features = false, features = [] }
+yaxpeax-arch = { version = "0.0.4", default-features = false, features = [] }
"serde" = { version = "1.0", optional = true }
"serde_derive" = { version = "1.0", optional = true }
@@ -19,4 +19,4 @@ yaxpeax-arch = { version = "0.0.3", default-features = false, features = [] }
[features]
default = []
-use-serde = []
+use-serde = ["serde", "serde_derive"]
diff --git a/src/lib.rs b/src/lib.rs
index 506a0e5..74937fb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -9,7 +9,7 @@ use std::fmt;
extern crate yaxpeax_arch;
-use yaxpeax_arch::{Arch, Decoder, LengthedInstruction};
+use yaxpeax_arch::{Arch, AddressDiff, Decoder, LengthedInstruction};
pub mod consts;
pub mod display;
@@ -37,9 +37,9 @@ pub struct Instruction {
}
impl LengthedInstruction for Instruction {
- type Unit = <PIC18 as Arch>::Address;
+ type Unit = AddressDiff<<PIC18 as Arch>::Address>;
fn min_size() -> Self::Unit {
- 2
+ AddressDiff::from_const(2)
}
fn len(&self) -> Self::Unit {
match self.opcode {
@@ -49,9 +49,9 @@ impl LengthedInstruction for Instruction {
| Opcode::CALL
| Opcode::LFSR
| Opcode::GOTO => {
- 4
+ AddressDiff::from_const(4)
},
- _ => 2
+ _ => AddressDiff::from_const(2)
}
}
}