linux-mips
[Top] [All Lists]

[PATCH 2/3] MIPS: Don't try to decode microMIPS branch instructions wher

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH 2/3] MIPS: Don't try to decode microMIPS branch instructions where they cannot exist.
From: David Daney <ddaney.cavm@gmail.com>
Date: Fri, 24 May 2013 14:54:09 -0700
Cc: David Daney <david.daney@cavium.com>, "Steven J. Hill" <Steven.Hill@imgtec.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=aWup584eBdZbnQDa4Rfe7XwGx7cRT8YF7tCkHYW0VQA=; b=ty946ETQ7UjxYdOSJg9BSkda4ltPuh3Kf1sMVPjoLMxulDQsLwa6muZSsK19GfiElU wDMHuts+uF8ImNF+n1EpRhgJ2mDhpEDfIwocPz676pBtdB1J7cwu4q60a4jL00g3JSlj luIiffh2Ewt4ivTY3uXl9rRfsyHZZotD8iGoUVDFYuMcUOmT5o1IvxgJP18g0lAl6QdK cuiH3p0MztevBZ97LrmcVumZXILqS2JjrBLbFiwpGLeLPBh+j1ybKtsqeNJ79hlhmfzU HvpL+SZKiuQoSxlJ2Zo3FFEllYEcvQcFvRoZ1BCOxG2698stP4ewbSY4JuIQLEhdzDB8 zSgA==
In-reply-to: <1369432450-13583-1-git-send-email-ddaney.cavm@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1369432450-13583-1-git-send-email-ddaney.cavm@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: David Daney <david.daney@cavium.com>

In mm_isBranchInstr() we can short circuit the entire function if
!cpu_has_mmips.

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
---
 arch/mips/math-emu/cp1emu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index f03771900..e773659 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) ==
-- 
1.7.11.7


<Prev in Thread] Current Thread [Next in Thread>