From 0111ee7fac41414c89be8e982aa0da88704e8b56 Mon Sep 17 00:00:00 2001 From: Jaklyy <102590697+Jaklyy@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:11:24 -0500 Subject: [PATCH] micro-optimization --- src/ARM.h | 8 ++++---- src/NDS.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ARM.h b/src/ARM.h index 97974d21..44b7d259 100644 --- a/src/ARM.h +++ b/src/ARM.h @@ -798,7 +798,7 @@ public: u32 DTCMMask; //! Internal: DTCM Address Mask used in conjunction with @ref DTCMBase to check for DTCM access s32 RegionCodeCycles; //! Internal: Cached amount of cycles to fetch instruction from the current code region. - u8 ITCM[ITCMPhysicalSize]; //! Content of the ITCM + alignas(u32) u8 ITCM[ITCMPhysicalSize]; //! Content of the ITCM u8* DTCM; //! Content of the DTCM alignas(u32) u8 ICache[ICACHE_SIZE]; //! Instruction Cache Content organized in @ref ICACHE_LINESPERSET times @ref ICACHE_SETS times @ref ICACHE_LINELENGTH bytes @@ -837,11 +837,11 @@ public: bool (*GetMemRegion)(u32 addr, bool write, MemRegion* region); - u64 ITCMTimestamp; - u64 TimestampMemory; - void (ARMv5::*FuncQueue[32])(void); + alignas(64) void (ARMv5::*FuncQueue[32])(void); void (ARMv5::*DelayedQueue)(void); // adding more than one new entry to the queue while it's already active does not work. so uh. we use this to work around that. it's less than ideal... void (ARMv5::*StartExec)(void); + u64 ITCMTimestamp; + u64 TimestampMemory; u32 PC; bool NullFetch; bool Store; diff --git a/src/NDS.h b/src/NDS.h index 1c1c487f..6c430aa5 100644 --- a/src/NDS.h +++ b/src/NDS.h @@ -281,8 +281,8 @@ public: // TODO: Encapsulate the rest of these members protected: // These BIOS arrays should be declared *before* the component objects (JIT, SPI, etc.) // so that they're initialized before the component objects' constructors run. - std::array ARM9BIOS; - std::array ARM7BIOS; + alignas(u32) std::array ARM9BIOS; + alignas(u32) std::array ARM7BIOS; bool ARM9BIOSNative; bool ARM7BIOSNative; public: // TODO: Encapsulate the rest of these members