From ce589d323804d87d34be3479204f4061031aacd1 Mon Sep 17 00:00:00 2001 From: Frode Solheim Date: Sun, 6 Sep 2015 21:47:36 +0200 Subject: [PATCH] JIT: removed USE_MATCHSTATE code --- jit/compemu_support.cpp | 223 ---------------------------------------- 1 file changed, 223 deletions(-) diff --git a/jit/compemu_support.cpp b/jit/compemu_support.cpp index 53c14c98..25a0845d 100644 --- a/jit/compemu_support.cpp +++ b/jit/compemu_support.cpp @@ -32,7 +32,6 @@ #ifdef UAE #define writemem_special writemem #define readmem_special readmem -#define USE_MATCHSTATE 0 #else #if !FIXED_ADDRESSING #error "Only Fixed Addressing is supported with the JIT Compiler" @@ -553,11 +552,7 @@ static inline void attached_state(blockinfo* bi) bi->status=BI_TARGETTED; } -#ifdef UAE -static inline blockinfo* get_blockinfo_addr_new(void* addr, int setstate) -#else static inline blockinfo* get_blockinfo_addr_new(void* addr, int /* setstate */) -#endif { blockinfo* bi=get_blockinfo_addr(addr); int i; @@ -580,14 +575,6 @@ static inline blockinfo* get_blockinfo_addr_new(void* addr, int /* setstate */) if (!bi) { jit_abort("Looking for blockinfo, can't find free one"); } - -#if USE_MATCHSTATE - if (setstate && - !bi->havestate) { - big_to_small_state(&live,&(bi->env)); - attached_state(bi); - } -#endif return bi; } @@ -2322,210 +2309,10 @@ void init_comp(void) raw_fp_init(); } -static void vinton(int i, uae_s8* vton, int depth) -{ - int n; - int rr; - - Dif (vton[i]==-1) { - jit_abort (_T("JIT: Asked to load register %d, but nowhere to go\n"),i); - } - n=vton[i]; - Dif (live.nat[n].nholds>1) - jit_abort (_T("vinton")); - if (live.nat[n].nholds && depthnat[i].validsize) - vton[s->nat[i].holds]=i; - - flush_flags(); /* low level */ - sync_m68k_pc(); /* mid level */ - - /* We don't do FREGS yet, so this is raw flush() code */ - for (i=0;is->nat[vton[i]].dirtysize) - tomem(i); - /* Fall-through! */ - case CLEAN: - if (vton[i]==-1 || - live.state[i].validsizenat[vton[i]].validsize) - evict(i); - else - make_exclusive(i,0,-1); - break; - case INMEM: - break; - case UNDEF: - break; - default: - write_log (_T("JIT: Weird status: %d\n"),live.state[i].status); - abort(); - } - } - - /* Quick consistency check */ - for (i=0;is->nat[n].dirtysize) - abort; - if (live.state[i].validsizenat[n].validsize) - abort; - live.state[i].dirtysize=s->nat[n].dirtysize; - live.state[i].validsize=s->nat[n].validsize; - if (live.state[i].dirtysize) - set_status(i,DIRTY); - break; - case UNDEF: - break; - } - if (n!=-1) - live.nat[n].touched=touchcnt++; - } -} -#else static inline void match_states(smallstate* s) { flush(1); } -#endif /* Only do this if you really mean it! The next call should be to init!*/ void flush(int save_regs) @@ -3797,13 +3584,6 @@ void compile_block(cpu_history* pc_hist, int blocklen, int totcycles) was_comp=0; -#if USE_MATCHSTATE - comp_pc_p=(uae_u8*)pc_hist[0].location; - init_comp(); - match_states(&(bi->env)); - was_comp=1; -#endif - bi->direct_handler=(cpuop_func*)get_target(); set_dhtu(bi,bi->direct_handler); current_block_start_target=(uintptr)get_target(); @@ -3964,9 +3744,6 @@ void compile_block(cpu_history* pc_hist, int blocklen, int totcycles) cc=branch_cc^1; } -#if !USE_MATCHSTATE - flush_keepflags(); -#endif tmp=live; /* ouch! This is big... */ raw_jcc_l_oponly(cc); branchadd=(uae_u32*)get_target(); -- 2.47.3