drc: fix wrong stop check
authornotaz <notasas@gmail.com>
Wed, 15 Jan 2025 23:20:30 +0000 (01:20 +0200)
committernotaz <notasas@gmail.com>
Wed, 15 Jan 2025 23:20:30 +0000 (01:20 +0200)
would return prematurely because of this

libpcsxcore/new_dynarec/emu_if.c
libpcsxcore/new_dynarec/linkage_arm.S
libpcsxcore/new_dynarec/linkage_arm64.S
libpcsxcore/psxevents.c

index a9122c8..bed98e1 100644 (file)
@@ -224,13 +224,13 @@ static void ari64_execute_until(psxRegisters *regs)
        void *drc_local = (char *)regs - LO_psxRegs;
 
        assert(drc_local == dynarec_local);
-       evprintf("ari64_execute %08x, %u->%u (%d)\n", regs->pc,
-               regs->cycle, regs->next_interupt, regs->next_interupt - regs->cycle);
+       evprintf("+exec %08x, %u->%u (%d)\n", regs->pc, regs->cycle,
+               regs->next_interupt, regs->next_interupt - regs->cycle);
 
        new_dyna_start(drc_local);
 
-       evprintf("ari64_execute end %08x, %u->%u (%d)\n", regs->pc,
-               regs->cycle, regs->next_interupt, regs->next_interupt - regs->cycle);
+       evprintf("-exec %08x, %u->%u (%d) stop %d \n", regs->pc, regs->cycle,
+               regs->next_interupt, regs->next_interupt - regs->cycle, regs->stop);
 }
 
 static void ari64_execute(struct psxRegisters *regs)
index 37afa97..39afc88 100644 (file)
@@ -251,7 +251,7 @@ FUNCTION(cc_interrupt):
        ldr     r10, [fp, #LO_cycle]
        ldr     r0, [fp, #LO_pcaddr]
        ldr     r1, [fp, #LO_next_interupt]
-       ldr     r2, [fp, #LO_stop]
+       ldrb    r2, [fp, #LO_stop]
        str     r1, [fp, #LO_last_count]
        sub     r10, r10, r1
        tst     r2, r2
@@ -307,7 +307,7 @@ call_psxException:
        /* note: psxException might do recursive recompiler call from it's HLE code,
         * so be ready for this */
 FUNCTION(jump_to_new_pc):
-       ldr     r2, [fp, #LO_stop]
+       ldrb    r2, [fp, #LO_stop]
        ldr     r1, [fp, #LO_next_interupt]
        ldr     r10, [fp, #LO_cycle]
        ldr     r0, [fp, #LO_pcaddr]
index 9203b98..fb961cc 100644 (file)
@@ -112,7 +112,7 @@ FUNCTION(cc_interrupt):
        ldr     rCC, [rFP, #LO_cycle]
        ldr     w0, [rFP, #LO_pcaddr]
        ldr     w1, [rFP, #LO_next_interupt]
-       ldr     w2, [rFP, #LO_stop]
+       ldrb    w2, [rFP, #LO_stop]
        str     w1, [rFP, #LO_last_count]
        sub     rCC, rCC, w1
        cbnz    w2, new_dyna_leave
@@ -169,7 +169,7 @@ call_psxException:
        /* note: psxException might do recursive recompiler call from it's HLE code,
         * so be ready for this */
 FUNCTION(jump_to_new_pc):
-       ldr     w2, [rFP, #LO_stop]
+       ldrb    w2, [rFP, #LO_stop]
        ldr     w1, [rFP, #LO_next_interupt]
        ldr     rCC, [rFP, #LO_cycle]
        ldr     w0, [rFP, #LO_pcaddr]
index d90804e..64fbbe3 100644 (file)
@@ -63,7 +63,6 @@ static irq_func * const irq_funcs[] = {
        [PSXINT_RCNT] = psxRcntUpdate,
 };
 
-/* local dupe of psxBranchTest, using event_cycles */
 void irq_test(psxCP0Regs *cp0)
 {
        psxRegisters *regs = cp0TOpsxRegs(cp0);