diff --git a/core/hw/sh4/dyna/decoder.cpp b/core/hw/sh4/dyna/decoder.cpp index e0e4e401e..742216508 100644 --- a/core/hw/sh4/dyna/decoder.cpp +++ b/core/hw/sh4/dyna/decoder.cpp @@ -1057,6 +1057,7 @@ bool dec_DecodeBlock(RuntimeBlockInfo* rbi,u32 max_cycles) u32 op; if (!mmu_enabled()) op = IReadMem16(state.cpu.rpc); +#ifndef NO_MMU else { u32 exception_occurred; @@ -1064,6 +1065,7 @@ bool dec_DecodeBlock(RuntimeBlockInfo* rbi,u32 max_cycles) if (exception_occurred) return false; } +#endif if (op==0 && state.cpu.is_delayslot) { printf("Delayslot 0 hack!\n"); @@ -1157,7 +1159,7 @@ _end: if (settings.dynarec.idleskip) { //Experimental hash-id based idle skip - if (strstr(idle_hash,blk->hash(false,true))) + if (strstr(idle_hash,blk->hash(false,true))) // FIXME don't hash temp blocks. Use xxhash instead of sha1 { //printf("IDLESKIP: %08X reloc match %s\n",blk->addr,blk->hash(false,true)); blk->guest_cycles=max_cycles*100; diff --git a/core/rec-ARM64/rec_arm64.cpp b/core/rec-ARM64/rec_arm64.cpp index d0a829c5d..343a80639 100644 --- a/core/rec-ARM64/rec_arm64.cpp +++ b/core/rec-ARM64/rec_arm64.cpp @@ -290,6 +290,7 @@ RuntimeBlockInfo* ngen_AllocateBlock() template static T ReadMemNoEx(u32 addr, u32 pc) { +#ifndef NO_MMU u32 ex; T rv = mmu_ReadMemNoEx(addr, &ex); if (ex) @@ -301,11 +302,15 @@ static T ReadMemNoEx(u32 addr, u32 pc) longjmp(jmp_env, 1); } return rv; +#else + return (T)0; // not used +#endif } template static void WriteMemNoEx(u32 addr, T data, u32 pc) { +#ifndef NO_MMU u32 ex = mmu_WriteMemNoEx(addr, data); if (ex) { @@ -315,6 +320,7 @@ static void WriteMemNoEx(u32 addr, T data, u32 pc) spc = pc; longjmp(jmp_env, 1); } +#endif } static u32 interpreter_fallback(u16 op, u32 pc) @@ -1619,7 +1625,7 @@ private: TailCallRuntime(ngen_blockcheckfail); Bind(&blockcheck_success); -/* + if (mmu_enabled() && block->has_fpu_op) { Label fpu_enabled; @@ -1635,7 +1641,6 @@ private: Bind(&fpu_enabled); } -*/ } void shil_param_to_host_reg(const shil_param& param, const Register& reg) diff --git a/core/rec-x64/rec_x64.cpp b/core/rec-x64/rec_x64.cpp index 9c413ed8a..9723ffc43 100644 --- a/core/rec-x64/rec_x64.cpp +++ b/core/rec-x64/rec_x64.cpp @@ -224,6 +224,7 @@ static u32 exception_raised; template static T ReadMemNoEx(u32 addr, u32 pc) { +#ifndef NO_MMU T rv = mmu_ReadMemNoEx(addr, &exception_raised); if (exception_raised) { @@ -235,11 +236,16 @@ static T ReadMemNoEx(u32 addr, u32 pc) longjmp(jmp_env, 1); } return rv; +#else + // not used + return (T)0; +#endif } template static void WriteMemNoEx(u32 addr, T data, u32 pc) { +#ifndef NO_MMU exception_raised = mmu_WriteMemNoEx(addr, data); if (exception_raised) { @@ -250,6 +256,7 @@ static void WriteMemNoEx(u32 addr, T data, u32 pc) spc = pc; longjmp(jmp_env, 1); } +#endif } static void interpreter_fallback(u16 op, OpCallFP *oph, u32 pc)