From 4183d8120459822e219461c82c295e7571eee4f5 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Tue, 25 Mar 2003 20:38:47 +0000 Subject: 2003-03-25 Andrew Cagney * gdbarch.sh (DEPRECATED_STORE_STRUCT_RETURN): Replace STORE_STRUCT_RETURN. * gdbarch.h, gdbarch.c: Regenerate. * d10v-tdep.c (d10v_store_struct_return): Delete function. (d10v_push_arguments): Set the struct return register. (d10v_gdbarch_init): Update. * xstormy16-tdep.c (xstormy16_gdbarch_init): Update. * x86-64-tdep.c (x86_64_init_abi): Update. * vax-tdep.c (vax_gdbarch_init): Update. * v850-tdep.c (v850_gdbarch_init): Update. * sparc-tdep.c (sparc_gdbarch_init): Update. * sh-tdep.c (sh_gdbarch_init): Update. * s390-tdep.c (s390_gdbarch_init): Update. * rs6000-tdep.c (rs6000_gdbarch_init): Update. * ns32k-tdep.c (ns32k_gdbarch_init): Update. * mn10300-tdep.c (mn10300_gdbarch_init): Update. * mips-tdep.c (mips_gdbarch_init): Update. * mcore-tdep.c (mcore_gdbarch_init): Update. * m68k-tdep.c (m68k_gdbarch_init): Update. * m68hc11-tdep.c (m68hc11_gdbarch_init): Update. * ia64-tdep.c (ia64_gdbarch_init): Update. * i386-tdep.c (i386_gdbarch_init): Update. * hppa-tdep.c (hppa_gdbarch_init): Update. * h8300-tdep.c (h8300_gdbarch_init): Update. * frv-tdep.c (frv_gdbarch_init): Update. * cris-tdep.c (cris_gdbarch_init): Update. * avr-tdep.c (avr_gdbarch_init): Update. * arm-tdep.c (arm_gdbarch_init): Update. * alpha-tdep.c (alpha_gdbarch_init): Update. --- gdb/d10v-tdep.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) (limited to 'gdb/d10v-tdep.c') diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index f125fd1..583f8b1 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++) @@ -1706,7 +1695,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); -- cgit v1.1