Skip to content

Commit

Permalink
drc: fix wrong stop check
Browse files Browse the repository at this point in the history
would return prematurely because of this
  • Loading branch information
notaz committed Jan 15, 2025
1 parent 8e9d82d commit bb17f8f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions libpcsxcore/new_dynarec/emu_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions libpcsxcore/new_dynarec/linkage_arm.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions libpcsxcore/new_dynarec/linkage_arm64.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down
1 change: 0 additions & 1 deletion libpcsxcore/psxevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bb17f8f

Please sign in to comment.