jit: Avoid a super unlikely write to zero.

This commit is contained in:
Unknown W. Brackets committed 2015-04-07 18:20:37 -07:00
1 parent 8afab3f94f
commit 788b9d78f8
4 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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);
+2 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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);