From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29146 invoked by alias); 4 Aug 2004 17:33:45 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29139 invoked from network); 4 Aug 2004 17:33:45 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 4 Aug 2004 17:33:45 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i74HXde3025699 for ; Wed, 4 Aug 2004 13:33:39 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i74HXda24549; Wed, 4 Aug 2004 13:33:39 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 24FF02B9D; Wed, 4 Aug 2004 13:33:33 -0400 (EDT) Message-ID: <41111DEC.7080102@gnu.org> Date: Wed, 04 Aug 2004 17:33:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040801 MIME-Version: 1.0 To: Jim Blandy Cc: Kevin Buettner , gdb-patches@sources.redhat.com Subject: Re: RFA: PowerPC sim & GDB: use fixed register numbering References: <410F8C3E.3060502@gnu.org> <4110EA27.7020904@gnu.org> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00085.txt.bz2 > Andrew Cagney writes: > >>>> > Andrew Cagney writes: >>>> > >>> >>>>>> >>> Have a look at the other sim-*.h files, you'll notice that most define >>>>>> >>> an enum namespace and not a series of magic constants. Can we expand >>>>>> >>> the table so that the constants aren't needed? >>> >>>> > Is this going in the right direction? >> >>> >>> Yes, that should go in. > > > Okay, committed. Thanks to you and Kevin for the review. Ok, > The old code, which did an under-the-covers call into gdb to map number -> name, was bad and definitly needed to be replaced. The above though could still do with some work - too much on the magic of those numbers in gdb/sim-ppc.h :-( > > Anyway, lets first get the enum in place. Since we've nailed the enum, what should we do about the sim/ppc? >>> What's your plan with SPRs? > > > I think it's best to use the SPR numbers assigned by the ISA to > identify them. Trying to keep tables based on automatically assigned > enum values in sync would take a lot of work, for little gain, since > ISA SPR numbers are (obviously) unambiguous within any particular PPC > variant. Which is a change from the status quo. That was doing things based on the ISA's register name. Which ever. > At the moment, the sim doesn't support any SPRs from different PPC > variants whose numbers clash. There'll be work needed there to handle > that; I don't have any particular insights there. Andrew