diff --git a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp index 13999210..062f1172 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp +++ b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp @@ -266,7 +266,7 @@ void powerpc_cpu::initialize() // Initialize block lookup table #if PPC_DECODE_CACHE || PPC_ENABLE_JIT - block_cache.initialize(); + my_block_cache.initialize(); #endif // Init cache range invalidate recorder @@ -551,7 +551,7 @@ void *powerpc_cpu::compile_chain_block(block_info *sbi) const uint32 bpc = sbi->pc; const uint32 tpc = sbi->li[n].jmp_pc; - block_info *tbi = block_cache.find(tpc); + block_info *tbi = my_block_cache.find(tpc); if (tbi == NULL) tbi = compile_block(tpc); assert(tbi && tbi->pc == tpc); @@ -573,7 +573,7 @@ void powerpc_cpu::execute(uint32 entry) if (execute_depth == 1 || (PPC_ENABLE_JIT && PPC_REENTRANT_JIT)) { #if PPC_ENABLE_JIT if (use_jit) { - block_info *bi = block_cache.find(pc()); + block_info *bi = my_block_cache.find(pc()); if (bi == NULL) bi = compile_block(pc()); for (;;) { @@ -596,7 +596,7 @@ void powerpc_cpu::execute(uint32 entry) // Don't check for backward branches here as this // is now done by generated code. Besides, we will // get here if the fast cache lookup failed too. - if ((bi = block_cache.find(pc())) == NULL) + if ((bi = my_block_cache.find(pc())) == NULL) break; } @@ -607,7 +607,7 @@ void powerpc_cpu::execute(uint32 entry) } #endif #if PPC_DECODE_CACHE - block_info *bi = block_cache.find(pc()); + block_info *bi = my_block_cache.find(pc()); if (bi != NULL) goto pdi_execute; for (;;) { @@ -617,7 +617,7 @@ void powerpc_cpu::execute(uint32 entry) clock_t start_time; start_time = clock(); #endif - bi = block_cache.new_blockinfo(); + bi = my_block_cache.new_blockinfo(); bi->init(pc()); // Predecode a new block @@ -667,8 +667,8 @@ void powerpc_cpu::execute(uint32 entry) bi->min_pc = dpc; bi->max_pc = entry; bi->size = di - bi->di; - block_cache.add_to_cl_list(bi); - block_cache.add_to_active_list(bi); + my_block_cache.add_to_cl_list(bi); + my_block_cache.add_to_active_list(bi); decode_cache_p += bi->size; #if PPC_PROFILE_COMPILE_TIME compile_time += (clock() - start_time); @@ -702,7 +702,7 @@ void powerpc_cpu::execute(uint32 entry) } } - if ((bi->pc != pc()) && ((bi = block_cache.find(pc())) == NULL)) + if ((bi->pc != pc()) && ((bi = my_block_cache.find(pc())) == NULL)) break; } } @@ -778,8 +778,8 @@ void powerpc_cpu::invalidate_cache() { D(bug("Invalidate all cache blocks\n")); #if PPC_DECODE_CACHE || PPC_ENABLE_JIT - block_cache.clear(); - block_cache.initialize(); + my_block_cache.clear(); + my_block_cache.initialize(); spcflags().set(SPCFLAG_JIT_EXEC_RETURN); #endif #if PPC_ENABLE_JIT @@ -822,6 +822,6 @@ void powerpc_cpu::invalidate_cache_range(uintptr start, uintptr end) } #endif spcflags().set(SPCFLAG_JIT_EXEC_RETURN); - block_cache.clear_range(start, end); + my_block_cache.clear_range(start, end); #endif } diff --git a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp index ba071a7c..18b0faef 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp +++ b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp @@ -351,7 +351,7 @@ private: // Block lookup table typedef powerpc_block_info block_info; - block_cache< block_info, lazy_allocator > block_cache; + block_cache< block_info, lazy_allocator > my_block_cache; #if PPC_DECODE_CACHE // Decode Cache diff --git a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-dyngen-ops.cpp b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-dyngen-ops.cpp index c0a79a4d..5ee2648a 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-dyngen-ops.cpp +++ b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-dyngen-ops.cpp @@ -100,7 +100,7 @@ struct powerpc_dyngen_helper { static inline powerpc_fpr & reg_F3() { return CPU->codegen.reg_F3; } //#endif - static inline powerpc_block_info *find_block(uint32 pc) { return CPU->block_cache.fast_find(pc); } + static inline powerpc_block_info *find_block(uint32 pc) { return CPU->my_block_cache.fast_find(pc); } }; // Semantic action templates @@ -1380,13 +1380,13 @@ static inline void do_lmw(void) } template<> -static inline void do_lmw<31>(void) +inline void do_lmw<31>(void) { CPU->gpr(31) = vm_read_memory_4(T0); } template<> -static inline void do_lmw<32>(void) +inline void do_lmw<32>(void) { for (uint32 r = PARAM1, ad = T0; r <= 31; r++, ad += 4) CPU->gpr(r) = vm_read_memory_4(ad); @@ -1402,13 +1402,13 @@ static inline void do_stmw(void) } template<> -static inline void do_stmw<31>(void) +inline void do_stmw<31>(void) { vm_write_memory_4(T0, CPU->gpr(31)); } template<> -static inline void do_stmw<32>(void) +inline void do_stmw<32>(void) { for (uint32 r = PARAM1, ad = T0; r <= 31; r++, ad += 4) vm_write_memory_4(ad, CPU->gpr(r)); diff --git a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-translate.cpp b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-translate.cpp index 77857b71..f9d88d9f 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-translate.cpp +++ b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-translate.cpp @@ -143,7 +143,7 @@ powerpc_cpu::compile_block(uint32 entry_point) codegen_context_t cg_context(dg); cg_context.entry_point = entry_point; again: - block_info *bi = block_cache.new_blockinfo(); + block_info *bi = my_block_cache.new_blockinfo(); bi->init(entry_point); bi->entry_point = dg.gen_start(entry_point); @@ -1576,11 +1576,11 @@ powerpc_cpu::compile_block(uint32 entry_point) disasm_translation(entry_point, dpc - entry_point + 4, bi->entry_point, bi->size); dg.gen_end(); - block_cache.add_to_cl_list(bi); + my_block_cache.add_to_cl_list(bi); if (is_read_only_memory(bi->pc)) - block_cache.add_to_dormant_list(bi); + my_block_cache.add_to_dormant_list(bi); else - block_cache.add_to_active_list(bi); + my_block_cache.add_to_active_list(bi); #if PPC_PROFILE_COMPILE_TIME compile_time += (clock() - start_time); #endif