Thread (108 messages) 108 messages, 8 authors, 2015-01-13
STALE4188d
Revisions (2)
  1. rfc current
  2. v2 [diff vs current]

[PATCH RFC 57/67] MIPS: kernel: branch: Emulate the BNVC, BNEC and BNEZLAC R6 instructions

From: Markos Chandras <hidden>
Date: 2014-12-18 15:28:01
Subsystem: mips, the rest · Maintainers: Thomas Bogendoerfer, Linus Torvalds

MIPS R6 uses the <R6 DADDI opcode for the new BNVC, BNEC and
BNEZLAC instructions.

Signed-off-by: Markos Chandras <redacted>
---
 arch/mips/include/uapi/asm/inst.h | 2 +-
 arch/mips/kernel/branch.c         | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/mips/include/uapi/asm/inst.h b/arch/mips/include/uapi/asm/inst.h
index b95363e0551f..096f32153ce2 100644
--- a/arch/mips/include/uapi/asm/inst.h
+++ b/arch/mips/include/uapi/asm/inst.h
@@ -25,7 +25,7 @@ enum major_op {
 	andi_op, ori_op, xori_op, lui_op,
 	cop0_op, cop1_op, cop2_op, cop1x_op,
 	beql_op, bnel_op, blezl_op, bgtzl_op,
-	daddi_op, daddiu_op, ldl_op, ldr_op,
+	daddi_or_cbcond1_op, daddiu_op, ldl_op, ldr_op,
 	spec2_op, jalx_op, mdmx_op, spec3_op,
 	lb_op, lh_op, lwl_op, lw_op,
 	lbu_op, lhu_op, lwr_op, lwu_op,
diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c
index cf390c76ba95..4cc9070682e1 100644
--- a/arch/mips/kernel/branch.c
+++ b/arch/mips/kernel/branch.c
@@ -790,6 +790,8 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
 		break;
 	case addi_or_cbcond0_op:
 		/* Compact branches: bovc, beqc, beqzalc */
+	case daddi_or_cbcond1_op:
+		/* Compact branches: bnvc, bnec, bnezlac */
 		if (insn.i_format.rt && !insn.i_format.rs)
 			regs->regs[31] = epc + 4;
 		regs->cp0_epc += 8;
-- 
2.2.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help