]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
JIT slowdown fix
authorToni Wilen <twilen@winuae.net>
Fri, 26 Feb 2010 17:21:43 +0000 (19:21 +0200)
committerToni Wilen <twilen@winuae.net>
Fri, 26 Feb 2010 17:21:43 +0000 (19:21 +0200)
custom.cpp
include/custom.h
include/events_jit.h
include/newcpu.h
newcpu.cpp

index 8501d19fae3d1bfcb39fc96dd971a2b8eb13eeaa..a9384a65d4a001ddd80d27085a1a7e7efdbd9ead 100644 (file)
@@ -3411,6 +3411,16 @@ static void INTENA (uae_u16 v)
 #endif
 }
 
+void INTREQ_f (uae_u16 v)
+{
+       if (use_eventmode (v)) {
+               send_intreq_do (v);
+       } else {
+               intreq |= v;
+               intreq_internal |= v;
+       }
+}
+
 void INTREQ_0 (uae_u16 v)
 {
        uae_u16 old = intreq;
index 1c0aae6aa6f4445ba37674628dc225fc462100ab..f351c28495ecd0b4f76cd3d24ef6a43090b5a6f7 100644 (file)
@@ -76,7 +76,7 @@ extern int joy0button, joy1button;
 
 extern void INTREQ (uae_u16);
 extern void INTREQ_0 (uae_u16);
-extern void INTREQ_f (uae_u32);
+extern void INTREQ_f (uae_u16);
 extern void send_interrupt (int num, int delay);
 extern uae_u16 INTREQR (void);
 
index 123765d7439f039affb9a594bc43486b1cdaaa4f..e01530dc3c276ed424eb94fca1095eb310b4569c 100644 (file)
@@ -27,7 +27,7 @@ extern signed long pissoff;
 
 STATIC_INLINE void cycles_do_special (void)
 {
-       if (pissoff > 0)
+       if (pissoff >= 0)
                pissoff = -1;
 }
 
index f59cac77a721b7ecd29ecf9173a38b379da27c7c..6be54dfb0805c653039044fb7d51c9a8b002394e 100644 (file)
@@ -163,8 +163,6 @@ struct regstruct
        uae_u32 prefetch020data;
        uae_u32 prefetch020addr;
        int ce020memcycles;
-       evt lastfetch;
-
 };
 
 extern struct regstruct regs;
@@ -177,11 +175,14 @@ STATIC_INLINE uae_u32 munge24 (uae_u32 x)
 extern int mmu_enabled, mmu_triggered;
 extern int cpu_cycles;
 extern int cpucycleunit;
-
+#ifdef JIT
+extern uae_u8* compiled_code;
+#endif
 STATIC_INLINE void set_special (uae_u32 x)
 {
        regs.spcflags |= x;
-       cycles_do_special ();
+       if (compiled_code)
+               cycles_do_special ();
 }
 
 STATIC_INLINE void unset_special (uae_u32 x)
index 95e3a6d30ce7a069a05a4d9088d7d5c6e1ca2160..9b2c6d62a9d029747541b064ef22fe6b91f7cd3b 100644 (file)
@@ -2987,7 +2987,7 @@ static void m68k_run_jit (void)
                ((compiled_handler*)(pushall_call_handler))();
                /* Whenever we return from that, we should check spcflags */
                if (uae_int_requested) {
-                       intreq |= 0x0008;
+                       INTREQ_f (0x8008);
                        set_special (SPCFLAG_INT);
                }
                if (regs.spcflags) {