mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
jit: Avoid a super unlikely write to zero.
This commit is contained in:
parent
8afab3f94f
commit
788b9d78f8
@ -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,7 +298,8 @@ namespace MIPSInt
|
||||
DelayBranchTo(addr);
|
||||
break;
|
||||
case 9: //jalr
|
||||
R(rd) = PC + 8;
|
||||
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…
Reference in New Issue
Block a user