aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorGeoffrey Noer <noer@cygnus>1997-01-03 22:34:52 +0000
committerGeoffrey Noer <noer@cygnus>1997-01-03 22:34:52 +0000
commit4efc404588fe0957285dd313a45b262d1090be1c (patch)
tree946a619fc334e03b0270e3f1e01631db8b453627 /gdb
parent6243aa73454d3007f53f7228ab8489551faa8271 (diff)
downloadgdb-4efc404588fe0957285dd313a45b262d1090be1c.zip
gdb-4efc404588fe0957285dd313a45b262d1090be1c.tar.gz
gdb-4efc404588fe0957285dd313a45b262d1090be1c.tar.bz2
Fri Jan 3 14:20:05 1997 Geoffrey Noer <noer@cygnus.com>
* mn10300-tdep.c (mn10300_push_arguments): rewrote also removed code elsewhere that made use of RP_REGNUM * config/mn10300/tm-mn10300.h: ripped out RP_REGNUM, V0_REGNUM, ARG0_REGNUM, ARGLAST_REGNUM (all not appropriate for mn10300 arch.), redefined SAVED_PC_AFTER_CALL, EXTRACT_RETURN_VALUE, EXTRACT_STRUCT_VALUE_ADDRESS, STORE_RETURN_VALUE
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/config/mn10300/tm-mn10300.h23
2 files changed, 16 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6e6ef60..1ef42e7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -2,6 +2,10 @@ Fri Jan 3 14:20:05 1997 Geoffrey Noer <noer@cygnus.com>
* mn10300-tdep.c (mn10300_push_arguments): rewrote
also removed code elsewhere that made use of RP_REGNUM
+ * config/mn10300/tm-mn10300.h: ripped out RP_REGNUM, V0_REGNUM,
+ ARG0_REGNUM, ARGLAST_REGNUM (all not appropriate for mn10300
+ arch.), redefined SAVED_PC_AFTER_CALL, EXTRACT_RETURN_VALUE,
+ EXTRACT_STRUCT_VALUE_ADDRESS, STORE_RETURN_VALUE
Tue Dec 31 15:19:32 1996 Geoffrey Noer <noer@cygnus.com>
diff --git a/gdb/config/mn10300/tm-mn10300.h b/gdb/config/mn10300/tm-mn10300.h
index 6a3a541..f95ce26 100644
--- a/gdb/config/mn10300/tm-mn10300.h
+++ b/gdb/config/mn10300/tm-mn10300.h
@@ -1,6 +1,5 @@
/* Parameters for execution on a Matsushita mn10300 processor.
- Copyright 1996
- Free Software Foundation, Inc.
+ Copyright 1996, 1997 Free Software Foundation, Inc.
Contributed by Geoffrey Noer <noer@cygnus.com>
@@ -41,10 +40,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define LAR_REGNUM 13
#define FP_REGNUM 7 /* needs to be virtual register ??? */
-#define V0_REGNUM 15 /* needs to be virtual register ??? */
-#define RP_REGNUM 16 /* needs to be virtual register ??? */
-#define ARG0_REGNUM 17 /* needs to be virtual register ??? */
-#define ARGLAST_REGNUM 18 /* needs to be virtual register ??? */
#define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int
@@ -62,7 +57,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define INNER_THAN <
-#define SAVED_PC_AFTER_CALL(fi) read_register (RP_REGNUM)
+#define SAVED_PC_AFTER_CALL(frame) \
+ read_memory_integer (read_register (SP_REGNUM), 4)
#ifdef __STDC__
struct frame_info;
@@ -88,15 +84,19 @@ extern CORE_ADDR mn10300_find_callers_reg PARAMS ((struct frame_info *fi, int re
extern CORE_ADDR mn10300_frame_saved_pc PARAMS ((struct frame_info *));
#define FRAME_SAVED_PC(FI) (mn10300_frame_saved_pc (FI))
+/* Extract from an array REGBUF containing the (raw) register state
+ a function return value of type TYPE, and copy that, in virtual format,
+ into VALBUF. */
+
#define EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
- memcpy (VALBUF, REGBUF + REGISTER_BYTE (V0_REGNUM), TYPE_LENGTH (TYPE))
+ memcpy (VALBUF, REGBUF + REGISTER_BYTE (0), TYPE_LENGTH (TYPE))
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
- extract_address (REGBUF + REGISTER_BYTE (V0_REGNUM), \
- REGISTER_RAW_SIZE (V0_REGNUM))
+ extract_address (REGBUF + REGISTER_BYTE (0), \
+ REGISTER_RAW_SIZE (0))
#define STORE_RETURN_VALUE(TYPE, VALBUF) \
- write_register_bytes(REGISTER_BYTE (V0_REGNUM), VALBUF, TYPE_LENGTH (TYPE));
+ write_register_bytes(REGISTER_BYTE (0), VALBUF, TYPE_LENGTH (TYPE));
extern CORE_ADDR mn10300_skip_prologue PARAMS ((CORE_ADDR pc));
#define SKIP_PROLOGUE(pc) pc = mn10300_skip_prologue (pc)
@@ -118,6 +118,7 @@ extern void mn10300_pop_frame PARAMS ((struct frame_info *frame));
#define CALL_DUMMY_LOCATION AT_ENTRY_POINT
#define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP)
#define CALL_DUMMY_ADDRESS() entry_point_address ()
+
extern CORE_ADDR mn10300_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR));
#define PUSH_RETURN_ADDRESS(PC, SP) mn10300_push_return_address (PC, SP)