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: Re: [RFA] sh-tdep.c: optimize and rename virtual register conversion functions
Date: Mon, 16 Feb 2004 16:52:00 -0000	[thread overview]
Message-ID: <20040216165233.GO18953@cygbert.vinschen.de> (raw)
In-Reply-To: <16432.60630.254802.622655@localhost.redhat.com>

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.


      reply	other threads:[~2004-02-16 16:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-10 16:14 Corinna Vinschen
2004-02-10 16:17 ` Corinna Vinschen
2004-02-16 15:29 ` Elena Zannoni
2004-02-16 15:55   ` Corinna Vinschen
2004-02-16 16:20     ` Elena Zannoni
2004-02-16 16:52       ` Corinna Vinschen [this message]

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=20040216165233.GO18953@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