]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
68020/030 prefetch pipeline update.
authorToni Wilen <twilen@winuae.net>
Wed, 12 Aug 2015 16:18:17 +0000 (19:18 +0300)
committerToni Wilen <twilen@winuae.net>
Wed, 12 Aug 2015 16:18:17 +0000 (19:18 +0300)
gencpu.cpp
newcpu.cpp

index 67773c4ffecaa09883fb498d271f6e6a2a99bf44..911b5060d86409e645415cadcbb88ed1e0c8f4f6 100644 (file)
@@ -3848,7 +3848,7 @@ static void gen_opcode (unsigned int opcode)
                clear_m68k_offset();
                tail_ce020_done = true;
                fill_prefetch_full ();
-               branch_inst = 2;
+               branch_inst = 1;
                break;
        case i_RTD:
                addop_ce020 (curi, 0);
@@ -3871,7 +3871,7 @@ static void gen_opcode (unsigned int opcode)
                tail_ce020_done = true;
                fill_prefetch_full ();
            need_endlabel = 1;
-               branch_inst = 2;
+               branch_inst = 1;
                break;
        case i_LINK:
                // ce confirmed
@@ -3939,7 +3939,7 @@ static void gen_opcode (unsigned int opcode)
                clear_m68k_offset();
                fill_prefetch_full ();
            need_endlabel = 1;
-               branch_inst = 2;
+               branch_inst = 1;
                break;
        case i_TRAPV:
                sync_m68k_pc ();
@@ -3968,6 +3968,7 @@ static void gen_opcode (unsigned int opcode)
                clear_m68k_offset();
                fill_prefetch_full ();
            need_endlabel = 1;
+               branch_inst = 1;
                tail_ce020_done = true;
                break;
        case i_JSR:
index 79bae77900c4bebb76e10e12a537c72d741159f7..753f38d6906d1c7be654793252d3d9f9c44b62ed 100644 (file)
@@ -1284,7 +1284,7 @@ static void build_cpufunctbl (void)
                        if (f == op_illg_1)
                                abort ();
                        cpufunctbl[opcode] = f;
-                       memcpy(&cpudatatbl[opcode], &cpudatatbl[idx], sizeof cputbl_data);
+                       memcpy(&cpudatatbl[opcode], &cpudatatbl[idx], sizeof(struct cputbl_data));
                        opcnt++;
                }
        }
@@ -2877,7 +2877,7 @@ static void m68k_reset2(bool hardreset)
 
        regs.halted = 0;
        gui_data.cpu_halted = 0;
-       gui_led (LED_CPU, 0);
+       gui_led (LED_CPU, 0, -1);
 
        regs.spcflags = 0;
        m68k_reset_delay = 0;
@@ -4391,7 +4391,7 @@ void cpu_halt (int id)
                write_log (_T("CPU halted: reason = %d PC=%08x\n"), id, M68K_GETPC);
                regs.halted = id;
                gui_data.cpu_halted = id;
-               gui_led(LED_CPU, 0);
+               gui_led(LED_CPU, 0, -1);
                if (id >= 0) {
                        regs.intmask = 7;
                        MakeSR ();
@@ -6712,6 +6712,7 @@ static void pipeline_020(uae_u16 w, uaecptr pc)
        int branch = cpudatatbl[w].branch;
        if (regs.pipeline_pos > 0 && branch) {
                // Short branches (Bcc.s) still do one more prefetch.
+#if 0
                // RTS and other unconditional single opcode instruction stop immediately.
                if (branch == 2) {
                        // Immediate stop
@@ -6720,6 +6721,9 @@ static void pipeline_020(uae_u16 w, uaecptr pc)
                        // Stop 1 word early than normally
                        regs.pipeline_stop = 1;
                }
+#else
+               regs.pipeline_stop = 1;
+#endif
        }
 }