From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1491 invoked by alias); 2 Jun 2003 03:54:54 -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 845 invoked from network); 2 Jun 2003 03:54:46 -0000 Received: from unknown (HELO localhost.redhat.com) (205.151.10.188) by sources.redhat.com with SMTP; 2 Jun 2003 03:54:46 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 2EC142B5F; Sun, 1 Jun 2003 23:54:31 -0400 (EDT) Message-ID: <3EDACA77.6050407@redhat.com> Date: Mon, 02 Jun 2003 03:54:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Richard Henderson Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] alpha_register_reggroup_p References: <20030602032821.GA7199@twiddle.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-06/txt/msg00044.txt.bz2 > The main object here is to get the FPCR to be considered > part of the FP state. It's not immediately clear what to > do with the PALcode UNIQ value, but "system" seems a good > choice. > * alpha-tdep.c (alpha_register_reggroup_p): New. > (alpha_gdbarch_init): Register it. > > --- alpha-tdep.c.11 2003-06-01 20:11:56.000000000 -0700 > +++ alpha-tdep.c 2003-06-01 20:15:28.000000000 -0700 > @@ -20,6 +20,7 @@ > Boston, MA 02111-1307, USA. */ > > #include "defs.h" > +#include "doublest.h" > #include "frame.h" > #include "frame-unwind.h" > #include "frame-base.h" > @@ -34,7 +35,7 @@ > #include "gdb_string.h" > #include "linespec.h" > #include "regcache.h" > -#include "doublest.h" > +#include "reggroups.h" > #include "arch-utils.h" > #include "osabi.h" > #include "block.h" > @@ -102,6 +103,39 @@ alpha_register_virtual_type (int regno) > return builtin_type_int64; > } > > +/* Is REGNUM a member of REGGROUP? */ > + > +static int > +alpha_register_reggroup_p (struct gdbarch *gdbarch, int regnum, > + struct reggroup *group) > +{ > + /* Filter out any registers eliminated, but whose regnum is > + reserved for backward compatibility, e.g. the vfp. */ > + if (REGISTER_NAME (regnum) == NULL || *REGISTER_NAME (regnum) == '\0') > + return 0; > + > + /* Since we implement no pseudo registers, save/restore is equal to all. */ > + if (group == all_reggroup > + || group == save_reggroup > + || group == restore_reggroup) > + return 1; Should UNIQ be in save/restore (I don't know, I'm just asking)? > + /* All other groups are non-overlapping. */ > + > + /* Since this is really a PALcode memory slot... */ > + if (regnum == ALPHA_UNIQUE_REGNUM) > + return group == system_reggroup; > + > + /* Force the FPCR to be considered part of the floating point state. */ > + if (regnum == ALPHA_FPCR_REGNUM) > + return group == float_reggroup; Good. Finally a useful "info float". > + if (regnum >= ALPHA_FP0_REGNUM && regnum < ALPHA_FP0_REGNUM + 31) > + return group == float_reggroup; > + else > + return group == general_reggroup; > +} yes, ok. Andrew