From: Frode Solheim Date: Fri, 18 Sep 2015 21:45:58 +0000 (+0200) Subject: JIT: Removed currprefs.optcount, use static optcount array instead X-Git-Tag: 3200~62^2~5 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=288d8e7f7026e1d0e8190fcfad28febaf0e843a4;p=francis%2Fwinuae.git JIT: Removed currprefs.optcount, use static optcount array instead --- diff --git a/cfgfile.cpp b/cfgfile.cpp index b7c86a1f..1b37c340 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -6036,15 +6036,6 @@ void default_prefs (struct uae_prefs *p, int type) p->comp_midopt = 0; p->comp_lowopt = 0; - for (i = 0;i < 10; i++) - p->optcount[i] = -1; - p->optcount[0] = 4; /* How often a block has to be executed before it is translated */ - p->optcount[1] = 0; /* How often to use the naive translation */ - p->optcount[2] = 0; - p->optcount[3] = 0; - p->optcount[4] = 0; - p->optcount[5] = 0; - p->gfx_framerate = 1; p->gfx_autoframerate = 50; p->gfx_size_fs.width = 800; diff --git a/include/options.h b/include/options.h index 2c78af73..daca454e 100644 --- a/include/options.h +++ b/include/options.h @@ -397,7 +397,6 @@ struct uae_prefs { bool comp_oldsegv; int cachesize; - int optcount[10]; bool avoid_cmov; diff --git a/jit/compemu_support.cpp b/jit/compemu_support.cpp index 3fdb2f8d..9102ca81 100644 --- a/jit/compemu_support.cpp +++ b/jit/compemu_support.cpp @@ -275,7 +275,11 @@ static bool setzflg_uses_bsf = false; // setzflg virtual instruction can use na static int align_loops = 32; // Align the start of loops static int align_jumps = 32; // Align the start of jumps static int optcount[10] = { +#ifdef UAE + 4, // How often a block has to be executed before it is translated +#else 10, // How often a block has to be executed before it is translated +#endif 0, // How often to use naive translation 0, 0, 0, 0, -1, -1, -1, -1 @@ -590,11 +594,7 @@ static inline void invalidate_block(blockinfo* bi) int i; bi->optlevel=0; -#ifdef UAE - bi->count=currprefs.optcount[0]-1; -#else bi->count=optcount[0]-1; -#endif bi->handler=NULL; bi->handler_to_use=(cpuop_func*)popall_execute_normal; bi->direct_handler=NULL; @@ -4352,15 +4352,9 @@ static void compile_block(cpu_history* pc_hist, int blocklen) } if (bi->count==-1) { optlev++; -#ifdef UAE - while (!currprefs.optcount[optlev]) - optlev++; - bi->count=currprefs.optcount[optlev]-1; -#else while (!optcount[optlev]) optlev++; bi->count=optcount[optlev]-1; -#endif } current_block_pc_p=(uintptr)pc_hist[0].location;