From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22491 invoked by alias); 1 Mar 2012 10:30:43 -0000 Received: (qmail 22460 invoked by uid 22791); 1 Mar 2012 10:30:40 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Mar 2012 10:30:26 +0000 Received: from nat-dem.mentorg.com ([195.212.93.2] helo=eu2-mail.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1S33HF-0005wU-J0 from Thomas_Schwinge@mentor.com ; Thu, 01 Mar 2012 02:30:25 -0800 Received: from feldtkeller.schwinge.homeip.net ([172.30.64.112]) by eu2-mail.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 1 Mar 2012 11:30:23 +0100 From: Thomas Schwinge To: Kevin Buettner Cc: gdb-patches@sourceware.org Subject: Re: [RFC] sh-tdep.c: Don't fetch FPSCR register if it doesn't exist In-Reply-To: <20120229220932.17ad0d5f@mesquite.lan> References: <20120229173408.78699013@mesquite.lan> <20120301013318.GJ3118@adacore.com> <20120229220932.17ad0d5f@mesquite.lan> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Thu, 01 Mar 2012 10:30:00 -0000 Message-ID: <877gz44nre.fsf@schwinge.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" 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 X-SW-Source: 2012-03/txt/msg00010.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 821 Hi! On Wed, 29 Feb 2012 22:09:32 -0700, Kevin Buettner wrot= e: > * sh-tdep.c (sh_frame_cache): Don't fetch the FPSCR register > unless it exists for this architecture. Your reasoning and this patch look good to me. (But I didn't test it.) Basically, you now relay the test to sh_register_reggroup_p, which already contains the FPSCR existence test you first proposed. (The same test exists in arch-utils.c:legacy_register_sim_regno, by the way.) Still learning about GDB's code layout -- is there any benefit in invoking gdbarch_register_reggroup_p (as you're doing) in contrast to directly going for sh_register_reggroup_p? Also, we assume that simply passing 0 for fpscr to sh_analyze_prologue doesn't do any harm (which it doesn't). (Worth a comment, perhaps?) Gr=C3=BC=C3=9Fe, Thomas --=-=-= Content-Type: application/pgp-signature Content-length: 489 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJPT0+2AAoJENuKOtuXzphJ2RoH/0BFttT2hEQ2Kf1Ur81/49yX eRsScjpoOY996ZM3pPLy9aZIQwW2sc5aX0biAuI+qFDhq0N//nqjiZoQBzNufzcD FhpjBOdkevzBsA5kyVFFaVoftkTn/xb5yNp096+TnOBT6rvB7ISon0rK9usPcqUg tEGmWGHXprhr4uD9Ts1yMaJEPfR3j326AE5uNcI9CTfGh6eQbYwmK6k3N2EVecM+ AL0jaDu7kCIoAF5p2XkpTRms4nByzZWxKObc76LH+2+jNYXBkMnOy6Q4SyXfjrI6 dzmO3QEgkeOi0YR/XsiKZX/InUGvG81TGjb7rJZr/m0SB+RiDAa3y6QbN5Im0+4= =8UGr -----END PGP SIGNATURE----- --=-=-=--