Some ifdefs to improve builds (#1325)

* mmu: hide some jit and fast mmu functions behind ifdef
* linux: move log to the correct place
This commit is contained in:
scribam 2023-12-01 15:03:59 +01:00 committed by GitHub
parent f3a774ab4e
commit db7895cea5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View File

@ -459,7 +459,9 @@ void mmu_set_state()
setSqwHandler();
}
#ifdef FAST_MMU
u32 mmuAddressLUT[0x100000];
#endif
void MMU_init()
{

View File

@ -117,6 +117,7 @@ template<typename T> void DYNACALL mmu_WriteMem(u32 adr, T data);
void mmu_TranslateSQW(u32 adr, u32* out);
#ifdef FAST_MMU
// maps 4K virtual page number to physical address
extern u32 mmuAddressLUT[0x100000];
@ -130,7 +131,9 @@ static inline void mmuAddressLUTFlush(bool full)
memset(mmuAddressLUT, 0, slotPages * sizeof(u32)); // flush slot 0
}
}
#endif
#if FEAT_SHREC == DYNAREC_JIT
static inline u32 DYNACALL mmuDynarecLookup(u32 vaddr, u32 write, u32 pc)
{
u32 paddr;
@ -157,6 +160,7 @@ static inline u32 DYNACALL mmuDynarecLookup(u32 vaddr, u32 write, u32 pc)
return paddr;
}
#endif
void MMU_init();
void MMU_reset();

View File

@ -65,8 +65,10 @@ void fault_handler(int sn, siginfo_t * si, void *segfault_ctx)
context_to_segfault(&ctx, segfault_ctx);
return;
}
#endif
ERROR_LOG(COMMON, "SIGSEGV @ %p invalid access to %p", (void *)ctx.pc, si->si_addr);
#endif
#ifdef __SWITCH__
MemoryInfo meminfo;
u32 pageinfo;