From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30566 invoked by alias); 5 Aug 2002 13:47:24 -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 30558 invoked from network); 5 Aug 2002 13:47:23 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 5 Aug 2002 13:47:23 -0000 Received: by localhost.redhat.com (Postfix, from userid 469) id D2ACE10DB9; Mon, 5 Aug 2002 09:45:37 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15694.33153.408470.962695@localhost.redhat.com> Date: Mon, 05 Aug 2002 06:47:00 -0000 To: Joern Rennecke Cc: Andrew Cagney , Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: Unreviewed patches In-Reply-To: <3D35A89B.EE1EABC3@superh.com> References: <3D205F19.1B99290F@superh.com> <15648.31077.572892.886182@localhost.redhat.com> <3D208CF1.AB7AC45A@superh.com> <15648.51312.63195.689336@localhost.redhat.com> <3D20D12F.6AB9E865@superh.com> <15649.65211.660582.965251@localhost.redhat.com> <3D236046.4FAE0419@superh.com> <15662.14806.918730.224362@localhost.redhat.com> <3D2EC4B3.FDDB3D47@superh.com> <3D2EEE6B.9060708@ges.redhat.com> <3D35A89B.EE1EABC3@superh.com> X-SW-Source: 2002-08/txt/msg00094.txt.bz2 Joern, I noticed that you checked in the patch anyway, even though there was disagreement about adding another hardwired enumeration in sh-tdep.c vs. using the tdep structure, like arm, ppc, etc do. I apologize if my latest message to this thread wasn't clear enough, and you thought it was an approval. I think the patch is basically fine, except for the enum. Could you please fix it? thanks Elena Joern Rennecke writes: > Andrew Cagney wrote: > > > > > > > > I think the stashing of constants into the tdep structure is basically > > > wrong. You separate the register names arrays from the literals > > > that describe their positions, and you replicate the literals > > > up to four times. The tdep structure and the sh_gdbarch_init > > > function are so large that you have lost track of the things that > > > really belong in tdep, like sh_show_regs, skip_prologue_hard_way, > > > and do_pseudo_register. If you look at other gdb ports, you'll > > > see that they put only variable stuff in tdep, and use enums > > > for constants. The sh gdb register naming scheme also doesn't > > > scale well, the names are again duplicated multiple times. > > > > Can i suggest comparing the SH with the MIPS or RS6000. > > MIPS and RS6000 use varying register numbers for hardware registers > with identical name and function. I suppose that is due to historical > accident? > > On the SH, it makes sense to consider the floating point register > start number as variable; however, there are a lot more register > numbers that are constant: > the privileged mode registers of the SH1..SH4 are not replicated > in the SH5; the SH5 has other registers of its own for privileged > mode. All the sh-dsp specific register are, well, sh-dsp specific, > and hence only the sh-dsp numbering applies. > > -- > -------------------------- > SuperH > 2430 Aztec West / Almondsbury / BRISTOL / BS32 4AQ > T:+44 1454 462330