aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml1
-rw-r--r--src/lib.rs2
-rw-r--r--src/long_mode/display.rs5
-rw-r--r--src/long_mode/mod.rs3
-rw-r--r--src/long_mode/uarch.rs4
-rw-r--r--src/protected_mode/display.rs5
-rw-r--r--src/protected_mode/mod.rs3
-rw-r--r--src/protected_mode/uarch.rs4
-rw-r--r--src/real_mode/display.rs5
-rw-r--r--src/real_mode/mod.rs3
-rw-r--r--src/real_mode/uarch.rs4
11 files changed, 13 insertions, 26 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 8a82577..94c247d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,6 +7,7 @@ license = "0BSD"
repository = "http://git.iximeow.net/yaxpeax-x86/"
description = "x86 decoders for the yaxpeax project"
readme = "README.md"
+edition = "2018"
[dependencies]
yaxpeax-arch = { version = "0.1.0", default-features = false, features = [] }
diff --git a/src/lib.rs b/src/lib.rs
index a26a3cd..2bee840 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -71,8 +71,6 @@ extern crate serde;
#[cfg(feature="std")]
extern crate alloc;
-extern crate yaxpeax_arch;
-
pub mod long_mode;
pub use long_mode as amd64;
pub use long_mode::Arch as x86_64;
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs
index fb179cc..68189f0 100644
--- a/src/long_mode/display.rs
+++ b/src/long_mode/display.rs
@@ -1,12 +1,9 @@
-extern crate yaxpeax_arch;
-
-use MEM_SIZE_STRINGS;
-
use core::fmt;
use yaxpeax_arch::{Colorize, ShowContextual, NoColors, YaxColors};
use yaxpeax_arch::display::*;
+use crate::MEM_SIZE_STRINGS;
use crate::long_mode::{RegSpec, Opcode, Operand, MergeMode, InstDecoder, Instruction, Segment, PrefixRex, OperandSpec};
impl fmt::Display for InstDecoder {
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs
index 6e3e21d..be7cedd 100644
--- a/src/long_mode/mod.rs
+++ b/src/long_mode/mod.rs
@@ -4,7 +4,7 @@ mod evex;
mod display;
pub mod uarch;
-pub use MemoryAccessSize;
+pub use crate::MemoryAccessSize;
#[cfg(feature = "fmt")]
pub use self::display::DisplayStyle;
@@ -964,7 +964,6 @@ const REGISTER_CLASS_NAMES: &[&'static str] = &[
/// and so on. constants in this module are useful for inspecting the register class of a decoded
/// instruction. as an example:
/// ```
-/// extern crate yaxpeax_arch;
/// use yaxpeax_x86::long_mode::{self as amd64};
/// use yaxpeax_x86::long_mode::{Opcode, Operand, RegisterClass};
/// use yaxpeax_arch::{Decoder, U8Reader};
diff --git a/src/long_mode/uarch.rs b/src/long_mode/uarch.rs
index 258bb30..bfd4887 100644
--- a/src/long_mode/uarch.rs
+++ b/src/long_mode/uarch.rs
@@ -16,7 +16,7 @@ pub mod amd {
//! as retrieved 2020 may 19,
//! `sha256: 87ff152ae18c017dcbfb9f7ee6e88a9f971f6250fd15a70a3dd87c3546323bd5`
- use long_mode::InstDecoder;
+ use crate::long_mode::InstDecoder;
/// `k8` was the first AMD microarchitecture to implement x86_64, launched in 2003. while later
/// `k8`-based processors supported SSE3, these predefined decoders pick the lower end of
@@ -107,7 +107,7 @@ pub mod amd {
pub mod intel {
//! sourced by walking wikipedia pages. seriously! this stuff is kinda hard to figure out!
- use long_mode::InstDecoder;
+ use crate::long_mode::InstDecoder;
/// `Netburst` was the first Intel microarchitecture to implement x86_64, beginning with the
/// `Prescott` family launched in 2004. while the wider `Netburst` family launched in 2000
diff --git a/src/protected_mode/display.rs b/src/protected_mode/display.rs
index f2957d1..987221e 100644
--- a/src/protected_mode/display.rs
+++ b/src/protected_mode/display.rs
@@ -1,12 +1,9 @@
-extern crate yaxpeax_arch;
-
-use MEM_SIZE_STRINGS;
-
use core::fmt;
use yaxpeax_arch::{Colorize, ShowContextual, NoColors, YaxColors};
use yaxpeax_arch::display::*;
+use crate::MEM_SIZE_STRINGS;
use crate::protected_mode::{RegSpec, Opcode, Operand, MergeMode, InstDecoder, Instruction, Segment, PrefixVex, OperandSpec};
impl fmt::Display for InstDecoder {
diff --git a/src/protected_mode/mod.rs b/src/protected_mode/mod.rs
index aedbbea..355ae17 100644
--- a/src/protected_mode/mod.rs
+++ b/src/protected_mode/mod.rs
@@ -4,7 +4,7 @@ mod evex;
mod display;
pub mod uarch;
-pub use MemoryAccessSize;
+pub use crate::MemoryAccessSize;
#[cfg(feature = "fmt")]
pub use self::display::DisplayStyle;
@@ -910,7 +910,6 @@ const REGISTER_CLASS_NAMES: &[&'static str] = &[
/// and so on. constants in this module are useful for inspecting the register class of a decoded
/// instruction. as an example:
/// ```
-/// extern crate yaxpeax_arch;
/// use yaxpeax_x86::protected_mode::{self as amd64};
/// use yaxpeax_x86::protected_mode::{Opcode, Operand, RegisterClass};
/// use yaxpeax_arch::{Decoder, U8Reader};
diff --git a/src/protected_mode/uarch.rs b/src/protected_mode/uarch.rs
index 0d2279e..cbe3e89 100644
--- a/src/protected_mode/uarch.rs
+++ b/src/protected_mode/uarch.rs
@@ -16,7 +16,7 @@ pub mod amd {
//! as retrieved 2020 may 19,
//! `sha256: 87ff152ae18c017dcbfb9f7ee6e88a9f971f6250fd15a70a3dd87c3546323bd5`
- use long_mode::InstDecoder;
+ use crate::protected_mode::InstDecoder;
/// `k8` was the first AMD microarchitecture to implement x86_64, launched in 2003. while later
/// `k8`-based processors supported SSE3, these predefined decoders pick the lower end of
@@ -107,7 +107,7 @@ pub mod amd {
pub mod intel {
//! sourced by walking wikipedia pages. seriously! this stuff is kinda hard to figure out!
- use long_mode::InstDecoder;
+ use crate::protected_mode::InstDecoder;
/// `Netburst` was the first Intel microarchitecture to implement x86_64, beginning with the
/// `Prescott` family launched in 2004. while the wider `Netburst` family launched in 2000
diff --git a/src/real_mode/display.rs b/src/real_mode/display.rs
index 9d95020..9ba8284 100644
--- a/src/real_mode/display.rs
+++ b/src/real_mode/display.rs
@@ -1,12 +1,9 @@
-extern crate yaxpeax_arch;
-
-use MEM_SIZE_STRINGS;
-
use core::fmt;
use yaxpeax_arch::{Colorize, ShowContextual, NoColors, YaxColors};
use yaxpeax_arch::display::*;
+use crate::MEM_SIZE_STRINGS;
use crate::real_mode::{RegSpec, Opcode, Operand, MergeMode, InstDecoder, Instruction, Segment, PrefixVex, OperandSpec};
impl fmt::Display for InstDecoder {
diff --git a/src/real_mode/mod.rs b/src/real_mode/mod.rs
index bfcb79f..e752ee0 100644
--- a/src/real_mode/mod.rs
+++ b/src/real_mode/mod.rs
@@ -4,7 +4,7 @@ mod evex;
mod display;
pub mod uarch;
-pub use MemoryAccessSize;
+pub use crate::MemoryAccessSize;
#[cfg(feature = "fmt")]
pub use self::display::DisplayStyle;
@@ -918,7 +918,6 @@ const REGISTER_CLASS_NAMES: &[&'static str] = &[
/// and so on. constants in this module are useful for inspecting the register class of a decoded
/// instruction. as an example:
/// ```
-/// extern crate yaxpeax_arch;
/// use yaxpeax_x86::real_mode::{self as amd64};
/// use yaxpeax_x86::real_mode::{Opcode, Operand, RegisterClass};
/// use yaxpeax_arch::{Decoder, U8Reader};
diff --git a/src/real_mode/uarch.rs b/src/real_mode/uarch.rs
index 0aeaa34..60bf168 100644
--- a/src/real_mode/uarch.rs
+++ b/src/real_mode/uarch.rs
@@ -16,7 +16,7 @@ pub mod amd {
//! as retrieved 2020 may 19,
//! `sha256: 87ff152ae18c017dcbfb9f7ee6e88a9f971f6250fd15a70a3dd87c3546323bd5`
- use long_mode::InstDecoder;
+ use crate::real_mode::InstDecoder;
/// `k8` was the first AMD microarchitecture to implement x86_64, launched in 2003. while later
/// `k8`-based processors supported SSE3, these predefined decoders pick the lower end of
@@ -107,7 +107,7 @@ pub mod amd {
pub mod intel {
//! sourced by walking wikipedia pages. seriously! this stuff is kinda hard to figure out!
- use long_mode::InstDecoder;
+ use crate::real_mode::InstDecoder;
/// `Netburst` was the first Intel microarchitecture to implement x86_64, beginning with the
/// `Prescott` family launched in 2004. while the wider `Netburst` family launched in 2000