From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28747 invoked by alias); 16 Feb 2004 16:52:51 -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 28352 invoked from network); 16 Feb 2004 16:52:45 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 16 Feb 2004 16:52:45 -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 i1GGqhb07685 for ; Mon, 16 Feb 2004 11:52:44 -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 i1GGqgM28855 for ; Mon, 16 Feb 2004 11:52:43 -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 i1GGqeX20210 for ; Mon, 16 Feb 2004 08:52:41 -0800 Received: by cygbert.vinschen.de (Postfix, from userid 500) id 981E1580C6; Mon, 16 Feb 2004 17:52:33 +0100 (CET) Date: Mon, 16 Feb 2004 16:52:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: Re: [RFA] sh-tdep.c: optimize and rename virtual register conversion functions Message-ID: <20040216165233.GO18953@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com References: <20040210161422.GI4162@cygbert.vinschen.de> <16432.57568.176468.343897@localhost.redhat.com> <20040216155533.GI18953@cygbert.vinschen.de> <16432.60630.254802.622655@localhost.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16432.60630.254802.622655@localhost.redhat.com> User-Agent: Mutt/1.4.2i X-SW-Source: 2004-02/txt/msg00411.txt.bz2 On Feb 16 11:16, Elena Zannoni wrote: > Corinna Vinschen writes: > > So, if you think that the test should be kept in that function, that's > > fine with me. The only remaining bit is the naming of the function then. > > The new cpu is not a sh4 type, but it's using the same pseudo register > > functions as the sh4. The function would just not be sh4 specific anymore. > > Ok, thanks. Just rename the function for now, we can revisit later. OK, thank you. I've applied the below patch. Corinna Index: sh-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sh-tdep.c,v retrieving revision 1.160 diff -u -p -r1.160 sh-tdep.c --- sh-tdep.c 16 Feb 2004 16:04:18 -0000 1.160 +++ sh-tdep.c 16 Feb 2004 16:51:45 -0000 @@ -1519,8 +1519,8 @@ sh_default_register_type (struct gdbarch because they are stored as 4 individual FP elements. */ static void -sh_sh4_register_convert_to_virtual (int regnum, struct type *type, - char *from, char *to) +sh_register_convert_to_virtual (int regnum, struct type *type, + char *from, char *to) { if (regnum >= DR0_REGNUM && regnum <= DR_LAST_REGNUM) { @@ -1535,8 +1535,8 @@ sh_sh4_register_convert_to_virtual (int } static void -sh_sh4_register_convert_to_raw (struct type *type, int regnum, - const void *from, void *to) +sh_register_convert_to_raw (struct type *type, int regnum, + const void *from, void *to) { if (regnum >= DR0_REGNUM && regnum <= DR_LAST_REGNUM) { @@ -1587,10 +1587,9 @@ sh_pseudo_register_read (struct gdbarch + register_size (gdbarch, base_regnum) * portion)); /* We must pay attention to the endiannes. */ - sh_sh4_register_convert_to_virtual (reg_nr, - gdbarch_register_type (gdbarch, - reg_nr), - temp_buffer, buffer); + sh_register_convert_to_virtual (reg_nr, + gdbarch_register_type (gdbarch, reg_nr), + temp_buffer, buffer); } else if (reg_nr >= FV0_REGNUM && reg_nr <= FV_LAST_REGNUM) { @@ -1617,8 +1616,8 @@ sh_pseudo_register_write (struct gdbarch base_regnum = dr_reg_base_num (reg_nr); /* We must pay attention to the endiannes. */ - sh_sh4_register_convert_to_raw (gdbarch_register_type (gdbarch, reg_nr), - reg_nr, buffer, temp_buffer); + sh_register_convert_to_raw (gdbarch_register_type (gdbarch, reg_nr), + reg_nr, buffer, temp_buffer); /* Write the real regs for which this one is an alias. */ for (portion = 0; portion < 2; portion++) -- Corinna Vinschen Cygwin Developer Red Hat, Inc.