This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch rfc] Deprecate STORE_STRUCT_RETURN, make optional


Hello,

This deprecates the STORE_STRUCT_RETURN method (and makes it optional).

The existing PUSH_ARGUMENTS method can, and in many cases, does the struct return store. In fact, STORE_STRUCT_RETURN implementations are often no more than:

static void
i386_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
{
  /* Do nothing.  Everything was already done by i386_push_arguments.  */
}

For the d10v, it eliminates that function.

I'll commit in a day or so (most likely before commiting the push_dummy_call() change).

Andrew

PS: This one was never documented.
2003-03-24  Andrew Cagney  <cagney at redhat dot com>

	* 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.
	
Index: alpha-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-tdep.c,v
retrieving revision 1.68
diff -u -r1.68 alpha-tdep.c
--- alpha-tdep.c	24 Mar 2003 03:54:46 -0000	1.68
+++ alpha-tdep.c	24 Mar 2003 18:29:12 -0000
@@ -54,7 +54,6 @@
 static gdbarch_register_convert_to_virtual_ftype
     alpha_register_convert_to_virtual;
 static gdbarch_register_convert_to_raw_ftype alpha_register_convert_to_raw;
-static gdbarch_store_struct_return_ftype alpha_store_struct_return;
 static gdbarch_deprecated_extract_return_value_ftype alpha_extract_return_value;
 static gdbarch_deprecated_extract_struct_value_address_ftype
     alpha_extract_struct_value_address;
@@ -1846,7 +1845,7 @@
   set_gdbarch_use_struct_convention (gdbarch, alpha_use_struct_convention);
   set_gdbarch_deprecated_extract_return_value (gdbarch, alpha_extract_return_value);
 
-  set_gdbarch_store_struct_return (gdbarch, alpha_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, alpha_store_struct_return);
   set_gdbarch_deprecated_store_return_value (gdbarch, alpha_store_return_value);
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
 					    alpha_extract_struct_value_address);
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.112
diff -u -r1.112 arm-tdep.c
--- arm-tdep.c	24 Mar 2003 03:54:47 -0000	1.112
+++ arm-tdep.c	24 Mar 2003 18:29:12 -0000
@@ -2995,7 +2995,7 @@
   /* Returning results.  */
   set_gdbarch_extract_return_value (gdbarch, arm_extract_return_value);
   set_gdbarch_store_return_value (gdbarch, arm_store_return_value);
-  set_gdbarch_store_struct_return (gdbarch, arm_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, arm_store_struct_return);
   set_gdbarch_use_struct_convention (gdbarch, arm_use_struct_convention);
   set_gdbarch_extract_struct_value_address (gdbarch,
 					    arm_extract_struct_value_address);
Index: avr-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/avr-tdep.c,v
retrieving revision 1.32
diff -u -r1.32 avr-tdep.c
--- avr-tdep.c	24 Mar 2003 03:54:47 -0000	1.32
+++ avr-tdep.c	24 Mar 2003 18:29:13 -0000
@@ -1186,7 +1186,7 @@
   set_gdbarch_deprecated_pop_frame (gdbarch, avr_pop_frame);
 
   set_gdbarch_use_struct_convention (gdbarch, generic_use_struct_convention);
-  set_gdbarch_store_struct_return (gdbarch, avr_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, avr_store_struct_return);
 
   set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, avr_scan_prologue);
   set_gdbarch_deprecated_init_extra_frame_info (gdbarch, avr_init_extra_frame_info);
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.54
diff -u -r1.54 cris-tdep.c
--- cris-tdep.c	24 Mar 2003 03:54:47 -0000	1.54
+++ cris-tdep.c	24 Mar 2003 18:29:13 -0000
@@ -4287,7 +4287,7 @@
   set_gdbarch_push_return_address (gdbarch, cris_push_return_address);
   set_gdbarch_deprecated_pop_frame (gdbarch, cris_pop_frame);
 
-  set_gdbarch_store_struct_return (gdbarch, cris_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, cris_store_struct_return);
   set_gdbarch_deprecated_extract_struct_value_address
     (gdbarch, cris_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch, cris_use_struct_convention);
Index: d10v-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/d10v-tdep.c,v
retrieving revision 1.87
diff -u -r1.87 d10v-tdep.c
--- d10v-tdep.c	17 Mar 2003 14:23:49 -0000	1.87
+++ d10v-tdep.c	24 Mar 2003 18:29:14 -0000
@@ -437,18 +437,6 @@
   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 @@
   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++)
@@ -1707,7 +1696,6 @@
   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);
Index: frv-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/frv-tdep.c,v
retrieving revision 1.21
diff -u -r1.21 frv-tdep.c
--- frv-tdep.c	24 Mar 2003 03:54:47 -0000	1.21
+++ frv-tdep.c	24 Mar 2003 18:29:14 -0000
@@ -41,7 +41,6 @@
 static gdbarch_use_struct_convention_ftype frv_use_struct_convention;
 static gdbarch_frameless_function_invocation_ftype frv_frameless_function_invocation;
 static gdbarch_init_extra_frame_info_ftype stupid_useless_init_extra_frame_info;
-static gdbarch_store_struct_return_ftype frv_store_struct_return;
 static gdbarch_push_arguments_ftype frv_push_arguments;
 static gdbarch_push_return_address_ftype frv_push_return_address;
 static gdbarch_saved_pc_after_call_ftype frv_saved_pc_after_call;
@@ -1085,7 +1084,7 @@
   set_gdbarch_use_struct_convention (gdbarch, frv_use_struct_convention);
   set_gdbarch_deprecated_extract_return_value (gdbarch, frv_extract_return_value);
 
-  set_gdbarch_store_struct_return (gdbarch, frv_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, frv_store_struct_return);
   set_gdbarch_deprecated_store_return_value (gdbarch, frv_store_return_value);
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, frv_extract_struct_value_address);
 
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.207
diff -u -r1.207 gdbarch.sh
--- gdbarch.sh	24 Mar 2003 03:54:48 -0000	1.207
+++ gdbarch.sh	24 Mar 2003 18:29:16 -0000
@@ -560,8 +560,8 @@
 F:2:DEPRECATED_PUSH_DUMMY_FRAME:void:deprecated_push_dummy_frame:void:-:::0
 F:2:PUSH_RETURN_ADDRESS:CORE_ADDR:push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0
 F:2:DEPRECATED_POP_FRAME:void:deprecated_pop_frame:void:-:::0
-#
-f:2:STORE_STRUCT_RETURN:void:store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp:::0
+# NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS.
+F:2:DEPRECATED_STORE_STRUCT_RETURN:void:deprecated_store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp:::0
 #
 f:2:EXTRACT_RETURN_VALUE:void:extract_return_value:struct type *type, struct regcache *regcache, void *valbuf:type, regcache, valbuf:::legacy_extract_return_value::0
 f:2:STORE_RETURN_VALUE:void:store_return_value:struct type *type, struct regcache *regcache, const void *valbuf:type, regcache, valbuf:::legacy_store_return_value::0
Index: h8300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/h8300-tdep.c,v
retrieving revision 1.43
diff -u -r1.43 h8300-tdep.c
--- h8300-tdep.c	24 Mar 2003 03:54:48 -0000	1.43
+++ h8300-tdep.c	24 Mar 2003 18:29:16 -0000
@@ -1152,7 +1152,7 @@
   set_gdbarch_deprecated_extract_return_value (gdbarch, h8300_extract_return_value);
   set_gdbarch_push_arguments (gdbarch, h8300_push_arguments);
   set_gdbarch_deprecated_pop_frame (gdbarch, h8300_pop_frame);
-  set_gdbarch_store_struct_return (gdbarch, h8300_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, h8300_store_struct_return);
   set_gdbarch_deprecated_store_return_value (gdbarch, h8300_store_return_value);
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, h8300_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch, h8300_use_struct_convention);
Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.60
diff -u -r1.60 hppa-tdep.c
--- hppa-tdep.c	24 Mar 2003 03:54:48 -0000	1.60
+++ hppa-tdep.c	24 Mar 2003 18:29:17 -0000
@@ -4983,7 +4983,7 @@
   set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
   set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);
   set_gdbarch_register_virtual_type (gdbarch, hppa_register_virtual_type);
-  set_gdbarch_store_struct_return (gdbarch, hppa_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, hppa_store_struct_return);
   set_gdbarch_deprecated_extract_return_value (gdbarch,
                                                hppa_extract_return_value);
   set_gdbarch_use_struct_convention (gdbarch, hppa_use_struct_convention);
Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.120
diff -u -r1.120 i386-tdep.c
--- i386-tdep.c	24 Mar 2003 03:54:48 -0000	1.120
+++ i386-tdep.c	24 Mar 2003 18:29:17 -0000
@@ -1590,7 +1590,7 @@
   set_gdbarch_push_arguments (gdbarch, i386_push_arguments);
   set_gdbarch_push_return_address (gdbarch, i386_push_return_address);
   set_gdbarch_deprecated_pop_frame (gdbarch, i386_pop_frame);
-  set_gdbarch_store_struct_return (gdbarch, i386_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, i386_store_struct_return);
   set_gdbarch_store_return_value (gdbarch, i386_store_return_value);
   set_gdbarch_extract_struct_value_address (gdbarch,
 					    i386_extract_struct_value_address);
Index: ia64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ia64-tdep.c,v
retrieving revision 1.56
diff -u -r1.56 ia64-tdep.c
--- ia64-tdep.c	24 Mar 2003 03:54:48 -0000	1.56
+++ ia64-tdep.c	24 Mar 2003 18:29:18 -0000
@@ -96,7 +96,6 @@
 static gdbarch_deprecated_extract_struct_value_address_ftype ia64_extract_struct_value_address;
 static gdbarch_use_struct_convention_ftype ia64_use_struct_convention;
 static gdbarch_frameless_function_invocation_ftype ia64_frameless_function_invocation;
-static gdbarch_store_struct_return_ftype ia64_store_struct_return;
 static gdbarch_push_arguments_ftype ia64_push_arguments;
 static gdbarch_push_return_address_ftype ia64_push_return_address;
 static gdbarch_saved_pc_after_call_ftype ia64_saved_pc_after_call;
@@ -2205,7 +2204,7 @@
   set_gdbarch_use_struct_convention (gdbarch, ia64_use_struct_convention);
   set_gdbarch_deprecated_extract_return_value (gdbarch, ia64_extract_return_value);
 
-  set_gdbarch_store_struct_return (gdbarch, ia64_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, ia64_store_struct_return);
   set_gdbarch_deprecated_store_return_value (gdbarch, ia64_store_return_value);
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, ia64_extract_struct_value_address);
 
Index: m68hc11-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68hc11-tdep.c,v
retrieving revision 1.53
diff -u -r1.53 m68hc11-tdep.c
--- m68hc11-tdep.c	24 Mar 2003 03:54:48 -0000	1.53
+++ m68hc11-tdep.c	24 Mar 2003 18:29:18 -0000
@@ -1397,7 +1397,7 @@
   set_gdbarch_push_return_address (gdbarch, m68hc11_push_return_address);
   set_gdbarch_return_value_on_stack (gdbarch, m68hc11_return_value_on_stack);
 
-  set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, m68hc11_store_struct_return);
   set_gdbarch_deprecated_store_return_value (gdbarch, m68hc11_store_return_value);
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68hc11_extract_struct_value_address);
   set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
@@ -1412,7 +1412,7 @@
 
   set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
 
-  set_gdbarch_store_struct_return (gdbarch, m68hc11_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, m68hc11_store_struct_return);
   set_gdbarch_deprecated_store_return_value (gdbarch, m68hc11_store_return_value);
   set_gdbarch_deprecated_extract_struct_value_address
     (gdbarch, m68hc11_extract_struct_value_address);
Index: m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.48
diff -u -r1.48 m68k-tdep.c
--- m68k-tdep.c	24 Mar 2003 03:54:48 -0000	1.48
+++ m68k-tdep.c	24 Mar 2003 18:29:19 -0000
@@ -1005,7 +1005,7 @@
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
   set_gdbarch_decr_pc_after_break (gdbarch, 2);
 
-  set_gdbarch_store_struct_return (gdbarch, m68k_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, m68k_store_struct_return);
   set_gdbarch_deprecated_extract_return_value (gdbarch,
 					       m68k_deprecated_extract_return_value);
   set_gdbarch_deprecated_store_return_value (gdbarch, m68k_store_return_value);
Index: mcore-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mcore-tdep.c,v
retrieving revision 1.45
diff -u -r1.45 mcore-tdep.c
--- mcore-tdep.c	24 Mar 2003 03:54:48 -0000	1.45
+++ mcore-tdep.c	24 Mar 2003 18:29:19 -0000
@@ -1143,7 +1143,7 @@
   set_gdbarch_deprecated_store_return_value (gdbarch, mcore_store_return_value);
   set_gdbarch_deprecated_extract_return_value (gdbarch, 
 					       mcore_extract_return_value);
-  set_gdbarch_store_struct_return (gdbarch, mcore_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, mcore_store_struct_return);
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, 
 						       mcore_extract_struct_value_address);
   set_gdbarch_skip_prologue (gdbarch, mcore_skip_prologue);
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.175
diff -u -r1.175 mips-tdep.c
--- mips-tdep.c	24 Mar 2003 03:54:48 -0000	1.175
+++ mips-tdep.c	24 Mar 2003 18:29:20 -0000
@@ -6080,7 +6080,7 @@
   /* Hook in OS ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);
 
-  set_gdbarch_store_struct_return (gdbarch, mips_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, mips_store_struct_return);
   set_gdbarch_extract_struct_value_address (gdbarch, 
 					    mips_extract_struct_value_address);
   
Index: mn10300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mn10300-tdep.c,v
retrieving revision 1.60
diff -u -r1.60 mn10300-tdep.c
--- mn10300-tdep.c	24 Mar 2003 03:54:48 -0000	1.60
+++ mn10300-tdep.c	24 Mar 2003 18:29:20 -0000
@@ -1176,7 +1176,7 @@
   set_gdbarch_deprecated_extract_struct_value_address
     (gdbarch, mn10300_extract_struct_value_address);
   set_gdbarch_deprecated_store_return_value (gdbarch, mn10300_store_return_value);
-  set_gdbarch_store_struct_return (gdbarch, mn10300_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, mn10300_store_struct_return);
   set_gdbarch_deprecated_pop_frame (gdbarch, mn10300_pop_frame);
   set_gdbarch_skip_prologue (gdbarch, mn10300_skip_prologue);
   set_gdbarch_frame_args_skip (gdbarch, 0);
Index: ns32k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ns32k-tdep.c,v
retrieving revision 1.37
diff -u -r1.37 ns32k-tdep.c
--- ns32k-tdep.c	24 Mar 2003 03:54:48 -0000	1.37
+++ ns32k-tdep.c	24 Mar 2003 18:29:20 -0000
@@ -585,7 +585,7 @@
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
   /* Return value info */
-  set_gdbarch_store_struct_return (gdbarch, ns32k_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, ns32k_store_struct_return);
   set_gdbarch_deprecated_extract_return_value (gdbarch, ns32k_extract_return_value);
   set_gdbarch_deprecated_store_return_value (gdbarch, ns32k_store_return_value);
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.113
diff -u -r1.113 rs6000-tdep.c
--- rs6000-tdep.c	24 Mar 2003 03:54:48 -0000	1.113
+++ rs6000-tdep.c	24 Mar 2003 18:29:21 -0000
@@ -2929,7 +2929,7 @@
   else
     set_gdbarch_push_arguments (gdbarch, rs6000_push_arguments);
 
-  set_gdbarch_store_struct_return (gdbarch, rs6000_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, rs6000_store_struct_return);
   set_gdbarch_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address);
   set_gdbarch_deprecated_pop_frame (gdbarch, rs6000_pop_frame);
 
Index: s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.78
diff -u -r1.78 s390-tdep.c
--- s390-tdep.c	24 Mar 2003 03:54:48 -0000	1.78
+++ s390-tdep.c	24 Mar 2003 18:29:22 -0000
@@ -1813,7 +1813,7 @@
   set_gdbarch_frame_locals_address (gdbarch, s390_frame_args_address);
   /* We can't do this */
   set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
-  set_gdbarch_store_struct_return (gdbarch, s390_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, s390_store_struct_return);
   set_gdbarch_deprecated_extract_return_value (gdbarch, s390_extract_return_value);
   set_gdbarch_deprecated_store_return_value (gdbarch, s390_store_return_value);
   /* Amount PC must be decremented by after a breakpoint.
Index: sh-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh-tdep.c,v
retrieving revision 1.104
diff -u -r1.104 sh-tdep.c
--- sh-tdep.c	24 Mar 2003 03:54:48 -0000	1.104
+++ sh-tdep.c	24 Mar 2003 18:29:22 -0000
@@ -4376,7 +4376,7 @@
   set_gdbarch_deprecated_init_extra_frame_info (gdbarch, sh_init_extra_frame_info);
   set_gdbarch_deprecated_extract_return_value (gdbarch, sh_extract_return_value);
   set_gdbarch_push_arguments (gdbarch, sh_push_arguments);
-  set_gdbarch_store_struct_return (gdbarch, sh_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, sh_store_struct_return);
   set_gdbarch_use_struct_convention (gdbarch, sh_use_struct_convention);
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
   set_gdbarch_deprecated_pop_frame (gdbarch, sh_pop_frame);
@@ -4618,7 +4618,7 @@
       set_gdbarch_deprecated_get_saved_register (gdbarch, sh64_get_saved_register);
       set_gdbarch_deprecated_extract_return_value (gdbarch, sh64_extract_return_value);
       set_gdbarch_push_arguments (gdbarch, sh64_push_arguments);
-      /*set_gdbarch_store_struct_return (gdbarch, sh64_store_struct_return);*/
+      /*set_gdbarch_deprecated_store_struct_return (gdbarch, sh64_store_struct_return);*/
       set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh64_extract_struct_value_address);
       set_gdbarch_use_struct_convention (gdbarch, sh64_use_struct_convention);
       set_gdbarch_deprecated_pop_frame (gdbarch, sh64_pop_frame);
Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.74
diff -u -r1.74 sparc-tdep.c
--- sparc-tdep.c	24 Mar 2003 03:54:49 -0000	1.74
+++ sparc-tdep.c	24 Mar 2003 18:29:23 -0000
@@ -3276,7 +3276,7 @@
       set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
 #endif
       set_gdbarch_stack_align (gdbarch, sparc32_stack_align);
-      set_gdbarch_store_struct_return (gdbarch, sparc32_store_struct_return);
+      set_gdbarch_deprecated_store_struct_return (gdbarch, sparc32_store_struct_return);
       set_gdbarch_use_struct_convention (gdbarch, 
 					 generic_use_struct_convention);
       set_gdbarch_write_sp (gdbarch, generic_target_write_sp);
@@ -3333,7 +3333,7 @@
       set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
 #endif
       set_gdbarch_stack_align (gdbarch, sparc64_stack_align);
-      set_gdbarch_store_struct_return (gdbarch, sparc64_store_struct_return);
+      set_gdbarch_deprecated_store_struct_return (gdbarch, sparc64_store_struct_return);
       set_gdbarch_use_struct_convention (gdbarch, 
 					 sparc64_use_struct_convention);
       set_gdbarch_write_sp (gdbarch, sparc64_write_sp);
Index: v850-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/v850-tdep.c,v
retrieving revision 1.44
diff -u -r1.44 v850-tdep.c
--- v850-tdep.c	24 Mar 2003 03:54:49 -0000	1.44
+++ v850-tdep.c	24 Mar 2003 18:29:23 -0000
@@ -1272,7 +1272,7 @@
   set_gdbarch_deprecated_extract_return_value (gdbarch, v850_extract_return_value);
   set_gdbarch_push_arguments (gdbarch, v850_push_arguments);
   set_gdbarch_deprecated_pop_frame (gdbarch, v850_pop_frame);
-  set_gdbarch_store_struct_return (gdbarch, v850_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, v850_store_struct_return);
   set_gdbarch_deprecated_store_return_value (gdbarch, v850_store_return_value);
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, v850_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch, v850_use_struct_convention);
Index: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.95
diff -u -r1.95 valops.c
--- valops.c	24 Mar 2003 03:54:50 -0000	1.95
+++ valops.c	24 Mar 2003 18:29:24 -0000
@@ -1654,16 +1654,11 @@
       }
 
   /* Store the address at which the structure is supposed to be
-     written.  Note that this (and the code which reserved the space
-     above) assumes that gcc was used to compile this function.  Since
-     it doesn't cost us anything but space and if the function is pcc
-     it will ignore this value, we will make that assumption.
-
-     Also note that on some machines (like the sparc) pcc uses a
-     convention like gcc's.  */
-
-  if (struct_return)
-    STORE_STRUCT_RETURN (struct_addr, sp);
+     written.  */
+  /* NOTE: 2003-03-24: Since PUSH_ARGUMENTS can (and typically does)
+     store the struct return address, this call is entirely redundant.  */
+  if (struct_return && DEPRECATED_STORE_STRUCT_RETURN_P ())
+    DEPRECATED_STORE_STRUCT_RETURN (struct_addr, sp);
 
   /* Write the stack pointer.  This is here because the statements above
      might fool with it.  On SPARC, this write also stores the register
Index: vax-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/vax-tdep.c,v
retrieving revision 1.38
diff -u -r1.38 vax-tdep.c
--- vax-tdep.c	24 Mar 2003 03:54:50 -0000	1.38
+++ vax-tdep.c	24 Mar 2003 18:29:24 -0000
@@ -46,7 +46,6 @@
 static gdbarch_frame_args_address_ftype vax_frame_args_address;
 static gdbarch_frame_locals_address_ftype vax_frame_locals_address;
 
-static gdbarch_store_struct_return_ftype vax_store_struct_return;
 static gdbarch_deprecated_extract_return_value_ftype vax_extract_return_value;
 static gdbarch_deprecated_extract_struct_value_address_ftype
     vax_extract_struct_value_address;
@@ -660,7 +659,7 @@
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
   /* Return value info */
-  set_gdbarch_store_struct_return (gdbarch, vax_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, vax_store_struct_return);
   set_gdbarch_deprecated_extract_return_value (gdbarch, vax_extract_return_value);
   set_gdbarch_deprecated_store_return_value (gdbarch, vax_store_return_value);
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, vax_extract_struct_value_address);
Index: x86-64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v
retrieving revision 1.57
diff -u -r1.57 x86-64-tdep.c
--- x86-64-tdep.c	24 Mar 2003 03:54:50 -0000	1.57
+++ x86-64-tdep.c	24 Mar 2003 18:29:24 -0000
@@ -1016,7 +1016,7 @@
   set_gdbarch_push_arguments (gdbarch, x86_64_push_arguments);
   set_gdbarch_push_return_address (gdbarch, x86_64_push_return_address);
   set_gdbarch_deprecated_pop_frame (gdbarch, x86_64_pop_frame);
-  set_gdbarch_store_struct_return (gdbarch, x86_64_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, x86_64_store_struct_return);
   set_gdbarch_store_return_value (gdbarch, x86_64_store_return_value);
   /* Override, since this is handled by x86_64_extract_return_value.  */
   set_gdbarch_extract_struct_value_address (gdbarch, NULL);
Index: xstormy16-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/xstormy16-tdep.c,v
retrieving revision 1.32
diff -u -r1.32 xstormy16-tdep.c
--- xstormy16-tdep.c	24 Mar 2003 03:54:50 -0000	1.32
+++ xstormy16-tdep.c	24 Mar 2003 18:29:25 -0000
@@ -1088,7 +1088,7 @@
   set_gdbarch_deprecated_extract_return_value (gdbarch, xstormy16_extract_return_value);
   set_gdbarch_push_arguments (gdbarch, xstormy16_push_arguments);
   set_gdbarch_deprecated_pop_frame (gdbarch, xstormy16_pop_frame);
-  set_gdbarch_store_struct_return (gdbarch, xstormy16_store_struct_return);
+  set_gdbarch_deprecated_store_struct_return (gdbarch, xstormy16_store_struct_return);
   set_gdbarch_deprecated_store_return_value (gdbarch, xstormy16_store_return_value);
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, xstormy16_extract_struct_value_address);
   set_gdbarch_use_struct_convention (gdbarch,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]