From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2558 invoked by alias); 11 Apr 2002 20:39:57 -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 2434 invoked from network); 11 Apr 2002 20:39:55 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 11 Apr 2002 20:39:55 -0000 Received: from romulus.sfbay.redhat.com (romulus.sfbay.redhat.com [172.16.27.251]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id NAA00016; Thu, 11 Apr 2002 13:39:53 -0700 (PDT) Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g3BKdmO03484; Thu, 11 Apr 2002 13:39:48 -0700 Date: Thu, 11 Apr 2002 13:39:00 -0000 From: Kevin Buettner Message-Id: <1020411203947.ZM3483@localhost.localdomain> In-Reply-To: Andrew Cagney "Re: [PATCH] Add support for fpscr for Power / PowerPC targets" (Apr 11, 4:08pm) References: <1020411191706.ZM3109@localhost.localdomain> <3CB5ED4D.8030603@cygnus.com> To: Andrew Cagney , Kevin Buettner Subject: Re: [PATCH] Add support for fpscr for Power / PowerPC targets Cc: gdb-patches@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-04/txt/msg00430.txt.bz2 On Apr 11, 4:08pm, Andrew Cagney wrote: > > tdep->ppc_xer_regnum = 69; > > if (v->mach == bfd_mach_ppc_601) > > tdep->ppc_mq_regnum = 124; > > - else > > + else if (power) > > tdep->ppc_mq_regnum = 70; > > + else > > + tdep->ppc_mq_regnum = -1; > > + tdep->ppc_fpscr_regnum = power ? 71 : 70; > > > > For PowerPC, the fpscr regnum is 70, which was an unused slot. For > > Power, I chose to use the first available slot (71). The other change > > that this patch makes is to make MQ unavailable for all PowerPC > > targets except for the 601 processors (which is as it should be). > > Kevin, is there any reason to not just use the same slot for both POWER > and PowerPC? It would be nice if we could, but I don't see how it can be done without either 1) renumbering some registers for some processors. or 2) assigning fpscr to a really high slot that's larger than any current register. I didn't want to do (1) because existing stubs would likely break. (But see below). I didn't want to do (2) because that would introduce a really large gap between fpscr and the rest of the registers for most processors. Slot 70 was an unused slot for PowerPC, but it was used for ``mq'' for Power. The next available slot for Power was 71, so that's what I used for Power. Also, for PowerPC, slot 70 was already in the set of PPC_UISA_SPRS and that's exactly where fpscr belongs. If we don't mind a minor violation of (1), I could reassign mq to slot 71 for Power. That would free up slot 70 so that Power would also have fpscr available at the same slot number as PowerPC. This might be a relatively safe thing to do since it's likely that there aren't many (any?) existing stubs for the Power architecture. It'll require some adjustments to rs6000-nat.c, but I'm willing to make those adjustments. Opinions? Kevin