diff options
Diffstat (limited to 'src/ARMJIT_Memory.cpp')
-rw-r--r-- | src/ARMJIT_Memory.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/ARMJIT_Memory.cpp b/src/ARMJIT_Memory.cpp index 361a1ed..7ed9b8d 100644 --- a/src/ARMJIT_Memory.cpp +++ b/src/ARMJIT_Memory.cpp @@ -49,9 +49,6 @@ #include <stdlib.h> -using Platform::Log; -using Platform::LogLevel; - /* We're handling fastmem here. @@ -100,6 +97,12 @@ using Platform::LogLevel; #endif #endif +namespace melonDS +{ + +using Platform::Log; +using Platform::LogLevel; + #if defined(__ANDROID__) #define ASHMEM_DEVICE "/dev/ashmem" #endif @@ -562,7 +565,7 @@ bool ARMJIT_Memory::MapAtAddress(u32 addr) noexcept } #endif - ARMJIT::AddressRange* range = JIT.CodeMemRegions[region] + memoryOffset / 512; + AddressRange* range = JIT.CodeMemRegions[region] + memoryOffset / 512; // this overcomplicated piece of code basically just finds whole pieces of code memory // which can be mapped/protected @@ -580,9 +583,9 @@ bool ARMJIT_Memory::MapAtAddress(u32 addr) noexcept else { u32 sectionOffset = offset; - bool hasCode = isExecutable && ARMJIT::PageContainsCode(&range[offset / 512]); + bool hasCode = isExecutable && PageContainsCode(&range[offset / 512]); while (offset < mirrorSize - && (!isExecutable || ARMJIT::PageContainsCode(&range[offset / 512]) == hasCode) + && (!isExecutable || PageContainsCode(&range[offset / 512]) == hasCode) && (!skipDTCM || mirrorStart + offset != NDS::ARM9->DTCMBase)) { assert(states[(mirrorStart + offset) >> 12] == memstate_Unmapped); @@ -617,7 +620,7 @@ bool ARMJIT_Memory::MapAtAddress(u32 addr) noexcept return true; } -bool ARMJIT_Memory::FaultHandler(FaultDescription& faultDesc, ARMJIT::ARMJIT& jit) +bool ARMJIT_Memory::FaultHandler(FaultDescription& faultDesc, ARMJIT& jit) { if (jit.JITCompiler.IsJITFault(faultDesc.FaultPC)) { @@ -638,7 +641,7 @@ bool ARMJIT_Memory::FaultHandler(FaultDescription& faultDesc, ARMJIT::ARMJIT& ji const u64 AddrSpaceSize = 0x100000000; -ARMJIT_Memory::ARMJIT_Memory(ARMJIT::ARMJIT& jit) noexcept : JIT(jit) +ARMJIT_Memory::ARMJIT_Memory(ARMJIT& jit) noexcept : JIT(jit) { #if defined(__SWITCH__) MemoryBase = (u8*)aligned_alloc(0x1000, MemoryTotalSize); @@ -1365,3 +1368,4 @@ void* ARMJIT_Memory::GetFuncForAddr(ARM* cpu, u32 addr, bool store, int size) co } return NULL; } +}
\ No newline at end of file |