From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12142 invoked by alias); 25 Mar 2009 16:39:53 -0000 Received: (qmail 12129 invoked by uid 22791); 25 Mar 2009 16:39:52 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Mar 2009 16:39:47 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 815082BAB98; Wed, 25 Mar 2009 12:39:45 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FcTwoc5VBIQ4; Wed, 25 Mar 2009 12:39:45 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 462312BAB90; Wed, 25 Mar 2009 12:39:45 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id B89BA5BD21; Wed, 25 Mar 2009 09:39:38 -0700 (PDT) Date: Wed, 25 Mar 2009 16:54:00 -0000 From: Joel Brobecker To: Thiago Jung Bauermann Cc: gdb-patches ml Subject: Re: [RFA] Change AUXV bit checked to decide the size of the FPSCR Message-ID: <20090325163938.GY9472@adacore.com> References: <1237819493.25721.38.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1237819493.25721.38.camel@localhost.localdomain> User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2009-03/txt/msg00553.txt.bz2 (Thiago - I like the quality of the work you produce, very nice!) > For this reason, I'm changing GDB to check for DFP to decide what is the > size of the FPSCR (it changed from 32 bits to 64 bits with ISA 2.05 and > newer). Since for now the only higher bits used are for Decimal Floating > Point, I am changing the code to check the DFP bit in AUXV. This sounds more like a work-around than a real fix. I don't mind your approach, but I think it deserves a clear comment in the code where you use that flag to determine the size of your registers. For the record, another solution that you probably considered was to check for PPC_FEATURE_ARCH_2_05 *or* PPC_FEATURE_ARCH_2_06, but I can see how this might become cumbersome as future revisions get added. > gdb/ > * ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define. > (PPC_FEATURE_HAS_DFP): New #define. > (ppc_linux_read_description): Check for DFP feature instead of > ISA 2.05 to decide on size of the FPSCR. > > gdbserver/ > * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define. > (PPC_FEATURE_HAS_DFP): New #define. > (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on > size of the FPSCR. Both OK with the requested comments added. -- Joel