Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: gdb-patches@sources.redhat.com
Subject: [commit] Eliminate mips_register_byte
Date: Sun, 16 Nov 2003 14:33:00 -0000	[thread overview]
Message-ID: <3FB78A9C.4030205@gnu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 77 bytes --]

This deletes mips_register_byte.   It's no longer needed.

committed,
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 5400 bytes --]

2003-11-16  Andrew Cagney  <cagney@redhat.com>

	* mips-tdep.c (mips_register_byte): Delete function.
	(mips_gdbarch_init): Do not set "deprecated_register_byte".
	* config/mips/tm-mips.h (MIPS_REGISTER_BYTE): Delete macro.
	* config/mips/tm-irix6.h (MIPS_REGISTER_BYTE): Delete macro.
	* config/mips/tm-irix5.h (MIPS_REGISTER_BYTE): Delete macro.

Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.250
diff -u -r1.250 mips-tdep.c
--- mips-tdep.c	16 Nov 2003 05:57:08 -0000	1.250
+++ mips-tdep.c	16 Nov 2003 14:22:59 -0000
@@ -656,37 +656,6 @@
     internal_error (__FILE__, __LINE__, "Register %d out of range", regnum);
 }
 
-/* Register offset in a buffer for each register.
-
-   FIXME: cagney/2003-06-15: This is so bogus.  Instead REGISTER_TYPE
-   should strictly return the layout of the buffer.  Unfortunately
-   remote.c and the MIPS have come to rely on a custom layout that
-   doesn't 1:1 map onto the register type.  */
-
-static int
-mips_register_byte (int regnum)
-{
-  gdb_assert (regnum >= 0);
-  if (regnum < NUM_REGS)
-    /* Pick up the relevant per-tm file register byte method.  */
-    return MIPS_REGISTER_BYTE (regnum);
-  else if (regnum < 2 * NUM_REGS)
-    {
-      int reg;
-      int byte;
-      /* Start with the end of the raw register buffer - assum that
-	 MIPS_REGISTER_BYTE (NUM_REGS) returns that end.  */
-      byte = MIPS_REGISTER_BYTE (NUM_REGS);
-      /* Add space for all the proceeding registers based on their
-         real size.  */
-      for (reg = NUM_REGS; reg < regnum; reg++)
-	byte += TYPE_LENGTH (gdbarch_register_type (current_gdbarch, reg));
-      return byte;
-    }
-  else
-    internal_error (__FILE__, __LINE__, "Register %d out of range", regnum);
-}
-
 /* Convert between RAW and VIRTUAL registers.  The RAW register size
    defines the remote-gdb packet. */
 
@@ -5835,7 +5804,6 @@
   set_gdbarch_double_bit (gdbarch, 64);
   set_gdbarch_long_double_bit (gdbarch, 64);
   set_gdbarch_deprecated_register_raw_size (gdbarch, mips_register_raw_size);
-  set_gdbarch_deprecated_register_byte (gdbarch, mips_register_byte);
   set_gdbarch_register_reggroup_p (gdbarch, mips_register_reggroup_p);
   set_gdbarch_pseudo_register_read (gdbarch, mips_pseudo_register_read);
   set_gdbarch_pseudo_register_write (gdbarch, mips_pseudo_register_write);
Index: config/mips/tm-irix5.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-irix5.h,v
retrieving revision 1.14
diff -u -r1.14 tm-irix5.h
--- config/mips/tm-irix5.h	16 Nov 2003 04:57:25 -0000	1.14
+++ config/mips/tm-irix5.h	16 Nov 2003 14:22:59 -0000
@@ -67,26 +67,6 @@
 #define SIGFRAME_REGSAVE_OFF	(SIGFRAME_BASE + 3 * 4)
 #define SIGFRAME_FPREGSAVE_OFF	(SIGFRAME_BASE + 3 * 4 + 32 * 4 + 4)
 
-/* FIXME: cagney/2000-04-04: Testing the _MIPS_SIM_NABI32 and
-   _MIPS_SIM in a tm-*.h file is simply wrong!  Those are
-   host-dependant macros (provided by /usr/include) and stop any
-   chance of the target being cross compiled */
-#if defined (_MIPS_SIM_NABI32) && _MIPS_SIM == _MIPS_SIM_NABI32
-/*
- * Irix 6 (n32 ABI) has 32-bit GP regs and 64-bit FP regs
- */
-
-#undef  MIPS_REGISTER_BYTE
-#define MIPS_REGISTER_BYTE(N) \
-     (((N) < FP0_REGNUM) ? (N) * mips_regsize (current_gdbarch) : \
-      ((N) < FP0_REGNUM + 32) ?     \
-      FP0_REGNUM * mips_regsize (current_gdbarch) + \
-      ((N) - FP0_REGNUM) * sizeof(double) : \
-      32 * sizeof(double) + ((N) - 32) * mips_regsize (current_gdbarch))
-
-#endif /* N32 */
-
-
 /* The signal handler trampoline is called _sigtramp.  */
 #undef IN_SIGTRAMP
 #define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name))
Index: config/mips/tm-irix6.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-irix6.h,v
retrieving revision 1.18
diff -u -r1.18 tm-irix6.h
--- config/mips/tm-irix6.h	16 Nov 2003 05:57:09 -0000	1.18
+++ config/mips/tm-irix6.h	16 Nov 2003 14:22:59 -0000
@@ -61,15 +61,6 @@
 #define FCRCS_REGNUM 69		/* FP control/status */
 #define FCRIR_REGNUM 70		/* FP implementation/revision */
 
-
-#undef  MIPS_REGISTER_BYTE
-#define MIPS_REGISTER_BYTE(N) \
-     (((N) < FP0_REGNUM) ? (N) * mips_regsize (current_gdbarch) : \
-      ((N) < FP0_REGNUM + 32) ?     \
-      FP0_REGNUM * mips_regsize (current_gdbarch) + \
-      ((N) - FP0_REGNUM) * sizeof(double) : \
-      32 * sizeof(double) + ((N) - 32) * mips_regsize (current_gdbarch))
-
 /* The signal handler trampoline is called _sigtramp.  */
 #undef IN_SIGTRAMP
 #define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name))
Index: config/mips/tm-mips.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-mips.h,v
retrieving revision 1.55
diff -u -r1.55 tm-mips.h
--- config/mips/tm-mips.h	16 Nov 2003 04:57:25 -0000	1.55
+++ config/mips/tm-mips.h	16 Nov 2003 14:22:59 -0000
@@ -89,11 +89,6 @@
 #define	PRID_REGNUM 89		/* Processor ID */
 #define	LAST_EMBED_REGNUM 89	/* Last one */
 
-/* Index within `registers' of the first byte of the space for
-   register N.  */
-
-#define MIPS_REGISTER_BYTE(N) ((N) * mips_regsize (current_gdbarch))
-
 /* Special symbol found in blocks associated with routines.  We can hang
    mips_extra_func_info_t's off of this.  */
 

                 reply	other threads:[~2003-11-16 14:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3FB78A9C.4030205@gnu.org \
    --to=cagney@gnu.org \
    --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