From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10523 invoked by alias); 8 Oct 2014 08:33:00 -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 10488 invoked by uid 89); 8 Oct 2014 08:32:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 08 Oct 2014 08:32:57 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id BB5088E0A26; Wed, 8 Oct 2014 10:32:54 +0200 (CEST) Date: Wed, 08 Oct 2014 08:33:00 -0000 From: Corinna Vinschen To: gdb-patches@sourceware.org Subject: Re: [PATCH] PR tdep/9390: Fix possible typo on xstorxstormy16-tdep.c Message-ID: <20141008083254.GA28284@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org References: <1410898465-28350-1-git-send-email-sergiodj@redhat.com> <54189D34.8010307@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline In-Reply-To: <54189D34.8010307@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00139.txt.bz2 --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 3233 On Sep 16 21:27, Pedro Alves wrote: > [Adding Corinna, listed as xstormy16 maintainer in MAINTAINERS. > Hi Corinna. Do we still care about this port?] Hi Pedro. Sorry for the delay. Yes, we still care for this port. > The fix makes sense to me, though I know nothing about > xstormy16 either. The patch is fine. The expression is trying to check for certain registers in a mov, and the register numbers are encoded in the lowest nibble. There's definitely a typo. Thanks, Corinna >=20 > Thanks, > Pedro Alves >=20 > 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: > >=20 > > ... > >=20 > > /* optional copying of args in r2-r7 to r10-r13. */ > > /* Probably only in optimized case but legal action for prologue. = */ > > else if ((inst & 0xff00) =3D=3D 0x4600 /* 46SD mov rD, rS */ > > && (inst & 0x00f0) >=3D 0x0020 && (inst & 0x00f0) <=3D 0x0070 > > && (inst & 0x000f) >=3D 0x00a0 && (inst & 0x000f) <=3D 0x000d) > > ^^^^^^^^^^^^^^^^^^^^^^^^^ > > ... > >=20 > > 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. > >=20 > > Tested on my x86_64 Fedora 20 GNU/Linux. > >=20 > > gdb/ChangeLog: > > 2014-09-16 Sergio Durigan Junior > >=20 > > 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(-) > >=20 > > 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 > >=20=20 > > + 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. > >=20=20 > > 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) =3D=3D 0x4600 /* 46SD mov rD, rS */ > > && (inst & 0x00f0) >=3D 0x0020 && (inst & 0x00f0) <=3D 0x0070 > > - && (inst & 0x000f) >=3D 0x00a0 && (inst & 0x000f) <=3D 0x000d) > > + && (inst & 0x000f) >=3D 0x000a && (inst & 0x000f) <=3D 0x000d) > > ; > >=20=20 > > /* Optional copying of args in r2-r7 to stack. */ > >=20 --=20 Corinna Vinschen Cygwin Maintainer Red Hat --k1lZvvs/B4yU6o8G Content-Type: application/pgp-signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUNPa2AAoJEPU2Bp2uRE+gLl8QAJI+0kYng98HAy5M+DSwyTO3 wRIlMGEjBcec+/SiSHOg/o16R2veuYS/rCUyFMODYwjh8RmTfSOp7rxlYAAvnb9t u2COGxiRavSEO9ooLqPuPixv7n8Qd78dLyLwlVW0uRSXZjlWR/gw7uvC3trzsgtd d2z6RHW/uUCZklU+6cS+EkSYafaygINNY0VtnsBmfqvLXa2tVABorR9FfmVF5guc Fpv1eKY7uF3zP6pNrYct5+6mJiiE94CVZerBGHonwzysTkTnUNSZQG29sAjR8sbB EgpvjtRdGyq10RNTsPbU3cvdHJLmeVYUtxjt4qVe23WlA7vuuR7FR10DMz1JuP05 FSAONc7fxpF3YfAmOh8EmtL0DnnzkPLEy0oJFinzeMnsKqfR05CRi8WmNVCIfosP agN6hMoB54GLk6PEpBB0G3J3oz7nLE1+rwvavuHczZXDRvqTVKHn+UDT3d4CRs6G XVca5jwkzCkR44fiHgaRYD9huFwJ2EQ8yPJOB8h7jFdDIzJKLEZU3nutxWfEyuKc 4xNQXBIERlsTSJ2iIOTVp7TYd0v9U2o+9RRA6r8Oy9dfMJcOpPnD7F0uPqgJ6xry o/SihMi5cU2k4PfJs2OHbv/BzYWHRb7jynby/tw3saKhcozDvRWrT9QQXh80ukZO i8RCUKZciPNJMR8jxQ9u =6y59 -----END PGP SIGNATURE----- --k1lZvvs/B4yU6o8G--