]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Reduce unnecessary do_specialties() calls
authorToni Wilen <twilen@winuae.net>
Sun, 6 Nov 2022 17:02:39 +0000 (19:02 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 6 Nov 2022 17:02:39 +0000 (19:02 +0200)
newcpu.cpp

index 60d1432a0c42a146473ff737f01242bad20a0a00..0c537e1722c72b5d85d1695f8811f4f2fba5910d 100644 (file)
@@ -2397,7 +2397,7 @@ static void MakeFromSR_x(int t0trace)
                                regs.ipl[0] = 0;
                        }
                } else {
-                       if (regs.ipl[0] <= regs.intmask && regs.ipl_pin > newimask) {
+                       if (regs.ipl_pin <= regs.intmask && regs.ipl_pin > newimask) {
                                set_special(SPCFLAG_INT);
                        }
                }
@@ -2882,7 +2882,9 @@ kludge_me_do:
                return;
        }
 #ifdef JIT
-       set_special (SPCFLAG_END_COMPILE);
+       if (currprefs.cachesize) {
+               set_special(SPCFLAG_END_COMPILE);
+       }
 #endif
        exception_check_trace(nr);
 }
@@ -3192,7 +3194,9 @@ static void Exception_normal (int nr)
                                                }
                                                m68k_setpc (newpc);
 #ifdef JIT
-                                               set_special (SPCFLAG_END_COMPILE);
+                                               if (currprefs.cachesize) {
+                                                       set_special(SPCFLAG_END_COMPILE);
+                                               }
 #endif
                                                exception_check_trace (nr);
                                                return;
@@ -3346,7 +3350,9 @@ kludge_me_do:
        m68k_setpc (newpc);
        cache_default_data &= ~CACHE_DISABLE_ALLOCATE;
 #ifdef JIT
-       set_special (SPCFLAG_END_COMPILE);
+       if (currprefs.cachesize) {
+               set_special(SPCFLAG_END_COMPILE);
+       }
 #endif
        branch_stack_push(currpc, nextpc);
        regs.ipl_pin = intlev();
@@ -4526,10 +4532,12 @@ void doint(void)
                }
                return;
        }
-       if (currprefs.cpu_compatible && currprefs.cpu_model < 68020)
-               set_special (SPCFLAG_INT);
-       else
-               set_special (SPCFLAG_DOINT);
+       if (regs.ipl_pin > regs.intmask) {
+               if (currprefs.cpu_compatible && currprefs.cpu_model < 68020)
+                       set_special(SPCFLAG_INT);
+               else
+                       set_special(SPCFLAG_DOINT);
+       }
 }
 
 static void check_debugger(void)
@@ -4622,7 +4630,9 @@ static int do_specialties (int cycles)
                do_copper();
 
 #ifdef JIT
-       unset_special(SPCFLAG_END_COMPILE);   /* has done its job */
+       if (currprefs.cachesize) {
+               unset_special(SPCFLAG_END_COMPILE);
+       }
 #endif
 
        while ((regs.spcflags & SPCFLAG_BLTNASTY) && dmaen (DMA_BLITTER) && cycles > 0 && ((currprefs.waiting_blits && currprefs.cpu_model >= 68020) || !currprefs.blitter_cycle_exact)) {
@@ -5042,7 +5052,9 @@ static int do_specialties_thread(void)
                return 1;
 
 #ifdef JIT
-       unset_special(SPCFLAG_END_COMPILE);   /* has done its job */
+       if (currprefs.cachesize) {
+               unset_special(SPCFLAG_END_COMPILE);
+       }
 #endif
 
        if (regs.spcflags & SPCFLAG_DOTRACE)