summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/branch.c
diff options
context:
space:
mode:
authorMarkos Chandras2014-11-27 10:32:25 +0100
committerMarkos Chandras2015-02-17 16:37:35 +0100
commit69b9a2fd05a308b9b1e1f282f3b772491603c582 (patch)
tree15a949df838007dfa51396b0286e7e7547f072f3 /arch/mips/kernel/branch.c
parentMIPS: Emulate the new MIPS R6 BALC instruction (diff)
downloadkernel-qcow2-linux-69b9a2fd05a308b9b1e1f282f3b772491603c582.tar.gz
kernel-qcow2-linux-69b9a2fd05a308b9b1e1f282f3b772491603c582.tar.xz
kernel-qcow2-linux-69b9a2fd05a308b9b1e1f282f3b772491603c582.zip
MIPS: Emulate the new MIPS R6 BEQZC and JIC instructions
MIPS R6 uses the <R6 ldc2 opcode for the new BEQZC and JIC instructions Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Diffstat (limited to 'arch/mips/kernel/branch.c')
-rw-r--r--arch/mips/kernel/branch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c
index 1f28724d23e5..c61a41df3363 100644
--- a/arch/mips/kernel/branch.c
+++ b/arch/mips/kernel/branch.c
@@ -799,6 +799,14 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
epc += 4 + (insn.i_format.simmediate << 2);
regs->cp0_epc = epc;
break;
+ case beqzcjic_op:
+ if (!cpu_has_mips_r6) {
+ ret = -SIGILL;
+ break;
+ }
+ /* Compact branch: BEQZC || JIC */
+ regs->cp0_epc += 8;
+ break;
#endif
case cbcond0_op:
case cbcond1_op: