summaryrefslogtreecommitdiffstats
path: root/arch/mips/math-emu
diff options
context:
space:
mode:
authorDavid Daney <david.daney@cavium.com>2013-05-24 20:54:09 +0000
committerRalf Baechle <ralf@linux-mips.org>2013-07-01 15:10:57 +0200
commitfe6d29095d4370bed3a525404c45bbd6aa7c191b (patch)
tree1e62d46be2642ce38dc3d59f49d19403c923e9f9 /arch/mips/math-emu
parent74338805ec6869594d583535f941cb478c94dd73 (diff)
downloadblackbird-obmc-linux-fe6d29095d4370bed3a525404c45bbd6aa7c191b.tar.gz
blackbird-obmc-linux-fe6d29095d4370bed3a525404c45bbd6aa7c191b.zip
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: David Daney <david.daney@cavium.com> Acked-by: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/5326/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/math-emu')
-rw-r--r--arch/mips/math-emu/cp1emu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index f03771900813..e773659ccf9f 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -471,6 +471,9 @@ int mm_isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn,
unsigned int fcr31;
unsigned int bit;
+ if (!cpu_has_mmips)
+ return 0;
+
switch (insn.mm_i_format.opcode) {
case mm_pool32a_op:
if ((insn.mm_i_format.simmediate & MM_POOL32A_MINOR_MASK) ==
OpenPOWER on IntegriCloud