Skip to content

Commit

Permalink
RSP: Set RSP_JumpTo before register in JALR, BLTZAL, BGEZAL
Browse files Browse the repository at this point in the history
  • Loading branch information
project64 committed Aug 24, 2023
1 parent ae9912b commit 47f1401
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Project64-rsp-core/cpu/RSPInterpreterOps.cpp
Expand Up @@ -275,8 +275,8 @@ void RSP_Special_JR(void)
void RSP_Special_JALR(void)
{
RSP_NextInstruction = RSPPIPELINE_DELAY_SLOT;
RSP_GPR[RSPOpC.rd].W = (*PrgCount + 8) & 0xFFC;
RSP_JumpTo = (RSP_GPR[RSPOpC.rs].W & 0xFFC);
RSP_GPR[RSPOpC.rd].W = (*PrgCount + 8) & 0xFFC;
}

void RSP_Special_BREAK(void)
Expand Down Expand Up @@ -357,15 +357,15 @@ void RSP_Opcode_BGEZ(void)
void RSP_Opcode_BLTZAL(void)
{
RSP_NextInstruction = RSPPIPELINE_DELAY_SLOT;
RSP_GPR[31].UW = (*PrgCount + 8) & 0xFFC;
RSP_JumpTo = RSP_branch_if(RSP_GPR[RSPOpC.rs].W < 0);
RSP_GPR[31].UW = (*PrgCount + 8) & 0xFFC;
}

void RSP_Opcode_BGEZAL(void)
{
RSP_NextInstruction = RSPPIPELINE_DELAY_SLOT;
RSP_GPR[31].UW = (*PrgCount + 8) & 0xFFC;
RSP_JumpTo = RSP_branch_if(RSP_GPR[RSPOpC.rs].W >= 0);
RSP_GPR[31].UW = (*PrgCount + 8) & 0xFFC;
}

// COP0 functions
Expand Down

0 comments on commit 47f1401

Please sign in to comment.