2004-02-25 Roland McGrath <roland@redhat.com>
[deliverable/binutils-gdb.git] / gdb / xstormy16-tdep.c
index e4bebc875daa0f25599f2d692503c9dbe59be66e..33c8b4ef0c33047807254dda0f2527a420e71330 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for the Sanyo Xstormy16a (LC590000) processor.
 
-   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,7 +22,6 @@
 #include "defs.h"
 #include "value.h"
 #include "inferior.h"
-#include "symfile.h"
 #include "arch-utils.h"
 #include "regcache.h"
 #include "gdbcore.h"
@@ -151,16 +150,6 @@ xstormy16_register_raw_size (int regnum)
     return xstormy16_reg_size;
 }
 
-/* Function: xstormy16_register_virtual_size
-   Returns the number of bytes occupied by the register as represented
-   internally by gdb. */
-
-static int
-xstormy16_register_virtual_size (int regnum)
-{
-  return xstormy16_register_raw_size (regnum);
-}
-
 /* Function: xstormy16_reg_virtual_type 
    Returns the default type for register N. */
 
@@ -409,10 +398,14 @@ xstormy16_store_return_value (struct type *type, char *valbuf)
 */
 
 static CORE_ADDR
-xstormy16_extract_struct_value_address (char *regbuf)
+xstormy16_extract_struct_value_address (struct regcache *regcache)
 {
-  return extract_unsigned_integer (regbuf + xstormy16_register_byte (E_PTR_RET_REGNUM),
-                                  xstormy16_reg_size);
+  /* FIXME: cagney/2004-01-17: Does the ABI guarantee that the return
+     address regster is preserved across function calls?  Probably
+     not, making this function wrong.  */
+  ULONGEST val;
+  regcache_raw_read_unsigned (regcache, E_PTR_RET_REGNUM, &val);
+  return val;
 }
 
 /* Function: xstormy16_use_struct_convention 
@@ -1069,13 +1062,6 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
    */
   /* Stack grows up. */
   set_gdbarch_inner_than (gdbarch, core_addr_greaterthan);
-  /* PC stops zero byte after a trap instruction
-     (which means: exactly on trap instruction). */
-  set_gdbarch_decr_pc_after_break (gdbarch, 0);
-  /* This value is almost never non-zero... */
-  set_gdbarch_function_start_offset (gdbarch, 0);
-  /* This value is almost never non-zero... */
-  set_gdbarch_frame_args_skip (gdbarch, 0);
 
   /*
    * Call Dummies
This page took 0.024524 seconds and 4 git commands to generate.