From f680f768fe3650b97fdbc401a7a59305594e245e Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 7 May 2017 14:58:36 +0300 Subject: [PATCH] Cleanup. --- gfxboard.cpp | 2 +- include/newcpu.h | 8 ++++---- jit/compemu.h | 12 ++---------- jit/compemu_support.cpp | 14 +++++++------- memory.cpp | 2 +- newcpu.cpp | 2 +- newcpu_common.cpp | 2 +- 7 files changed, 17 insertions(+), 25 deletions(-) diff --git a/gfxboard.cpp b/gfxboard.cpp index 60ddf714..e238177b 100644 --- a/gfxboard.cpp +++ b/gfxboard.cpp @@ -987,7 +987,7 @@ static void jit_reset (void) { #ifdef JIT if (currprefs.cachesize && (!currprefs.comptrustbyte || !currprefs.comptrustword || !currprefs.comptrustlong)) { - flush_icache (0, 3); + flush_icache (3); } #endif } diff --git a/include/newcpu.h b/include/newcpu.h index ebee8729..e6347555 100644 --- a/include/newcpu.h +++ b/include/newcpu.h @@ -659,12 +659,12 @@ extern const struct cputbl op_smalltbl_14_ff[]; // CE extern cpuop_func *cpufunctbl[65536] ASM_SYM_FOR_FUNC ("cpufunctbl"); #ifdef JIT -extern void flush_icache(uaecptr, int); -extern void flush_icache_hard(uaecptr, int); +extern void flush_icache(int); +extern void flush_icache_hard(int); extern void compemu_reset(void); #else -#define flush_icache(uaecptr, int) do {} while (0) -#define flush_icache_hard(uaecptr, int) do {} while (0) +#define flush_icache(int) do {} while (0) +#define flush_icache(int) do {} while (0) #endif bool check_prefs_changed_comp (bool); extern void flush_dcache (uaecptr, int); diff --git a/jit/compemu.h b/jit/compemu.h index f565a30d..45f06aa3 100644 --- a/jit/compemu.h +++ b/jit/compemu.h @@ -162,16 +162,8 @@ extern void set_cache_state(int enabled); extern int get_cache_state(void); extern uae_u32 get_jitted_size(void); #ifdef JIT -extern void flush_icache(uaecptr ptr, int n); -extern void flush_icache_hard(uaecptr ptr, int n); -static inline void flush_icache(int n) -{ - flush_icache(0, n); -} -static inline void flush_icache_hard(int n) -{ - flush_icache(0, n); -} +extern void flush_icache(int n); +extern void flush_icache_hard(int n); #endif extern void alloc_cache(void); extern int check_for_cache_miss(void); diff --git a/jit/compemu_support.cpp b/jit/compemu_support.cpp index 4afbc371..9fa7c339 100644 --- a/jit/compemu_support.cpp +++ b/jit/compemu_support.cpp @@ -3357,7 +3357,7 @@ void calc_disp_ea_020(int base, uae_u32 dp, int target, int tmp) void set_cache_state(int enabled) { if (enabled!=letit) - flush_icache_hard(0, 3); + flush_icache_hard(3); letit=enabled; } @@ -3436,7 +3436,7 @@ static inline uint8 *alloc_code(uint32 size) void alloc_cache(void) { if (compiled_code) { - flush_icache_hard(0, 3); + flush_icache_hard(3); vm_release(compiled_code, cache_size * 1024); compiled_code = 0; } @@ -4096,7 +4096,7 @@ static void flush_icache_none(int) /* Nothing to do. */ } -void flush_icache_hard(uaecptr ptr, int n) +void flush_icache_hard(int n) { blockinfo* bi, *dbi; @@ -4132,13 +4132,13 @@ void flush_icache_hard(uaecptr ptr, int n) we simply mark everything as "needs to be checked". */ -void flush_icache(uaecptr ptr, int n) +void flush_icache(int n) { blockinfo* bi; blockinfo* bi2; if (currprefs.comp_hardflush) { - flush_icache_hard(ptr, n); + flush_icache_hard(n); return; } soft_flush_count++; @@ -4346,7 +4346,7 @@ static void compile_block(cpu_history* pc_hist, int blocklen) redo_current_block=0; if (current_compile_p >= MAX_COMPILE_PTR) - flush_icache_hard(0, 3); + flush_icache_hard(3); alloc_blockinfos(); @@ -4829,7 +4829,7 @@ static void compile_block(cpu_history* pc_hist, int blocklen) /* We will flush soon, anyway, so let's do it now */ if (current_compile_p >= MAX_COMPILE_PTR) - flush_icache_hard(0, 3); + flush_icache_hard(3); bi->status=BI_ACTIVE; if (redo_current_block) diff --git a/memory.cpp b/memory.cpp index 7f67e917..3f278cd0 100644 --- a/memory.cpp +++ b/memory.cpp @@ -2910,7 +2910,7 @@ static void map_banks2 (addrbank *bank, int start, int size, int realsize, int q if (quick <= 0) old = debug_bankchange (-1); - flush_icache_hard (0, 3); /* Sure don't want to keep any old mappings around! */ + flush_icache_hard (3); /* Sure don't want to keep any old mappings around! */ #ifdef NATMEM_OFFSET if (!quick) delete_shmmaps (start << 16, size << 16); diff --git a/newcpu.cpp b/newcpu.cpp index 7bd2b538..b1d4d9e2 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -1257,7 +1257,7 @@ void set_cpu_caches (bool flush) if (currprefs.cpu_model < 68040) { set_cache_state (regs.cacr & 1); if (regs.cacr & 0x08) { - flush_icache (0, 3); + flush_icache (3); } } else { set_cache_state ((regs.cacr & 0x8000) ? 1 : 0); diff --git a/newcpu_common.cpp b/newcpu_common.cpp index 7c71e2c9..0e5f0056 100644 --- a/newcpu_common.cpp +++ b/newcpu_common.cpp @@ -163,7 +163,7 @@ int m68k_move2c (int regno, uae_u32 *regp) if (((opcr ^ regs.pcr) & 2) == 2) { write_log (_T("68060 FPU state: %s\n"), regs.pcr & 2 ? _T("disabled") : _T("enabled")); /* flush possible already translated FPU instructions */ - flush_icache (0, 3); + flush_icache (3); } } break; -- 2.47.3