mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
jit: Avoid a super unlikely write to zero.
This commit is contained in:
parent
8afab3f94f
commit
788b9d78f8
4 changed files with 5 additions and 4 deletions
|
@ -509,7 +509,7 @@ void ArmJit::Comp_JumpReg(MIPSOpcode op)
|
|||
}
|
||||
MIPSGPReg rs = _RS;
|
||||
MIPSGPReg rd = _RD;
|
||||
bool andLink = (op & 0x3f) == 9;
|
||||
bool andLink = (op & 0x3f) == 9 && rd != MIPS_REG_ZERO;
|
||||
|
||||
MIPSOpcode delaySlotOp = Memory::Read_Instruction(js.compilerPC + 4);
|
||||
bool delaySlotIsNice = IsDelaySlotNiceReg(op, delaySlotOp, rs);
|
||||
|
|
|
@ -489,7 +489,7 @@ void Arm64Jit::Comp_JumpReg(MIPSOpcode op)
|
|||
}
|
||||
MIPSGPReg rs = _RS;
|
||||
MIPSGPReg rd = _RD;
|
||||
bool andLink = (op & 0x3f) == 9;
|
||||
bool andLink = (op & 0x3f) == 9 && rd != MIPS_REG_ZERO;
|
||||
|
||||
MIPSOpcode delaySlotOp = Memory::Read_Instruction(js.compilerPC + 4);
|
||||
bool delaySlotIsNice = IsDelaySlotNiceReg(op, delaySlotOp, rs);
|
||||
|
|
|
@ -298,6 +298,7 @@ namespace MIPSInt
|
|||
DelayBranchTo(addr);
|
||||
break;
|
||||
case 9: //jalr
|
||||
if (rd != 0)
|
||||
R(rd) = PC + 8;
|
||||
DelayBranchTo(addr);
|
||||
break;
|
||||
|
|
|
@ -670,7 +670,7 @@ void Jit::Comp_JumpReg(MIPSOpcode op)
|
|||
}
|
||||
MIPSGPReg rs = _RS;
|
||||
MIPSGPReg rd = _RD;
|
||||
bool andLink = (op & 0x3f) == 9;
|
||||
bool andLink = (op & 0x3f) == 9 && rd != MIPS_REG_ZERO;
|
||||
|
||||
MIPSOpcode delaySlotOp = Memory::Read_Instruction(js.compilerPC + 4);
|
||||
bool delaySlotIsNice = IsDelaySlotNiceReg(op, delaySlotOp, rs);
|
||||
|
|
Loading…
Add table
Reference in a new issue