From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5950 invoked by alias); 16 Feb 2004 15:41:42 -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 5920 invoked from network); 16 Feb 2004 15:41:40 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 16 Feb 2004 15:41:40 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i1GFfbb14014 for ; Mon, 16 Feb 2004 10:41:37 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i1GFfaM26896 for ; Mon, 16 Feb 2004 10:41:36 -0500 Received: from cygbert.vinschen.de (vpn50-42.rdu.redhat.com [172.16.50.42]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i1GFfYX17325 for ; Mon, 16 Feb 2004 07:41:34 -0800 Received: by cygbert.vinschen.de (Postfix, from userid 500) id 53365580C6; Mon, 16 Feb 2004 16:41:27 +0100 (CET) Date: Mon, 16 Feb 2004 15:41:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: [RFA] sh-tdep.*: Rename DSP bank registers Message-ID: <20040216154127.GH18953@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i X-SW-Source: 2004-02/txt/msg00402.txt.bz2 Hi, sh-tdep.h defines two bank register numbers, R0_BANK_REGNUM and R7_BANK_REGNUM. Their values only make sense on DSP CPUs, while other CPUs with register banks have the registers beginning at another regnum. I'd like to propose the below patch, which renames the used enum values from R0_BANK_REGNUM and R7_BANK_REGNUM to DSP_R0_BANK_REGNUM and DSP_R7_BANK_REGNUM respectively. IMHO, that's less confusing and allows to use the register bank numbering scheme of non-dsp CPUs at a later point. Thanks, Corinna ChangeLog: * sh-tdep.c (sh_dsp_register_sim_regno): Use DSP_Rx_BANK_REGNUM. * sh-tdep.h: Rename R0_BANK_REGNUM and R7_BANK_REGNUM to DSP_R0_BANK_REGNUM and DSP_R7_BANK_REGNUM. Index: sh-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sh-tdep.c,v retrieving revision 1.159 diff -u -p -r1.159 sh-tdep.c --- sh-tdep.c 14 Feb 2004 15:46:33 -0000 1.159 +++ sh-tdep.c 16 Feb 2004 15:34:42 -0000 @@ -1895,8 +1895,8 @@ sh_dsp_register_sim_regno (int nr) return SIM_SH_RS_REGNUM; if (nr == RE_REGNUM) return SIM_SH_RE_REGNUM; - if (nr >= R0_BANK_REGNUM && nr <= R7_BANK_REGNUM) - return nr - R0_BANK_REGNUM + SIM_SH_R0_BANK_REGNUM; + if (nr >= DSP_R0_BANK_REGNUM && nr <= DSP_R7_BANK_REGNUM) + return nr - DSP_R0_BANK_REGNUM + SIM_SH_R0_BANK_REGNUM; return nr; } Index: sh-tdep.h =================================================================== RCS file: /cvs/src/src/gdb/sh-tdep.h,v retrieving revision 1.7 diff -u -p -r1.7 sh-tdep.h --- sh-tdep.h 10 Oct 2003 07:13:11 -0000 1.7 +++ sh-tdep.h 16 Feb 2004 15:34:42 -0000 @@ -62,8 +62,8 @@ enum MOD_REGNUM = 40, RS_REGNUM = 43, RE_REGNUM = 44, - R0_BANK_REGNUM = 51, - R7_BANK_REGNUM = 58, + DSP_R0_BANK_REGNUM = 51, + DSP_R7_BANK_REGNUM = 58, /* Floating point pseudo registers */ DR0_REGNUM = 59, DR_LAST_REGNUM = 66, -- Corinna Vinschen Cygwin Developer Red Hat, Inc.