summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorMarkos Chandras <markos.chandras@imgtec.com>2014-11-27 09:32:25 +0000
committerMarkos Chandras <markos.chandras@imgtec.com>2015-02-17 15:37:35 +0000
commit69b9a2fd05a308b9b1e1f282f3b772491603c582 (patch)
tree15a949df838007dfa51396b0286e7e7547f072f3 /arch/mips/kernel
parent84fef630127aa90ef547ddd018d3dc47b1e79a1e (diff)
downloadlinux-69b9a2fd05a308b9b1e1f282f3b772491603c582.tar.bz2
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')
-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: