From: Chen Gang <gang.chen.5i5j@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/hppa-tdep.c: Fix a logical typo bug found by compiler warning
Date: Tue, 14 Oct 2014 21:43:00 -0000 [thread overview]
Message-ID: <543D98F3.2030009@gmail.com> (raw)
In-Reply-To: <87d29uxrvg.fsf@igel.home>
On 10/15/2014 05:29 AM, Andreas Schwab wrote:
> Chen Gang <gang.chen.5i5j@gmail.com> writes:
>
>> && (((inst >> 6) & 0xf) == 0x8
>> - || (inst >> 6) & 0xf) == 0x9))
>> + || ((inst >> 6) & 0xf) == 0x9)))
>
> ((inst >> 6) & 0xe) == 8
>
> Andreas.
>
I guess, your fixing may like below, which will be a different logical
working flow.
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 627f31a..3112732 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -1402,8 +1402,8 @@ inst_saves_gr (unsigned long inst)
too. */
if ((inst >> 26) == 0x19 || (inst >> 26) == 0x18
|| ((inst >> 26) == 0x3
- && (((inst >> 6) & 0xf) == 0x8
- || (inst >> 6) & 0xf) == 0x9))
+ && ((inst >> 6) & 0xf) == 0x8
+ || ((inst >> 6) & 0xf) == 0x9))
return hppa_extract_5R_store (inst);
return 0;
If you are sure it is, please help send related patch with more details
comments for it (excuse me, I am not quite familiar the related logical
details).
Thanks.
--
Chen Gang
Open share and attitude like air water and life which God blessed
next prev parent reply other threads:[~2014-10-14 21:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-14 21:21 Chen Gang
2014-10-14 21:29 ` Andreas Schwab
2014-10-14 21:43 ` Chen Gang [this message]
2014-10-15 15:00 ` Joel Brobecker
[not found] <d6q0acpdxmm7g52oqylkjjb2.1413419448973@email.android.com>
2014-10-16 7:06 ` Andreas Schwab
2014-10-16 7:38 ` Chen Gang
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=543D98F3.2030009@gmail.com \
--to=gang.chen.5i5j@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=schwab@linux-m68k.org \
/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