|
@@ -445,9 +445,11 @@ static int isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn,
|
|
|
case spec_op:
|
|
|
switch (insn.r_format.func) {
|
|
|
case jalr_op:
|
|
|
- regs->regs[insn.r_format.rd] =
|
|
|
- regs->cp0_epc + dec_insn.pc_inc +
|
|
|
- dec_insn.next_pc_inc;
|
|
|
+ if (insn.r_format.rd != 0) {
|
|
|
+ regs->regs[insn.r_format.rd] =
|
|
|
+ regs->cp0_epc + dec_insn.pc_inc +
|
|
|
+ dec_insn.next_pc_inc;
|
|
|
+ }
|
|
|
/* Fall through */
|
|
|
case jr_op:
|
|
|
/* For R6, JR already emulated in jalr_op */
|