From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7085 invoked by alias); 17 Jul 2002 20:04:08 -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 7077 invoked from network); 17 Jul 2002 20:04:07 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 17 Jul 2002 20:04:07 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id ED7143DE0; Wed, 17 Jul 2002 16:04:06 -0400 (EDT) Message-ID: <3D35CDB6.7020706@ges.redhat.com> Date: Wed, 17 Jul 2002 14:17:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020708 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joern Rennecke Cc: gdb-patches@sources.redhat.com, Elena Zannoni Subject: Re: sh64 simulator register numbers References: <3D35C737.9F25B58F@superh.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-07/txt/msg00371.txt.bz2 > AFAICS the sh64 simulator doesn't need any changes for this renumbering, > while gdb would need some decoupling from the simulator's register numbers. > > Should we create a header file that describes the register numbers when > talking to hardware, and make gdb use that for its internal numbers? > Or should it define the numbers inside sh-tdep.c ? See the directory gdb/regformats/ and (more importantly) the mail archives for information on the changes that are being made to GDB so that it will eventually be able to handle remote register numbers. -- Anyway, the below is wrong. As was pointed out before, the enum values should not be hardwired. Andrew > ! /* SHmedia */ > ! SIM_SH64_R0_REGNUM = 128, > ! SIM_SH64_SP_REGNUM = SIM_SH64_R0_REGNUM+15, > ! SIM_SH64_PC_REGNUM = SIM_SH64_R0_REGNUM+64, > ! /* 64 64-bit control registers */ > ! SIM_SH64_CR0_REGNUM = SIM_SH64_R0_REGNUM+65, > ! /* Some of these have specific names. */ > ! SIM_SH64_SR_REGNUM = SIM_SH64_CR0_REGNUM, /* Status reg */ > ! SIM_SH64_SSR_REGNUM = SIM_SH64_CR0_REGNUM+1, /* Saved status reg */ > ! SIM_SH64_PSSR_REGNUM = SIM_SH64_CR0_REGNUM+2, /* Panic-saved status reg*/ > ! SIM_SH64_INTEVT_REGNUM=SIM_SH64_CR0_REGNUM+4, /* Interrupt event reg */ > ! SIM_SH64_EXPEVT_REGNUM=SIM_SH64_CR0_REGNUM+5, /* Exception event reg */ > ! SIM_SH64_PEXPEVT_REGNUM= SIM_SH64_CR0_REGNUM+6,/* Panic-saved Exception > ! event reg */ > ! SIM_SH64_TRA_REGNUM = SIM_SH64_CR0_REGNUM+7, /* TRAP exception reg */ > ! SIM_SH64_SPC_REGNUM = SIM_SH64_CR0_REGNUM+8, /* Saved program counter */ > ! SIM_SH64_PSPC_REGNUM = SIM_SH64_CR0_REGNUM+9, /* Panic-saved program > ! counter */ > ! SIM_SH64_RESVEC_REGNUM=SIM_SH64_CR0_REGNUM+10, /* Reset vector */ > ! SIM_SH64_VBR_REGNUM = SIM_SH64_CR0_REGNUM+11, /* Vector base register */ > ! SIM_SH64_TEA_REGNUM = SIM_SH64_CR0_REGNUM+13, /* Faulting effective > ! address register */ > ! SIM_SH64_DCR_REGNUM = SIM_SH64_CR0_REGNUM+16, /* Debug control reg */ > ! SIM_SH64_KCR0_REGNUM = SIM_SH64_CR0_REGNUM+17, /* Kernel register 0 */ > ! SIM_SH64_KCR1_REGNUM = SIM_SH64_CR0_REGNUM+18, /* Kernel register 1 */ > ! SIM_SH64_CTC_REGNUM = SIM_SH64_CR0_REGNUM+62, /* Clock tick counter */ > ! SIM_SH64_USR_REGNUM = SIM_SH64_CR0_REGNUM+63, /* User-accessible > ! status register */ > ! SIM_SH64_CR63_REGNUM = SIM_SH64_R0_REGNUM+128, > ! SIM_SH64_TR0_REGNUM = SIM_SH64_R0_REGNUM+129, > ! SIM_SH64_FPSCR_REGNUM= SIM_SH64_R0_REGNUM+137, > ! SIM_SH64_FR0_REGNUM = SIM_SH64_R0_REGNUM+138