summaryrefslogtreecommitdiff
path: root/gdb/d10v-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/d10v-tdep.c')
-rw-r--r--gdb/d10v-tdep.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index f443ceff8dd..d9c95c78d31 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -437,18 +437,6 @@ d10v_integer_to_address (struct type *type, void *buf)
return val;
}
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function.
-
- We store structs through a pointer passed in the first Argument
- register. */
-
-static void
-d10v_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
- write_register (ARG1_REGNUM, (addr));
-}
-
/* Write into appropriate registers a function return value
of type TYPE, given in virtual format.
@@ -1030,13 +1018,14 @@ d10v_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
struct stack_item *si = NULL;
long val;
- /* If struct_return is true, then the struct return address will
- consume one argument-passing register. No need to actually
- write the value to the register -- that's done by
- d10v_store_struct_return(). */
-
+ /* If STRUCT_RETURN is true, then the struct return address (in
+ STRUCT_ADDR) will consume the first argument-passing register.
+ Both adjust the register count and store that value. */
if (struct_return)
- regnum++;
+ {
+ write_register (regnum, struct_addr);
+ regnum++;
+ }
/* Fill in registers and arg lists */
for (i = 0; i < nargs; i++)
@@ -1700,14 +1689,12 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_words (gdbarch, d10v_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (d10v_call_dummy_words));
set_gdbarch_call_dummy_p (gdbarch, 1);
- set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_extract_return_value (gdbarch, d10v_extract_return_value);
set_gdbarch_push_arguments (gdbarch, d10v_push_arguments);
set_gdbarch_push_return_address (gdbarch, d10v_push_return_address);
- set_gdbarch_store_struct_return (gdbarch, d10v_store_struct_return);
set_gdbarch_store_return_value (gdbarch, d10v_store_return_value);
set_gdbarch_extract_struct_value_address (gdbarch, d10v_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, d10v_use_struct_convention);
@@ -1728,7 +1715,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_stack_align (gdbarch, d10v_stack_align);
set_gdbarch_register_sim_regno (gdbarch, d10v_register_sim_regno);
- set_gdbarch_extra_stack_alignment_needed (gdbarch, 0);
set_gdbarch_print_registers_info (gdbarch, d10v_print_registers_info);