summaryrefslogtreecommitdiff
path: root/arch/mips/il.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/il.cpp')
-rw-r--r--arch/mips/il.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/mips/il.cpp b/arch/mips/il.cpp
index bfbfeeed..5700acbc 100644
--- a/arch/mips/il.cpp
+++ b/arch/mips/il.cpp
@@ -1430,7 +1430,10 @@ bool GetLowLevelILForInstruction(Architecture* arch, uint64_t addr, LowLevelILFu
{
operand = 2;
}
- il.AddInstruction(il.Call(ReadILOperand(il, instr, operand, registerSize(instr.operands[operand]), addrSize, true)));
+ if (operand == 2 && op1.reg == REG_ZERO && op2.reg == REG_RA)
+ il.AddInstruction(il.Return(il.Register(addrSize, REG_RA)));
+ else
+ il.AddInstruction(il.Call(ReadILOperand(il, instr, operand, registerSize(instr.operands[operand]), addrSize, true)));
}
break;
case MIPS_JR: