From bb17f8f47930b88eb89ef535bff6cdcc17370548 Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 16 Jan 2025 01:20:30 +0200 Subject: [PATCH] drc: fix wrong stop check would return prematurely because of this --- libpcsxcore/new_dynarec/emu_if.c | 8 ++++---- libpcsxcore/new_dynarec/linkage_arm.S | 4 ++-- libpcsxcore/new_dynarec/linkage_arm64.S | 4 ++-- libpcsxcore/psxevents.c | 1 - 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/libpcsxcore/new_dynarec/emu_if.c b/libpcsxcore/new_dynarec/emu_if.c index a9122c81..bed98e12 100644 --- a/libpcsxcore/new_dynarec/emu_if.c +++ b/libpcsxcore/new_dynarec/emu_if.c @@ -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) diff --git a/libpcsxcore/new_dynarec/linkage_arm.S b/libpcsxcore/new_dynarec/linkage_arm.S index 37afa972..39afc88e 100644 --- a/libpcsxcore/new_dynarec/linkage_arm.S +++ b/libpcsxcore/new_dynarec/linkage_arm.S @@ -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] diff --git a/libpcsxcore/new_dynarec/linkage_arm64.S b/libpcsxcore/new_dynarec/linkage_arm64.S index 9203b98f..fb961cca 100644 --- a/libpcsxcore/new_dynarec/linkage_arm64.S +++ b/libpcsxcore/new_dynarec/linkage_arm64.S @@ -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] diff --git a/libpcsxcore/psxevents.c b/libpcsxcore/psxevents.c index d90804ed..64fbbe3f 100644 --- a/libpcsxcore/psxevents.c +++ b/libpcsxcore/psxevents.c @@ -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); -- 2.39.5