This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: Remove unnecessary m68hc11_register_byte/raw_size


Hi!

Following Andrew's suggestion (some months ago?), the m68hc11_register_virtual_type
returns the correct type for HC11/HC12 registers and we can get rid of the
register_byte/raw_size.  I've committed this patch to remove those
(and thus become completely be based on the virtual_type func).

    Stephane

2002-11-29  Stephane Carrez  <stcarrez@nerim.fr>

	* m68hc11-tdep.c (m68hc11_register_raw_size): Remove.
	(m68hc11_register_byte): Remove.
	(m68hc11_gdbarch_init): Don't set the above.
Index: m68hc11-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68hc11-tdep.c,v
retrieving revision 1.32
diff -u -p -r1.32 m68hc11-tdep.c
--- m68hc11-tdep.c	28 Nov 2002 18:15:58 -0000	1.32
+++ m68hc11-tdep.c	29 Nov 2002 20:33:26 -0000
@@ -1177,33 +1177,6 @@ m68hc11_push_return_address (CORE_ADDR p
   return sp;
 }
 
-/* Index within `registers' of the first byte of the space for
-   register N.  */
-static int
-m68hc11_register_byte (int reg_nr)
-{
-  return (reg_nr * M68HC11_REG_SIZE);
-}
-
-static int
-m68hc11_register_raw_size (int reg_nr)
-{
-  switch (reg_nr)
-    {
-    case HARD_PAGE_REGNUM:
-    case HARD_A_REGNUM:
-    case HARD_B_REGNUM:
-    case HARD_CCR_REGNUM:
-      return 1;
-
-    case M68HC12_HARD_PC_REGNUM:
-      return 4;
-
-    default:
-      return M68HC11_REG_SIZE;
-    }
-}
-
 /* Test whether the ELF symbol corresponds to a function using rtc or
    rti to return.  */
    
@@ -1311,9 +1284,6 @@ m68hc11_gdbarch_init (struct gdbarch_inf
   set_gdbarch_fp0_regnum (gdbarch, -1);
   set_gdbarch_max_register_raw_size (gdbarch, 2);
   set_gdbarch_max_register_virtual_size (gdbarch, 2);
-  set_gdbarch_register_raw_size (gdbarch, m68hc11_register_raw_size);
-  set_gdbarch_register_virtual_size (gdbarch, m68hc11_register_raw_size);
-  set_gdbarch_register_byte (gdbarch, m68hc11_register_byte);
   set_gdbarch_frame_init_saved_regs (gdbarch, m68hc11_frame_init_saved_regs);
   set_gdbarch_frame_args_skip (gdbarch, 0);
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]