Commit fe6d2909 authored by David Daney's avatar David Daney Committed by Ralf Baechle

MIPS: Don't try to decode microMIPS branch instructions where they cannot exist.

In mm_isBranchInstr() we can short circuit the entire function if
!cpu_has_mmips.
Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
Acked-by: default avatarSteven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5326/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 74338805
...@@ -471,6 +471,9 @@ int mm_isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, ...@@ -471,6 +471,9 @@ int mm_isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn,
unsigned int fcr31; unsigned int fcr31;
unsigned int bit; unsigned int bit;
if (!cpu_has_mmips)
return 0;
switch (insn.mm_i_format.opcode) { switch (insn.mm_i_format.opcode) {
case mm_pool32a_op: case mm_pool32a_op:
if ((insn.mm_i_format.simmediate & MM_POOL32A_MINOR_MASK) == if ((insn.mm_i_format.simmediate & MM_POOL32A_MINOR_MASK) ==
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment