From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28379 invoked by alias); 5 Oct 2017 12:40:16 -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 28314 invoked by uid 89); 5 Oct 2017 12:40:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 spammy=According X-HELO: userp1040.oracle.com Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Oct 2017 12:40:11 +0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v95Ce8Gk027658 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 5 Oct 2017 12:40:09 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v95Ce7Pp002144 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 5 Oct 2017 12:40:08 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v95Ce7TA023119 for ; Thu, 5 Oct 2017 12:40:07 GMT Received: from termi.oracle.com (/10.175.176.191) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 05 Oct 2017 05:40:06 -0700 From: jose.marchesi@oracle.com (Jose E. Marchesi) To: gdb-patches@sourceware.org Subject: [PATCH] [AARCH64] Fix decoding of neon memory hint insns Date: Thu, 05 Oct 2017 12:40:00 -0000 Message-ID: <87mv55ahuk.fsf@oracle.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00100.txt.bz2 Hi guys! Today I got this error building GDB with the latest svn GCC: ../../gdb/arm-tdep.c: In function =E2=80=98int arm_decode_misc_memhint_neon= (gdbarch*, uint32_t, regcache*, displaced_step_closure*)=E2=80=99: ../../gdb/arm-tdep.c:6411:52: error: bitwise comparison always evaluates to= false [-Werror=3Dtautological-compare] else if (op1 =3D=3D 0x10 && op2 =3D=3D 0x0 && (rn & 0xe) =3D=3D 0x1) I believe the patch below does the right thing. According to the ARM ARM, bits 19..16 are 0001 for SETEND and iim1 (where ii is immod and m is mmod) for CPS. commit 821015b19fa66f01d707695309486262351e1e5b Author: Jose E. Marchesi Date: Thu Oct 5 12:33:19 2017 +0000 gdb: Fix decoding of ARM neon memory hint insns =20=20=20=20 gdb/ChangeLog: =20=20=20=20 2017-10-05 Jose E. Marchesi =20=20=20=20 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS and SETEND. diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 2709321..d8569e0 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -6406,9 +6406,9 @@ arm_decode_misc_memhint_neon (struct gdbarch *gdbarch= , uint32_t insn, unsigned int op1 =3D bits (insn, 20, 26), op2 =3D bits (insn, 4, 7); unsigned int rn =3D bits (insn, 16, 19); =20 - if (op1 =3D=3D 0x10 && (op2 & 0x2) =3D=3D 0x0 && (rn & 0xe) =3D=3D 0x0) + if (op1 =3D=3D 0x10 && (op2 & 0x2) =3D=3D 0x0 && (rn & 0x1) =3D=3D 0x0) return arm_copy_unmodified (gdbarch, insn, "cps", dsc); - else if (op1 =3D=3D 0x10 && op2 =3D=3D 0x0 && (rn & 0xe) =3D=3D 0x1) + else if (op1 =3D=3D 0x10 && op2 =3D=3D 0x0 && (rn & 0x1) =3D=3D 0x1) return arm_copy_unmodified (gdbarch, insn, "setend", dsc); else if ((op1 & 0x60) =3D=3D 0x20) return arm_copy_unmodified (gdbarch, insn, "neon dataproc", dsc);