* config/i386/tm-i386.h (PARM_BOUNDARY, CALL_DUMMY,
[deliverable/binutils-gdb.git] / gdb / arch-utils.c
index 23caf9f98a3a47042dbe6fbd227c6c4f3718af14..887aa9d72239d6f2bc7a5bfd55262182bd9eda89 100644 (file)
@@ -42,6 +42,7 @@
 #endif
 #include "regcache.h"
 #include "gdb_assert.h"
+#include "sim-regno.h"
 
 #include "version.h"
 
@@ -90,6 +91,22 @@ legacy_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
   return NULL;
 }
 
+int
+legacy_register_sim_regno (int regnum)
+{
+  /* Only makes sense to supply raw registers.  */
+  gdb_assert (regnum >= 0 && regnum < NUM_REGS);
+  /* NOTE: cagney/2002-05-13: The old code did it this way and it is
+     suspected that some GDB/SIM combinations may rely on this
+     behavour.  The default should be one2one_register_sim_regno
+     (below).  */
+  if (REGISTER_NAME (regnum) != NULL
+      && REGISTER_NAME (regnum)[0] != '\0')
+    return regnum;
+  else
+    return LEGACY_SIM_REGNO_IGNORE;
+}
+
 int
 generic_frameless_function_invocation_not (struct frame_info *fi)
 {
@@ -224,7 +241,8 @@ default_double_format (struct gdbarch *gdbarch)
 }
 
 void
-default_print_float_info (void)
+default_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
+                         struct frame_info *frame)
 {
 #ifdef FLOAT_INFO
 #if GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL
@@ -232,7 +250,8 @@ default_print_float_info (void)
 #endif
   FLOAT_INFO;
 #else
-  printf_filtered ("No floating point info available for this processor.\n");
+  fprintf_filtered (file, "\
+No floating point info available for this processor.\n");
 #endif
 }
 
@@ -267,13 +286,6 @@ generic_cannot_extract_struct_value_address (char *dummy)
   return 0;
 }
 
-int
-default_register_sim_regno (int num)
-{
-  return num;
-}
-
-
 CORE_ADDR
 core_addr_identity (CORE_ADDR addr)
 {
@@ -338,7 +350,7 @@ generic_prepare_to_proceed (int select_it)
              flush_cached_frames ();
              registers_changed ();
              stop_pc = wait_pc;
-             select_frame (get_current_frame (), 0);
+             select_frame (get_current_frame ());
            }
           /* We return 1 to indicate that there is a breakpoint here,
              so we need to step over it before continuing to avoid
@@ -401,21 +413,13 @@ legacy_virtual_frame_pointer (CORE_ADDR pc,
   *frame_offset = 0;
 }
 
-/* Assume the world is flat.  Every register is large enough to fit a
-   target integer.  */
+/* Assume the world is sane, every register's virtual and real size
+   is identical.  */
 
 int
-generic_register_raw_size (int regnum)
+generic_register_size (int regnum)
 {
   gdb_assert (regnum >= 0 && regnum < NUM_REGS + NUM_PSEUDO_REGS);
-  return TARGET_INT_BIT / HOST_CHAR_BIT;
-}
-
-/* Assume the virtual size corresponds to the virtual type.  */
-
-int
-generic_register_virtual_size (int regnum)
-{
   return TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (regnum));
 }
 
@@ -437,6 +441,26 @@ legacy_pc_in_sigtramp (CORE_ADDR pc, char *name)
   return IN_SIGTRAMP(pc, name);
 }
 
+int
+legacy_convert_register_p (int regnum)
+{
+  return REGISTER_CONVERTIBLE (regnum);
+}
+
+void
+legacy_register_to_value (int regnum, struct type *type,
+                         char *from, char *to)
+{
+  REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to);
+}
+
+void
+legacy_value_to_register (struct type *type, int regnum,
+                         char *from, char *to)
+{
+  REGISTER_CONVERT_TO_RAW (type, regnum, from, to);
+}
+
 \f
 /* Functions to manipulate the endianness of the target.  */
 
This page took 0.03221 seconds and 4 git commands to generate.