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]

[commit] d10v doesn't need FP_REGNUM


Hello,

There is no reason for the d10v to set FP_REGNUM. In fact, once the d10v's frame ID stack address is pointing at the wrong place, it causes certain failures.

committed,
Andrew
2003-03-30  Andrew Cagney  <cagney at redhat dot com>

	* d10v-tdep.c: Replace _FP_REGNUM and FP_REGNUM with
	D10V_FP_REGNUM.
	(d10v_gdbarch_init): Do not set fp_regnum.

Index: d10v-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/d10v-tdep.c,v
retrieving revision 1.94
diff -u -r1.94 d10v-tdep.c
--- d10v-tdep.c	30 Mar 2003 00:09:40 -0000	1.94
+++ d10v-tdep.c	31 Mar 2003 02:34:54 -0000
@@ -68,7 +68,7 @@
   {
     R0_REGNUM = 0,
     R3_REGNUM = 3,
-    _FP_REGNUM = 11,
+    D10V_FP_REGNUM = 11,
     LR_REGNUM = 13,
     _SP_REGNUM = 15,
     PSW_REGNUM = 16,
@@ -345,7 +345,7 @@
 {
   if (reg_nr == PC_REGNUM)
     return builtin_type_void_func_ptr;
-  if (reg_nr == _SP_REGNUM || reg_nr == _FP_REGNUM)
+  if (reg_nr == _SP_REGNUM || reg_nr == D10V_FP_REGNUM)
     return builtin_type_void_data_ptr;
   else if (reg_nr >= A0_REGNUM
       && reg_nr < (A0_REGNUM + NR_A_REGS))
@@ -776,7 +776,7 @@
       /* The SP was moved to the FP.  This indicates that a new frame
          was created.  Get THIS frame's FP value by unwinding it from
          the next frame.  */
-      frame_unwind_unsigned_register (next_frame, FP_REGNUM, &this_base);
+      frame_unwind_unsigned_register (next_frame, D10V_FP_REGNUM, &this_base);
       /* The FP points at the last saved register.  Adjust the FP back
          to before the first saved register giving the SP.  */
       prev_sp = this_base + info->size;
@@ -952,7 +952,7 @@
 static CORE_ADDR
 d10v_read_fp (void)
 {
-  return (d10v_make_daddr (read_register (FP_REGNUM)));
+  return (d10v_make_daddr (read_register (D10V_FP_REGNUM)));
 }
 
 /* When arguments must be pushed onto the stack, they go on in reverse
@@ -1632,7 +1632,6 @@
 
   set_gdbarch_num_regs (gdbarch, d10v_num_regs);
   set_gdbarch_sp_regnum (gdbarch, 15);
-  set_gdbarch_fp_regnum (gdbarch, 11);
   set_gdbarch_pc_regnum (gdbarch, 18);
   set_gdbarch_register_name (gdbarch, d10v_register_name);
   set_gdbarch_register_size (gdbarch, 2);

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