]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
JIT: Removed currprefs.optcount, use static optcount array instead
authorFrode Solheim <frode@fs-uae.net>
Fri, 18 Sep 2015 21:45:58 +0000 (23:45 +0200)
committerFrode Solheim <frode@fs-uae.net>
Fri, 18 Sep 2015 21:45:58 +0000 (23:45 +0200)
cfgfile.cpp
include/options.h
jit/compemu_support.cpp

index b7c86a1f3b8f18f7dc5f744653a063b01d7cc1c8..1b37c340ce6209d93e733e1c17b5e15142a6f130 100644 (file)
@@ -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;
index 2c78af7325fb582abe75811943c23613cc4f90c4..daca454e6950f9979f0a193e72e212482355016b 100644 (file)
@@ -397,7 +397,6 @@ struct uae_prefs {
        bool comp_oldsegv;
 
        int cachesize;
-       int optcount[10];
 
        bool avoid_cmov;
 
index 3fdb2f8df08306ba691954e18d4bcda68d1f1807..9102ca81981fe17d7b678f9e92d741ee931ae224 100644 (file)
@@ -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;