From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cvs.linux-mips.org (eddie.linux-mips.org [148.251.95.138]) by sourceware.org (Postfix) with ESMTP id D8924386F442 for ; Sat, 16 May 2020 13:29:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D8924386F442 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-mips.org Authentication-Results: sourceware.org; spf=none smtp.mailfrom=macro@linux-mips.org Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S23991216AbgEPN3ywKvSL (ORCPT ); Sat, 16 May 2020 15:29:54 +0200 Date: Sat, 16 May 2020 14:29:54 +0100 (BST) Sender: "Maciej W. Rozycki" From: "Maciej W. Rozycki" To: Simon Marchi cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb: fix -Wtautological-overlap-compare warning in mips-linux-tdep.c In-Reply-To: <20200516020151.34919-1-simon.marchi@efficios.com> Message-ID: References: <20200516020151.34919-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KHOP_HELO_FCRDNS, SPF_HELO_NONE, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2020 13:30:01 -0000 On Fri, 15 May 2020, Simon Marchi wrote: > diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c > index aa7b8d11f3fb..ae067c19dfa7 100644 > --- a/gdb/mips-linux-tdep.c > +++ b/gdb/mips-linux-tdep.c > @@ -633,16 +633,14 @@ mips_linux_in_dynsym_stub (CORE_ADDR pc) > if (n64) > { > /* 'daddu t7,ra' or 'or t7, ra, zero'*/ > - if (insn != 0x03e0782d || insn != 0x03e07825) > + if (insn == 0x03e0782d || insn == 0x03e07825) Nope, this ought to be: if (insn != 0x03e0782d && insn != 0x03e07825) > return 0; > - > } > else > { > /* 'addu t7,ra' or 'or t7, ra, zero'*/ > - if (insn != 0x03e07821 || insn != 0x03e07825) > + if (insn == 0x03e07821 || insn == 0x03e07825) Likewise: if (insn != 0x03e07821 && insn != 0x03e07825) Thanks for looking into it (and for cc-ing me)! Maciej