From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18965 invoked by alias); 6 Oct 2004 12:54:58 -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 18940 invoked from network); 6 Oct 2004 12:54:55 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 6 Oct 2004 12:54:55 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i96CstBO004389 for ; Wed, 6 Oct 2004 08:54:55 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i96Csnr27892 for ; Wed, 6 Oct 2004 08:54:49 -0400 Received: from cygbert.vinschen.de (vpn50-13.rdu.redhat.com [172.16.50.13]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id i96CslVb032508 for ; Wed, 6 Oct 2004 08:54:48 -0400 Received: by cygbert.vinschen.de (Postfix, from userid 500) id A0B5F58092; Wed, 6 Oct 2004 14:55:47 +0200 (CEST) Date: Wed, 06 Oct 2004 12:54:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: [PATCH] sh-tdep.c: Rename store/extract functions for better readability (was Re: [PATCH]: SH 2a - Part 4: Begin using RETURN_VALUE) Message-ID: <20041006125547.GJ6702@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com References: <20040909124701.GA7927@cygbert.vinschen.de> <16738.43902.850632.187540@localhost.redhat.com> <20041006090809.GE3744@cygbert.vinschen.de> <16739.58104.488965.241196@localhost.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16739.58104.488965.241196@localhost.redhat.com> User-Agent: Mutt/1.4.2i X-SW-Source: 2004-10/txt/msg00115.txt.bz2 On Oct 6 08:20, Elena Zannoni wrote: > Corinna Vinschen writes: > > Is it ok to rename them? > > Sure, send a patch. Cool, see below. Corinna * sh-tdep.c (sh_extract_return_value_nofpu): Rename from sh_default_extract_return_value. (sh_extract_return_value_fpu): Rename from sh3e_sh4_extract_return_value. (sh_store_return_value_nofpu): Rename from sh_default_store_return_value. (sh_store_return_value_fpu): Rename from sh3e_sh4_store_return_value. (sh_return_value_nofpu): Accomodate above changes. (sh_return_value_fpu): Ditto. Index: sh-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sh-tdep.c,v retrieving revision 1.177 diff -u -p -r1.177 sh-tdep.c --- sh-tdep.c 6 Oct 2004 08:59:02 -0000 1.177 +++ sh-tdep.c 6 Oct 2004 12:44:08 -0000 @@ -1194,8 +1194,8 @@ sh_push_dummy_call_nofpu (struct gdbarch containing the (raw) register state a function return value of type TYPE, and copy that, in virtual format, into VALBUF. */ static void -sh_default_extract_return_value (struct type *type, struct regcache *regcache, - void *valbuf) +sh_extract_return_value_nofpu (struct type *type, struct regcache *regcache, + void *valbuf) { int len = TYPE_LENGTH (type); int return_register = R0_REGNUM; @@ -1219,8 +1219,8 @@ sh_default_extract_return_value (struct } static void -sh3e_sh4_extract_return_value (struct type *type, struct regcache *regcache, - void *valbuf) +sh_extract_return_value_fpu (struct type *type, struct regcache *regcache, + void *valbuf) { if (sh_treat_as_flt_p (type)) { @@ -1233,7 +1233,7 @@ sh3e_sh4_extract_return_value (struct ty regcache_raw_read (regcache, regnum++, (char *) valbuf + i); } else - sh_default_extract_return_value (type, regcache, valbuf); + sh_extract_return_value_nofpu (type, regcache, valbuf); } /* Write into appropriate registers a function return value @@ -1243,8 +1243,8 @@ sh3e_sh4_extract_return_value (struct ty depending on the type of the return value. In all the other cases the result is stored in r0, left-justified. */ static void -sh_default_store_return_value (struct type *type, struct regcache *regcache, - const void *valbuf) +sh_store_return_value_nofpu (struct type *type, struct regcache *regcache, + const void *valbuf) { ULONGEST val; int len = TYPE_LENGTH (type); @@ -1263,8 +1263,8 @@ sh_default_store_return_value (struct ty } static void -sh3e_sh4_store_return_value (struct type *type, struct regcache *regcache, - const void *valbuf) +sh_store_return_value_fpu (struct type *type, struct regcache *regcache, + const void *valbuf) { if (sh_treat_as_flt_p (type)) { @@ -1278,7 +1278,7 @@ sh3e_sh4_store_return_value (struct type regcache_raw_write (regcache, regnum++, (char *) valbuf + i); } else - sh_default_store_return_value (type, regcache, valbuf); + sh_store_return_value_nofpu (type, regcache, valbuf); } static enum return_value_convention @@ -1289,9 +1289,9 @@ sh_return_value_nofpu (struct gdbarch *g if (sh_use_struct_convention (0, type)) return RETURN_VALUE_STRUCT_CONVENTION; if (writebuf) - sh_default_store_return_value (type, regcache, writebuf); + sh_store_return_value_nofpu (type, regcache, writebuf); else if (readbuf) - sh_default_extract_return_value (type, regcache, readbuf); + sh_extract_return_value_nofpu (type, regcache, readbuf); return RETURN_VALUE_REGISTER_CONVENTION; } @@ -1303,9 +1303,9 @@ sh_return_value_fpu (struct gdbarch *gdb if (sh_use_struct_convention (0, type)) return RETURN_VALUE_STRUCT_CONVENTION; if (writebuf) - sh3e_sh4_store_return_value (type, regcache, writebuf); + sh_store_return_value_fpu (type, regcache, writebuf); else if (readbuf) - sh3e_sh4_extract_return_value (type, regcache, readbuf); + sh_extract_return_value_fpu (type, regcache, readbuf); return RETURN_VALUE_REGISTER_CONVENTION; } -- Corinna Vinschen Cygwin Project Co-Leader Red Hat, Inc.