diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/insn.rs | 2 | ||||
-rw-r--r-- | src/insn/mov.rs | 2 | ||||
-rw-r--r-- | src/lib.rs | 11 | ||||
-rw-r--r-- | src/prelude.rs (renamed from src/insn/prelude.rs) | 2 |
4 files changed, 4 insertions, 13 deletions
diff --git a/src/insn.rs b/src/insn.rs index 7c74dd9..c0bcc4e 100644 --- a/src/insn.rs +++ b/src/insn.rs @@ -1,5 +1,3 @@ -mod prelude; - mod mov; pub trait Mov<T, U> { diff --git a/src/insn/mov.rs b/src/insn/mov.rs index d930ade..bf1c33e 100644 --- a/src/insn/mov.rs +++ b/src/insn/mov.rs @@ -1,4 +1,4 @@ -use super::prelude::*; +use crate::prelude::*; // -- MOV : reg reg @@ -1,3 +1,5 @@ +pub mod prelude; + mod imm; mod insn; mod reg; @@ -7,8 +9,6 @@ pub use imm::{Imm16, Imm32, Imm64, Imm8}; use reg::Reg; pub use reg::{Reg16, Reg32, Reg64, Reg8}; -use insn::Mov; - pub enum MemOp { Indirect(Reg64), IndirectDisp(Reg64, i32), @@ -69,13 +69,6 @@ impl Asm { } } - pub fn mov<T, U>(&mut self, op1: T, op2: U) - where - Self: Mov<T, U>, - { - <Self as Mov<T, U>>::mov(self, op1, op2); - } - fn encode_rr<T: Reg>(&mut self, opc: u8, op1: T, op2: T) where Self: EncodeRR<T>, diff --git a/src/insn/prelude.rs b/src/prelude.rs index 703417a..d1cd794 100644 --- a/src/insn/prelude.rs +++ b/src/prelude.rs @@ -3,4 +3,4 @@ pub use crate::MemOp; pub use crate::{Imm16, Imm32, Imm64, Imm8}; pub use crate::{Reg16, Reg32, Reg64, Reg8}; -pub use crate::insn::Mov; +pub use crate::insn::{Add, Mov}; |