mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 14:30:27 +02:00
jit: Avoid a super unlikely write to zero.
This commit is contained in:
1 parent
8afab3f94f
commit
788b9d78f8
4 files changed
+5
-4
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user