From 586a5bf16c02ba7377391631c8d6a45f4c6de22e Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Tue, 24 Nov 2020 00:45:07 +0200 Subject: [PATCH] core: arm7tdmi: Refactor display->disass. Also, move core::disass into core::arm7tdmi::disass Former-commit-id: 82f60cb814d6cf23e62565e34b61f8771e704525 Former-commit-id: 345ddaac674c78e77e62f106d7c0deda857fe5ed --- core/src/arm7tdmi/arm/{display.rs => disass.rs} | 0 core/src/arm7tdmi/arm/mod.rs | 2 +- core/src/{ => arm7tdmi}/disass.rs | 2 +- core/src/arm7tdmi/mod.rs | 1 + core/src/arm7tdmi/thumb/{display.rs => disass.rs} | 0 core/src/arm7tdmi/thumb/mod.rs | 2 +- core/src/lib.rs | 2 +- 7 files changed, 5 insertions(+), 4 deletions(-) rename core/src/arm7tdmi/arm/{display.rs => disass.rs} (100%) rename core/src/{ => arm7tdmi}/disass.rs (96%) rename core/src/arm7tdmi/thumb/{display.rs => disass.rs} (100%) diff --git a/core/src/arm7tdmi/arm/display.rs b/core/src/arm7tdmi/arm/disass.rs similarity index 100% rename from core/src/arm7tdmi/arm/display.rs rename to core/src/arm7tdmi/arm/disass.rs diff --git a/core/src/arm7tdmi/arm/mod.rs b/core/src/arm7tdmi/arm/mod.rs index 4ccd384..745dc8d 100644 --- a/core/src/arm7tdmi/arm/mod.rs +++ b/core/src/arm7tdmi/arm/mod.rs @@ -1,5 +1,5 @@ #[cfg(feature = "debugger")] -pub mod display; +pub mod disass; pub mod exec; use serde::{Deserialize, Serialize}; diff --git a/core/src/disass.rs b/core/src/arm7tdmi/disass.rs similarity index 96% rename from core/src/disass.rs rename to core/src/arm7tdmi/disass.rs index fba3178..1db4d5f 100644 --- a/core/src/disass.rs +++ b/core/src/arm7tdmi/disass.rs @@ -1,7 +1,7 @@ use std::fmt; use std::marker::PhantomData; -use super::arm7tdmi::InstructionDecoder; +use super::InstructionDecoder; use super::Addr; pub struct Disassembler<'a, D> diff --git a/core/src/arm7tdmi/mod.rs b/core/src/arm7tdmi/mod.rs index a8abf6c..81d3297 100644 --- a/core/src/arm7tdmi/mod.rs +++ b/core/src/arm7tdmi/mod.rs @@ -17,6 +17,7 @@ pub use alu::*; pub mod exception; pub mod psr; pub use psr::*; +pub mod disass; pub const REG_PC: usize = 15; pub const REG_LR: usize = 14; diff --git a/core/src/arm7tdmi/thumb/display.rs b/core/src/arm7tdmi/thumb/disass.rs similarity index 100% rename from core/src/arm7tdmi/thumb/display.rs rename to core/src/arm7tdmi/thumb/disass.rs diff --git a/core/src/arm7tdmi/thumb/mod.rs b/core/src/arm7tdmi/thumb/mod.rs index 7878b0e..993c117 100644 --- a/core/src/arm7tdmi/thumb/mod.rs +++ b/core/src/arm7tdmi/thumb/mod.rs @@ -6,7 +6,7 @@ use crate::byteorder::{LittleEndian, ReadBytesExt}; use crate::num::FromPrimitive; #[cfg(feature = "debugger")] -pub mod display; +pub mod disass; pub mod exec; #[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq)] diff --git a/core/src/lib.rs b/core/src/lib.rs index f34c4d3..d67b621 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -39,9 +39,9 @@ use std::fmt; #[macro_use] pub mod util; pub mod arm7tdmi; +pub use arm7tdmi::disass; mod bios; pub mod cartridge; -pub mod disass; pub mod gpu; mod sched; pub mod sound;