Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
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)
Date: Wed, 06 Oct 2004 12:54:00 -0000	[thread overview]
Message-ID: <20041006125547.GJ6702@cygbert.vinschen.de> (raw)
In-Reply-To: <16739.58104.488965.241196@localhost.redhat.com>

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.


  reply	other threads:[~2004-10-06 12:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-09 12:46 [PATCH]: SH 2a - Part 4: Begin using RETURN_VALUE Corinna Vinschen
2004-10-05 20:09 ` Elena Zannoni
2004-10-06  9:07   ` Corinna Vinschen
2004-10-06 12:28     ` Elena Zannoni
2004-10-06 12:54       ` Corinna Vinschen [this message]
2004-10-22  3:31         ` [PATCH] sh-tdep.c: Rename store/extract functions for better readability (was Re: [PATCH]: SH 2a - Part 4: Begin using RETURN_VALUE) Elena Zannoni
2004-12-14 15:53           ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041006125547.GJ6702@cygbert.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox