diff options
author | Jeff Law <law@redhat.com> | 1997-02-12 00:48:47 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1997-02-12 00:48:47 +0000 |
commit | d601a41faa7be5a1b3a27222713f61ea0bb11ecd (patch) | |
tree | f5a8b8e4303489191e3d7a38ccbee0d02adcbd46 /gdb/config/mn10200 | |
parent | 380c32d50df2dba5393429b52effd51b1a3c0f0f (diff) | |
download | gdb-d601a41faa7be5a1b3a27222713f61ea0bb11ecd.zip gdb-d601a41faa7be5a1b3a27222713f61ea0bb11ecd.tar.gz gdb-d601a41faa7be5a1b3a27222713f61ea0bb11ecd.tar.bz2 |
* config/mn10200/tm-mn10200.h (STORE_STRUCT_RETURN): Fix.
* mn10200-tdep.c (mn10200_store_struct_return): New function.
(REG_STRUCT_HAS_ADDR): Tweak.
Fixes most of the structs.exp tests.
Diffstat (limited to 'gdb/config/mn10200')
-rw-r--r-- | gdb/config/mn10200/tm-mn10200.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/config/mn10200/tm-mn10200.h b/gdb/config/mn10200/tm-mn10200.h index aed0a6e..ac3c498 100644 --- a/gdb/config/mn10200/tm-mn10200.h +++ b/gdb/config/mn10200/tm-mn10200.h @@ -154,8 +154,8 @@ extern CORE_ADDR mn10200_frame_saved_pc PARAMS ((struct frame_info *)); } \ } -#define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) write_register (0, STRUCT_ADDR); - +#define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \ + (SP) = mn10200_store_struct_return (STRUCT_ADDR, SP) extern CORE_ADDR mn10200_skip_prologue PARAMS ((CORE_ADDR)); #define SKIP_PROLOGUE(pc) pc = mn10200_skip_prologue (pc) @@ -190,8 +190,8 @@ mn10200_push_arguments PARAMS ((int, struct value **, CORE_ADDR, #define PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP) -#define REG_STRUCT_HAS_ADDR(gcc_p,type) \ - (TYPE_LENGTH (type) > 8) +#define REG_STRUCT_HAS_ADDR(gcc_p,TYPE) \ + (TYPE_NFIELDS (TYPE) > 1 || TYPE_LENGTH (TYPE) > 8) #define USE_STRUCT_CONVENTION(GCC_P, TYPE) \ (TYPE_NFIELDS (TYPE) > 1 || TYPE_LENGTH (TYPE) > 8) |