From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13048 invoked by alias); 16 Sep 2014 20:27:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 13033 invoked by uid 89); 16 Sep 2014 20:27:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 16 Sep 2014 20:27:36 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8GKRZUS021895 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 16 Sep 2014 16:27:35 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8GKRXjf005050; Tue, 16 Sep 2014 16:27:34 -0400 Message-ID: <54189D34.8010307@redhat.com> Date: Tue, 16 Sep 2014 20:27:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Sergio Durigan Junior , GDB Patches , Corinna Vinschen Subject: Re: [PATCH] PR tdep/9390: Fix possible typo on xstorxstormy16-tdep.c References: <1410898465-28350-1-git-send-email-sergiodj@redhat.com> In-Reply-To: <1410898465-28350-1-git-send-email-sergiodj@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-09/txt/msg00553.txt.bz2 [Adding Corinna, listed as xstormy16 maintainer in MAINTAINERS. Hi Corinna. Do we still care about this port?] The fix makes sense to me, though I know nothing about xstormy16 either. Thanks, Pedro Alves On 09/16/2014 09:14 PM, Sergio Durigan Junior wrote: > This patch (probably) fixes the bug described in PR tdep/9390, which > is about a wrong check in the following code: > > ... > > /* optional copying of args in r2-r7 to r10-r13. */ > /* Probably only in optimized case but legal action for prologue. */ > else if ((inst & 0xff00) == 0x4600 /* 46SD mov rD, rS */ > && (inst & 0x00f0) >= 0x0020 && (inst & 0x00f0) <= 0x0070 > && (inst & 0x000f) >= 0x00a0 && (inst & 0x000f) <= 0x000d) > ^^^^^^^^^^^^^^^^^^^^^^^^^ > ... > > This condition will never trigger, and the fix proposed in the bug > (which made sense to me) was to test against 0x000a. I tried finding > documentation about this target, but couldn't find anything. I don't > even know if it is still used, but decided to submit the fix anyway. > > Tested on my x86_64 Fedora 20 GNU/Linux. > > gdb/ChangeLog: > 2014-09-16 Sergio Durigan Junior > > PR tdep/9390 > * xstorxstormy16-tdep.c (xstormy16_analyze_prologue): Fix possible > typo when using logical AND to determine instruction type. > --- > gdb/ChangeLog | 6 ++++++ > gdb/xstormy16-tdep.c | 2 +- > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index 8216274..622976d 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,5 +1,11 @@ > 2014-09-16 Sergio Durigan Junior > > + PR tdep/9390 > + * xstorxstormy16-tdep.c (xstormy16_analyze_prologue): Fix possible > + typo when using logical AND to determine instruction type. > + > +2014-09-16 Sergio Durigan Junior > + > * objc-lang.c (find_implementation_from_class): Remove dead code. > > 2014-09-16 Sergio Durigan Junior > diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c > index af3ff32..9692742 100644 > --- a/gdb/xstormy16-tdep.c > +++ b/gdb/xstormy16-tdep.c > @@ -374,7 +374,7 @@ xstormy16_analyze_prologue (struct gdbarch *gdbarch, > /* Probably only in optimized case but legal action for prologue. */ > else if ((inst & 0xff00) == 0x4600 /* 46SD mov rD, rS */ > && (inst & 0x00f0) >= 0x0020 && (inst & 0x00f0) <= 0x0070 > - && (inst & 0x000f) >= 0x00a0 && (inst & 0x000f) <= 0x000d) > + && (inst & 0x000f) >= 0x000a && (inst & 0x000f) <= 0x000d) > ; > > /* Optional copying of args in r2-r7 to stack. */ >