2003-08-27 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / v850-tdep.c
index beb84dfc822464d4b1c096d930c5617cca10cc3c..27058045580a84923f7af1ad641edc1ab4722694 100644 (file)
@@ -613,8 +613,8 @@ v850_scan_prologue (CORE_ADDR pc, struct prologue_info *pi)
       int insn2 = -1; /* dummy value */
 
 #ifdef DEBUG
-      printf_filtered ("0x%.8lx ", (long) current_pc);
-      TARGET_PRINT_INSN (current_pc, &tm_print_insn_info);
+      fprintf_filtered (gdb_stdlog, "0x%.8lx ", (long) current_pc);
+      gdb_print_insn (current_pc, gdb_stdlog);
 #endif
 
       insn = read_memory_unsigned_integer (current_pc, 2);
@@ -797,7 +797,7 @@ v850_scan_prologue (CORE_ADDR pc, struct prologue_info *pi)
    when trying to get the value of caller-saves registers for an inner
    frame.  */
 
-CORE_ADDR
+static CORE_ADDR
 v850_find_callers_reg (struct frame_info *fi, int regnum)
 {
   for (; fi; fi = get_next_frame (fi))
@@ -819,7 +819,7 @@ v850_find_callers_reg (struct frame_info *fi, int regnum)
    just return the stack pointer that was in use at the time the
    function call was made.  */
 
-CORE_ADDR
+static CORE_ADDR
 v850_frame_chain (struct frame_info *fi)
 {
   struct prologue_info pi;
@@ -850,7 +850,7 @@ v850_frame_chain (struct frame_info *fi)
 /* Function: skip_prologue
    Return the address of the first code past the prologue of the function.  */
 
-CORE_ADDR
+static CORE_ADDR
 v850_skip_prologue (CORE_ADDR pc)
 {
   CORE_ADDR func_addr, func_end;
@@ -880,7 +880,7 @@ v850_skip_prologue (CORE_ADDR pc)
    This routine gets called when either the user uses the `return'
    command, or the call dummy breakpoint gets hit.  */
 
-void
+static void
 v850_pop_frame (void)
 {
   struct frame_info *frame = get_current_frame ();
@@ -917,7 +917,7 @@ v850_pop_frame (void)
    Stack space for the args has NOT been allocated: that job is up to us.
  */
 
-CORE_ADDR
+static CORE_ADDR
 v850_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
                     int struct_return, CORE_ADDR struct_addr)
 {
@@ -958,7 +958,7 @@ v850_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
       if (!v850_type_is_scalar (VALUE_TYPE (*args))
          && TYPE_LENGTH (VALUE_TYPE (*args)) > E_MAX_RETTYPE_SIZE_IN_REGS)
        {
-         store_address (valbuf, 4, VALUE_ADDRESS (*args));
+         store_unsigned_integer (valbuf, 4, VALUE_ADDRESS (*args));
          len = 4;
          val = valbuf;
        }
@@ -973,7 +973,7 @@ v850_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
          {
            CORE_ADDR regval;
 
-           regval = extract_address (val, v850_register_raw_size (argreg));
+           regval = extract_unsigned_integer (val, v850_register_raw_size (argreg));
            write_register (argreg, regval);
 
            len -= v850_register_raw_size (argreg);
@@ -997,7 +997,7 @@ v850_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
    Set up the return address for the inferior function call.
    Needed for targets where we don't actually execute a JSR/BSR instruction */
 
-CORE_ADDR
+static CORE_ADDR
 v850_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
 {
   write_register (E_RP_REGNUM, CALL_DUMMY_ADDRESS ());
@@ -1011,7 +1011,7 @@ v850_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
    instead of RP, because that's where "caller" of the dummy-frame
    will be found.  */
 
-CORE_ADDR
+static CORE_ADDR
 v850_frame_saved_pc (struct frame_info *fi)
 {
   if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
@@ -1030,7 +1030,7 @@ v850_frame_saved_pc (struct frame_info *fi)
    trap
  */
 
-void
+static void
 v850_fix_call_dummy (char *dummy, CORE_ADDR sp, CORE_ADDR fun, int nargs,
                     struct value **args, struct type *type, int gcc_p)
 {
@@ -1068,8 +1068,8 @@ v850_extract_return_value (struct type *type, char *regbuf, char *valbuf)
       /* Aggregates and return values > 8 bytes are returned in memory,
          pointed to by R6. */
       return_buffer =
-       extract_address (regbuf + REGISTER_BYTE (E_V0_REGNUM),
-                        REGISTER_RAW_SIZE (E_V0_REGNUM));
+       extract_unsigned_integer (regbuf + REGISTER_BYTE (E_V0_REGNUM),
+                                 REGISTER_RAW_SIZE (E_V0_REGNUM));
 
       read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
     }
@@ -1086,8 +1086,8 @@ v850_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
 static CORE_ADDR
 v850_extract_struct_value_address (char *regbuf)
 {
-  return extract_address (regbuf + v850_register_byte (E_V0_REGNUM),
-                         v850_register_raw_size (E_V0_REGNUM));
+  return extract_unsigned_integer (regbuf + v850_register_byte (E_V0_REGNUM),
+                                  v850_register_raw_size (E_V0_REGNUM));
 }
 
 static void
@@ -1215,7 +1215,6 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       if (v850_processor_type_table[i].mach == info.bfd_arch_info->mach)
        {
          v850_register_names = v850_processor_type_table[i].regnames;
-         tm_print_insn_info.mach = info.bfd_arch_info->mach;
          break;
        }
     }
@@ -1226,19 +1225,19 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_num_regs (gdbarch, E_NUM_REGS);
   set_gdbarch_num_pseudo_regs (gdbarch, 0);
   set_gdbarch_sp_regnum (gdbarch, E_SP_REGNUM);
-  set_gdbarch_fp_regnum (gdbarch, E_FP_REGNUM);
+  set_gdbarch_deprecated_fp_regnum (gdbarch, E_FP_REGNUM);
   set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM);
   set_gdbarch_register_name (gdbarch, v850_register_name);
-  set_gdbarch_register_size (gdbarch, v850_reg_size);
-  set_gdbarch_register_bytes (gdbarch, E_ALL_REGS_SIZE);
-  set_gdbarch_register_byte (gdbarch, v850_register_byte);
-  set_gdbarch_register_raw_size (gdbarch, v850_register_raw_size);
+  set_gdbarch_deprecated_register_size (gdbarch, v850_reg_size);
+  set_gdbarch_deprecated_register_bytes (gdbarch, E_ALL_REGS_SIZE);
+  set_gdbarch_deprecated_register_byte (gdbarch, v850_register_byte);
+  set_gdbarch_deprecated_register_raw_size (gdbarch, v850_register_raw_size);
   set_gdbarch_deprecated_max_register_raw_size (gdbarch, v850_reg_size);
-  set_gdbarch_register_virtual_size (gdbarch, v850_register_raw_size);
+  set_gdbarch_deprecated_register_virtual_size (gdbarch, v850_register_raw_size);
   set_gdbarch_deprecated_max_register_virtual_size (gdbarch, v850_reg_size);
-  set_gdbarch_register_virtual_type (gdbarch, v850_reg_virtual_type);
+  set_gdbarch_deprecated_register_virtual_type (gdbarch, v850_reg_virtual_type);
 
-  set_gdbarch_read_fp (gdbarch, v850_target_read_fp);
+  set_gdbarch_deprecated_target_read_fp (gdbarch, v850_target_read_fp);
 
   /*
    * Frame Info
@@ -1262,8 +1261,6 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_function_start_offset (gdbarch, 0);
   /* This value is almost never non-zero... */
   set_gdbarch_frame_args_skip (gdbarch, 0);
-  /* OK to default this value to 'unknown'. */
-  set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
 
   /*
    * Call Dummies
@@ -1277,9 +1274,9 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_deprecated_store_return_value (gdbarch, v850_store_return_value);
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, v850_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch, v850_use_struct_convention);
-  set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil);
-  set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
-  set_gdbarch_fix_call_dummy (gdbarch, v850_fix_call_dummy);
+  set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_nil);
+  set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
+  set_gdbarch_deprecated_fix_call_dummy (gdbarch, v850_fix_call_dummy);
   set_gdbarch_breakpoint_from_pc (gdbarch, v850_breakpoint_from_pc);
 
   set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
@@ -1288,14 +1285,17 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
 
   /* Should be using push_dummy_call.  */
-  set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+  set_gdbarch_deprecated_dummy_write_sp (gdbarch, deprecated_write_sp);
+
+  set_gdbarch_print_insn (gdbarch, print_insn_v850);
 
   return gdbarch;
 }
 
+extern initialize_file_ftype _initialize_v850_tdep; /* -Wmissing-prototypes */
+
 void
 _initialize_v850_tdep (void)
 {
-  deprecated_tm_print_insn = print_insn_v850;
   register_gdbarch_init (bfd_arch_v850, v850_gdbarch_init);
 }
This page took 0.027874 seconds and 4 git commands to generate.