linux-mips
[Top] [All Lists]

Re: [PATCH RFC v2 46/70] MIPS: kernel: branch: Prevent BGEZL emulation f

To: Markos Chandras <markos.chandras@imgtec.com>
Subject: Re: [PATCH RFC v2 46/70] MIPS: kernel: branch: Prevent BGEZL emulation for MIPS R6
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Tue, 3 Feb 2015 11:57:51 +0000 (GMT)
Cc: linux-mips@linux-mips.org
In-reply-to: <1421405389-15512-47-git-send-email-markos.chandras@imgtec.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: <1421405389-15512-1-git-send-email-markos.chandras@imgtec.com> <1421405389-15512-47-git-send-email-markos.chandras@imgtec.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Alpine 2.11 (LFD 23 2013-08-11)
On Fri, 16 Jan 2015, Markos Chandras wrote:

> diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c
> index 502bf2aeb834..b8cc0a2e20a4 100644
> --- a/arch/mips/kernel/branch.c
> +++ b/arch/mips/kernel/branch.c
> @@ -452,6 +452,11 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
>  
>               case bgez_op:
>               case bgezl_op:
> +                     if (NO_R6EMU && (insn.i_format.rt == bgezl_op)) {

 There is no need for parentheses around `==' here, logical operators are 
well known to have a lower precedence.  The same applies throughout this 
series.

  Maciej

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH RFC v2 46/70] MIPS: kernel: branch: Prevent BGEZL emulation for MIPS R6, Maciej W. Rozycki <=