From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Simon Marchi <simon.marchi@efficios.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: fix -Wtautological-overlap-compare warning in mips-linux-tdep.c
Date: Sat, 16 May 2020 14:29:54 +0100 (BST) [thread overview]
Message-ID: <alpine.LFD.2.21.2005161407230.1182553@eddie.linux-mips.org> (raw)
In-Reply-To: <20200516020151.34919-1-simon.marchi@efficios.com>
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
next prev parent reply other threads:[~2020-05-16 13:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-16 2:01 Simon Marchi
2020-05-16 6:42 ` Andreas Schwab
2020-05-16 13:29 ` Maciej W. Rozycki [this message]
2020-05-16 15:23 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.21.2005161407230.1182553@eddie.linux-mips.org \
--to=macro@linux-mips.org \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox