Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH/FR-V] Add FR450 support
Date: Fri, 19 Mar 2004 00:09:00 -0000	[thread overview]
Message-ID: <20040312183126.42344c34@saguaro> (raw)
Message-ID: <20040319000900.XppedFhcBtkj-FnxaJTp8JwoHEZE4pAshInDBBd4s4Y@z> (raw)

I've just committed the patch below.

	* frv-tdep.c (set_variant_scratch_registers): New function.
	* frv-tdep.h (scr0_regnum, scr1_regnum, scr2_regnum, scr3_regnum):
	New constants.

	From Richard Sandiford  <rsandifo@redhat.com>:
	* frv-tdep.c (frv_gdbarch_init): Add FR450 support.

Index: frv-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/frv-tdep.c,v
retrieving revision 1.75
diff -u -p -r1.75 frv-tdep.c
--- frv-tdep.c	13 Mar 2004 01:13:04 -0000	1.75
+++ frv-tdep.c	13 Mar 2004 01:21:09 -0000
@@ -239,6 +239,15 @@ set_variant_abi_fdpic (struct gdbarch_td
   var->register_names[fdpic_loadmap_interp_regnum] = xstrdup ("loadmap_interp");
 }
 
+static void
+set_variant_scratch_registers (struct gdbarch_tdep *var)
+{
+  var->register_names[scr0_regnum] = xstrdup ("scr0");
+  var->register_names[scr1_regnum] = xstrdup ("scr1");
+  var->register_names[scr2_regnum] = xstrdup ("scr2");
+  var->register_names[scr3_regnum] = xstrdup ("scr3");
+}
+
 static const char *
 frv_register_name (int reg)
 {
@@ -1362,6 +1371,7 @@ frv_gdbarch_init (struct gdbarch_info in
       break;
 
     case bfd_mach_fr400:
+    case bfd_mach_fr450:
       set_variant_num_gprs (var, 32);
       set_variant_num_fprs (var, 32);
       break;
@@ -1378,6 +1388,9 @@ frv_gdbarch_init (struct gdbarch_info in
   if (elf_flags & EF_FRV_FDPIC)
     set_variant_abi_fdpic (var);
 
+  if (elf_flags & EF_FRV_CPU_FR450)
+    set_variant_scratch_registers (var);
+
   gdbarch = gdbarch_alloc (&info, var);
 
   set_gdbarch_short_bit (gdbarch, 16);
@@ -1448,6 +1461,7 @@ frv_gdbarch_init (struct gdbarch_info in
       break;
 
     case bfd_mach_fr400:
+    case bfd_mach_fr450:
       /* fr400-style hardware debugging support.  */
       var->num_hw_watchpoints = 2;
       var->num_hw_breakpoints = 4;
Index: frv-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/frv-tdep.h,v
retrieving revision 1.3
diff -u -p -r1.3 frv-tdep.h
--- frv-tdep.h	13 Mar 2004 01:13:04 -0000	1.3
+++ frv-tdep.h	13 Mar 2004 01:21:09 -0000
@@ -58,6 +58,10 @@ enum {
   dbar1_regnum = 138,
   dbar2_regnum = 139,
   dbar3_regnum = 140,
+  scr0_regnum = 141,
+  scr1_regnum = 142,
+  scr2_regnum = 143,
+  scr3_regnum = 144,
   lr_regnum = 145,
   lcr_regnum = 146,
   iacc0h_regnum = 147,


             reply	other threads:[~2004-03-13  1:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-13  1:31 Kevin Buettner [this message]
2004-03-19  0:09 ` Kevin Buettner

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=20040312183126.42344c34@saguaro \
    --to=kevinb@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