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 CALL_DUMMY_STACK_ADJUST{,_}


Hello,

This patch combines CALL_DUMMY_STACK_ADJUST and CALL_DUMMY_STACK_ADJUST_P, which are both used by hand_function_call(), into a single DEPRECATED_CALL_DUMMY_STACK_ADJUST (with predicate).

The thing to notice in this patch is how it was only the SPARC that needed this (look at all the targets that disabled it), and then, even the SPARC could have handled this directly in PUSH_ARGUMENTS.

I'll commit this in a day or so,
Andrew
2003-03-23  Andrew Cagney  <cagney at redhat dot com>

	* gdbarch.sh (CALL_DUMMY_STACK_ADJUST_P): Delete.
	(DEPRECATED_CALL_DUMMY_STACK_ADJUST): Replace
	CALL_DUMMY_STACK_ADJUST with a predicate variable.
	* gdbarch.h, gdbarch.c: Regenerate.
	* xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set
	call_dummy_stack_adjust_p.
	* vax-tdep.c (vax_gdbarch_init): Ditto.
	* v850-tdep.c (v850_gdbarch_init): Ditto.
	* sh-tdep.c (sh_gdbarch_init): Ditto.
	* s390-tdep.c (s390_gdbarch_init): Ditto.
	* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
	* ns32k-tdep.c (ns32k_gdbarch_init): Ditto.
	* mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
	* mips-tdep.c (mips_gdbarch_init): Ditto.
	* mcore-tdep.c (mcore_gdbarch_init): Ditto.
	* m68k-tdep.c (m68k_gdbarch_init): Ditto.
	* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
	* ia64-tdep.c (ia64_gdbarch_init): Ditto.
	* i386-tdep.c (i386_gdbarch_init): Ditto.
	* h8300-tdep.c (h8300_gdbarch_init): Ditto.
	* frv-tdep.c (frv_gdbarch_init): Ditto.
	* d10v-tdep.c (d10v_gdbarch_init): Ditto.
	* cris-tdep.c (cris_gdbarch_init): Ditto.
	* avr-tdep.c (avr_gdbarch_init): Ditto.
	* arm-tdep.c (arm_gdbarch_init): Ditto.
	* alpha-tdep.c (alpha_gdbarch_init): Ditto.
	* config/sparc/tm-sp64.h (CALL_DUMMY_STACK_ADJUST): Update.
	* config/sparc/tm-sparc.h (CALL_DUMMY_STACK_ADJUST): Update.
	* config/sparc/tm-sp64.h (CALL_DUMMY_STACK_ADJUST): Update.
	* sparc-tdep.c (sparc_gdbarch_init): Update.  Do not set
	call_dummy_stack_adjust_p.
	* inferior.h (CALL_DUMMY_STACK_ADJUST_P): Delete macro.
	(CALL_DUMMY_STACK_ADJUST): Delete macro.
	* sparc-tdep.c (sparc32_push_arguments): Update.
	* valops.c (hand_function_call): Update.

Index: doc/ChangeLog
2003-03-23  Andrew Cagney  <cagney at redhat dot com>

	* gdbint.texinfo (Target Architecture Definition): Delete
	reference to CALL_DUMMY_STACK_ADJUST_P.  Rename
	CALL_DUMMY_STACK_ADJUST to DEPRECATED_CALL_DUMMY_STACK_ADJUST.
	Add reference to PUSH_ARGUMENTS.

Index: alpha-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-tdep.c,v
retrieving revision 1.67
diff -u -r1.67 alpha-tdep.c
--- alpha-tdep.c	13 Mar 2003 21:45:38 -0000	1.67
+++ alpha-tdep.c	24 Mar 2003 18:49:51 -0000
@@ -1877,7 +1877,6 @@
   set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
   set_gdbarch_call_dummy_start_offset (gdbarch, 0);
   set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_deprecated_push_dummy_frame (gdbarch, alpha_push_dummy_frame);
   set_gdbarch_fix_call_dummy (gdbarch, alpha_fix_call_dummy);
   set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop);
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.107
diff -u -r1.107 arm-tdep.c
--- arm-tdep.c	13 Mar 2003 21:45:39 -0000	1.107
+++ arm-tdep.c	24 Mar 2003 18:49:51 -0000
@@ -2888,7 +2888,6 @@
   set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
 
   set_gdbarch_call_dummy_p (gdbarch, 1);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
 
   set_gdbarch_call_dummy_words (gdbarch, arm_call_dummy_words);
   set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
Index: avr-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/avr-tdep.c,v
retrieving revision 1.31
diff -u -r1.31 avr-tdep.c
--- avr-tdep.c	13 Mar 2003 21:45:39 -0000	1.31
+++ avr-tdep.c	24 Mar 2003 18:49:52 -0000
@@ -1174,7 +1174,6 @@
   set_gdbarch_call_dummy_length (gdbarch, 0);
   set_gdbarch_call_dummy_p (gdbarch, 1);
   set_gdbarch_call_dummy_words (gdbarch, avr_call_dummy_words);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
 
 /*    set_gdbarch_believe_pcc_promotion (gdbarch, 1); // TRoth: should this be set? */
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.53
diff -u -r1.53 cris-tdep.c
--- cris-tdep.c	14 Mar 2003 16:05:35 -0000	1.53
+++ cris-tdep.c	24 Mar 2003 18:49:52 -0000
@@ -4276,7 +4276,6 @@
   set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
   
   /* No stack adjustment needed when peforming an inferior function call.  */
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
 
   set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
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:49:53 -0000
@@ -1700,7 +1700,6 @@
   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);
Index: frv-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/frv-tdep.c,v
retrieving revision 1.20
diff -u -r1.20 frv-tdep.c
--- frv-tdep.c	13 Mar 2003 21:45:39 -0000	1.20
+++ frv-tdep.c	24 Mar 2003 18:49:53 -0000
@@ -1115,7 +1115,6 @@
   set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
   set_gdbarch_call_dummy_start_offset (gdbarch, 0);
   set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
 
   set_gdbarch_decr_pc_after_break (gdbarch, 0);
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.206
diff -u -r1.206 gdbarch.sh
--- gdbarch.sh	14 Mar 2003 16:05:35 -0000	1.206
+++ gdbarch.sh	24 Mar 2003 18:49:55 -0000
@@ -533,8 +533,7 @@
 v:1:CALL_DUMMY_P:int:call_dummy_p::::0:-1
 v:2:CALL_DUMMY_WORDS:LONGEST *:call_dummy_words::::0:legacy_call_dummy_words::0:0x%08lx
 v:2:SIZEOF_CALL_DUMMY_WORDS:int:sizeof_call_dummy_words::::0:legacy_sizeof_call_dummy_words::0:0x%08lx
-v:1:CALL_DUMMY_STACK_ADJUST_P:int:call_dummy_stack_adjust_p::::0:-1:::0x%08lx
-v:2:CALL_DUMMY_STACK_ADJUST:int:call_dummy_stack_adjust::::0:::gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0:0x%08lx::CALL_DUMMY_STACK_ADJUST_P
+V:2:DEPRECATED_CALL_DUMMY_STACK_ADJUST:int:deprecated_call_dummy_stack_adjust::::0
 f:2:FIX_CALL_DUMMY:void:fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p:::0
 F:2:DEPRECATED_INIT_FRAME_PC_FIRST:CORE_ADDR:deprecated_init_frame_pc_first:int fromleaf, struct frame_info *prev:fromleaf, prev
 F:2:DEPRECATED_INIT_FRAME_PC:CORE_ADDR:deprecated_init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev
Index: h8300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/h8300-tdep.c,v
retrieving revision 1.42
diff -u -r1.42 h8300-tdep.c
--- h8300-tdep.c	13 Mar 2003 21:45:40 -0000	1.42
+++ h8300-tdep.c	24 Mar 2003 18:49:55 -0000
@@ -1164,8 +1164,6 @@
   set_gdbarch_call_dummy_p (gdbarch, 1);
   set_gdbarch_call_dummy_words (gdbarch, call_dummy_words);
   set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
-  /* set_gdbarch_call_dummy_stack_adjust */
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
   set_gdbarch_breakpoint_from_pc (gdbarch, h8300_breakpoint_from_pc);
 
Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.119
diff -u -r1.119 i386-tdep.c
--- i386-tdep.c	16 Mar 2003 20:14:57 -0000	1.119
+++ i386-tdep.c	24 Mar 2003 18:49:55 -0000
@@ -1573,7 +1573,6 @@
   set_gdbarch_call_dummy_p (gdbarch, 1);
   set_gdbarch_call_dummy_words (gdbarch, NULL);
   set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
 
   set_gdbarch_register_convertible (gdbarch, i386_register_convertible);
Index: ia64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ia64-tdep.c,v
retrieving revision 1.55
diff -u -r1.55 ia64-tdep.c
--- ia64-tdep.c	14 Mar 2003 16:05:35 -0000	1.55
+++ ia64-tdep.c	24 Mar 2003 18:49:56 -0000
@@ -2246,7 +2246,6 @@
   set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
   set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
   set_gdbarch_call_dummy_start_offset (gdbarch, 0);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
 
   set_gdbarch_decr_pc_after_break (gdbarch, 0);
Index: inferior.h
===================================================================
RCS file: /cvs/src/src/gdb/inferior.h,v
retrieving revision 1.42
diff -u -r1.42 inferior.h
--- inferior.h	21 Jan 2003 19:43:47 -0000	1.42
+++ inferior.h	24 Mar 2003 18:49:56 -0000
@@ -437,18 +437,6 @@
 #define CALL_DUMMY_LENGTH (internal_error (__FILE__, __LINE__, "CALL_DUMMY_LENGTH"), 0)
 #endif
 
-#if defined (CALL_DUMMY_STACK_ADJUST)
-#if !defined (CALL_DUMMY_STACK_ADJUST_P)
-#define CALL_DUMMY_STACK_ADJUST_P (1)
-#endif
-#endif
-#if !defined (CALL_DUMMY_STACK_ADJUST)
-#define CALL_DUMMY_STACK_ADJUST (internal_error (__FILE__, __LINE__, "CALL_DUMMY_STACK_ADJUST"), 0)
-#endif
-#if !defined (CALL_DUMMY_STACK_ADJUST_P)
-#define CALL_DUMMY_STACK_ADJUST_P (0)
-#endif
-
 /* FIXME: cagney/2000-04-17: gdbarch should manage this.  The default
    shouldn't be necessary. */
 
Index: m68hc11-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68hc11-tdep.c,v
retrieving revision 1.52
diff -u -r1.52 m68hc11-tdep.c
--- m68hc11-tdep.c	14 Mar 2003 16:05:35 -0000	1.52
+++ m68hc11-tdep.c	24 Mar 2003 18:49:56 -0000
@@ -1389,7 +1389,6 @@
   set_gdbarch_sizeof_call_dummy_words (gdbarch,
                                        sizeof (m68hc11_call_dummy_words));
   set_gdbarch_call_dummy_p (gdbarch, 1);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
   set_gdbarch_deprecated_extract_return_value (gdbarch, m68hc11_extract_return_value);
Index: m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.47
diff -u -r1.47 m68k-tdep.c
--- m68k-tdep.c	13 Mar 2003 21:45:40 -0000	1.47
+++ m68k-tdep.c	24 Mar 2003 18:49:56 -0000
@@ -1042,13 +1042,11 @@
   set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 24);
   set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
   set_gdbarch_call_dummy_p (gdbarch, 1);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_call_dummy_length (gdbarch, 28);
   set_gdbarch_call_dummy_start_offset (gdbarch, 12);
 
   set_gdbarch_call_dummy_words (gdbarch, call_dummy_words);
   set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (call_dummy_words));
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_fix_call_dummy (gdbarch, m68k_fix_call_dummy);
   set_gdbarch_deprecated_push_dummy_frame (gdbarch, m68k_push_dummy_frame);
   set_gdbarch_deprecated_pop_frame (gdbarch, m68k_pop_frame);
Index: mcore-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mcore-tdep.c,v
retrieving revision 1.44
diff -u -r1.44 mcore-tdep.c
--- mcore-tdep.c	13 Mar 2003 21:45:40 -0000	1.44
+++ mcore-tdep.c	24 Mar 2003 18:49:57 -0000
@@ -1125,7 +1125,6 @@
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
   set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
   set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_saved_pc_after_call (gdbarch, mcore_saved_pc_after_call);
   set_gdbarch_function_start_offset (gdbarch, 0);
   set_gdbarch_decr_pc_after_break (gdbarch, 0);
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.174
diff -u -r1.174 mips-tdep.c
--- mips-tdep.c	19 Mar 2003 06:49:17 -0000	1.174
+++ mips-tdep.c	24 Mar 2003 18:49:58 -0000
@@ -6027,7 +6027,6 @@
   /* MIPS version of CALL_DUMMY */
 
   set_gdbarch_call_dummy_p (gdbarch, 1);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_call_dummy_address (gdbarch, mips_call_dummy_address);
   set_gdbarch_push_return_address (gdbarch, mips_push_return_address);
   set_gdbarch_deprecated_pop_frame (gdbarch, mips_pop_frame);
Index: mn10300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mn10300-tdep.c,v
retrieving revision 1.59
diff -u -r1.59 mn10300-tdep.c
--- mn10300-tdep.c	13 Mar 2003 21:45:40 -0000	1.59
+++ mn10300-tdep.c	24 Mar 2003 18:49:58 -0000
@@ -1188,7 +1188,6 @@
   set_gdbarch_call_dummy_p (gdbarch, 1);
   set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
   set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
   set_gdbarch_call_dummy_words (gdbarch, mn10300_call_dummy_words);
   set_gdbarch_sizeof_call_dummy_words (gdbarch, 
Index: ns32k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ns32k-tdep.c,v
retrieving revision 1.36
diff -u -r1.36 ns32k-tdep.c
--- ns32k-tdep.c	13 Mar 2003 21:45:41 -0000	1.36
+++ ns32k-tdep.c	24 Mar 2003 18:49:58 -0000
@@ -603,7 +603,6 @@
   set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 0);
   set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
   set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
 
   /* Breakpoint info */
   set_gdbarch_decr_pc_after_break (gdbarch, 0);
Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.112
diff -u -r1.112 rs6000-tdep.c
--- rs6000-tdep.c	17 Mar 2003 18:27:07 -0000	1.112
+++ rs6000-tdep.c	24 Mar 2003 18:49:59 -0000
@@ -2904,7 +2904,6 @@
   set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
   set_gdbarch_call_dummy_start_offset (gdbarch, 0);
   set_gdbarch_call_dummy_p (gdbarch, 1);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_fix_call_dummy (gdbarch, rs6000_fix_call_dummy);
   set_gdbarch_frame_align (gdbarch, rs6000_frame_align);
   set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
Index: s390-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-tdep.c,v
retrieving revision 1.77
diff -u -r1.77 s390-tdep.c
--- s390-tdep.c	13 Mar 2003 21:45:41 -0000	1.77
+++ s390-tdep.c	24 Mar 2003 18:49:59 -0000
@@ -1870,7 +1870,6 @@
   set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
   set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
   set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
   set_gdbarch_push_return_address (gdbarch, s390_push_return_address);
   set_gdbarch_sizeof_call_dummy_words (gdbarch,
Index: sh-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh-tdep.c,v
retrieving revision 1.103
diff -u -r1.103 sh-tdep.c
--- sh-tdep.c	14 Mar 2003 16:05:36 -0000	1.103
+++ sh-tdep.c	24 Mar 2003 18:50:00 -0000
@@ -4661,7 +4661,6 @@
   set_gdbarch_call_dummy_words (gdbarch, sh_call_dummy_words);
   set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (sh_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_push_return_address (gdbarch, sh_push_return_address);
Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.73
diff -u -r1.73 sparc-tdep.c
--- sparc-tdep.c	14 Mar 2003 17:07:00 -0000	1.73
+++ sparc-tdep.c	24 Mar 2003 18:50:01 -0000
@@ -2249,8 +2249,8 @@
     }
 
   /* Make room for the arguments on the stack.  */
-  accumulate_size += CALL_DUMMY_STACK_ADJUST;
-  sp = ((sp - accumulate_size) & ~7) + CALL_DUMMY_STACK_ADJUST;
+  accumulate_size += DEPRECATED_CALL_DUMMY_STACK_ADJUST;
+  sp = ((sp - accumulate_size) & ~7) + DEPRECATED_CALL_DUMMY_STACK_ADJUST;
 
   /* `Push' arguments on the stack.  */
   for (i = 0, oregnum = 0, m_arg = sparc_args; 
@@ -3139,7 +3139,6 @@
   set_gdbarch_breakpoint_from_pc (gdbarch, memory_breakpoint_from_pc);
   set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
   set_gdbarch_call_dummy_p (gdbarch, 1);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 1);
   set_gdbarch_decr_pc_after_break (gdbarch, 0);
   set_gdbarch_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sparc_extract_struct_value_address);
@@ -3252,7 +3251,7 @@
       set_gdbarch_call_dummy_length (gdbarch, 0);
       set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil);
 #endif
-      set_gdbarch_call_dummy_stack_adjust (gdbarch, 68);
+      set_gdbarch_deprecated_call_dummy_stack_adjust (gdbarch, 68);
       set_gdbarch_call_dummy_start_offset (gdbarch, 0);
       set_gdbarch_frame_args_skip (gdbarch, 68);
       set_gdbarch_function_start_offset (gdbarch, 0);
@@ -3308,7 +3307,7 @@
       set_gdbarch_call_dummy_start_offset (gdbarch, 0);
       set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil);
 #endif
-      set_gdbarch_call_dummy_stack_adjust (gdbarch, 128);
+      set_gdbarch_deprecated_call_dummy_stack_adjust (gdbarch, 128);
       set_gdbarch_frame_args_skip (gdbarch, 136);
       set_gdbarch_function_start_offset (gdbarch, 0);
       set_gdbarch_long_bit (gdbarch, 8 * TARGET_CHAR_BIT);
Index: v850-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/v850-tdep.c,v
retrieving revision 1.43
diff -u -r1.43 v850-tdep.c
--- v850-tdep.c	13 Mar 2003 21:45:41 -0000	1.43
+++ v850-tdep.c	24 Mar 2003 18:50:01 -0000
@@ -1284,8 +1284,6 @@
   set_gdbarch_call_dummy_p (gdbarch, 1);
   set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil);
   set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
-  /* set_gdbarch_call_dummy_stack_adjust */
   set_gdbarch_fix_call_dummy (gdbarch, v850_fix_call_dummy);
   set_gdbarch_breakpoint_from_pc (gdbarch, v850_breakpoint_from_pc);
 
Index: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.94
diff -u -r1.94 valops.c
--- valops.c	13 Mar 2003 21:45:41 -0000	1.94
+++ valops.c	24 Mar 2003 18:50:01 -0000
@@ -1611,8 +1611,8 @@
 
 	  for (i = nargs - 1; i >= 0; i--)
 	    len += TYPE_LENGTH (VALUE_ENCLOSING_TYPE (args[i]));
-	  if (CALL_DUMMY_STACK_ADJUST_P)
-	    len += CALL_DUMMY_STACK_ADJUST;
+	  if (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ())
+	    len += DEPRECATED_CALL_DUMMY_STACK_ADJUST;
 	  sp -= STACK_ALIGN (len) - len;
 	}
     }
@@ -1636,8 +1636,8 @@
     {
       /* If stack grows up, we must leave a hole at the bottom, note
          that sp already has been advanced for the arguments!  */
-      if (CALL_DUMMY_STACK_ADJUST_P)
-	sp += CALL_DUMMY_STACK_ADJUST;
+      if (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ())
+	sp += DEPRECATED_CALL_DUMMY_STACK_ADJUST;
       sp = STACK_ALIGN (sp);
     }
 
@@ -1646,11 +1646,11 @@
   /* MVS 11/22/96: I think at least some of this stack_align code is
      really broken.  Better to let PUSH_ARGUMENTS adjust the stack in
      a target-defined manner.  */
-  if (CALL_DUMMY_STACK_ADJUST_P)
+  if (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ())
     if (INNER_THAN (1, 2))
       {
 	/* stack grows downward */
-	sp -= CALL_DUMMY_STACK_ADJUST;
+	sp -= DEPRECATED_CALL_DUMMY_STACK_ADJUST;
       }
 
   /* Store the address at which the structure is supposed to be
Index: vax-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/vax-tdep.c,v
retrieving revision 1.37
diff -u -r1.37 vax-tdep.c
--- vax-tdep.c	13 Mar 2003 21:45:42 -0000	1.37
+++ vax-tdep.c	24 Mar 2003 18:50:02 -0000
@@ -678,7 +678,6 @@
   set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 7);
   set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
   set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
 
   /* Breakpoint info */
   set_gdbarch_breakpoint_from_pc (gdbarch, vax_breakpoint_from_pc);
Index: xstormy16-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/xstormy16-tdep.c,v
retrieving revision 1.31
diff -u -r1.31 xstormy16-tdep.c
--- xstormy16-tdep.c	14 Mar 2003 17:07:00 -0000	1.31
+++ xstormy16-tdep.c	24 Mar 2003 18:50:02 -0000
@@ -1101,8 +1101,6 @@
   set_gdbarch_call_dummy_p (gdbarch, 1);
   set_gdbarch_call_dummy_words (gdbarch, call_dummy_words);
   set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
-  set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
-  /* set_gdbarch_call_dummy_stack_adjust */
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
   set_gdbarch_breakpoint_from_pc (gdbarch, xstormy16_breakpoint_from_pc);
 
Index: config/sparc/tm-sp64.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sp64.h,v
retrieving revision 1.13
diff -u -r1.13 tm-sp64.h
--- config/sparc/tm-sp64.h	3 Mar 2003 20:50:20 -0000	1.13
+++ config/sparc/tm-sp64.h	24 Mar 2003 18:50:02 -0000
@@ -102,8 +102,8 @@
 #define CALL_DUMMY_LOCATION AT_ENTRY_POINT
 #undef  DEPRECATED_PC_IN_CALL_DUMMY
 #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_at_entry_point (pc, sp, frame_address)
-#undef  CALL_DUMMY_STACK_ADJUST
-#define CALL_DUMMY_STACK_ADJUST 128
+#undef  DEPRECATED_CALL_DUMMY_STACK_ADJUST
+#define DEPRECATED_CALL_DUMMY_STACK_ADJUST 128
 #undef  SIZEOF_CALL_DUMMY_WORDS
 #define SIZEOF_CALL_DUMMY_WORDS 0
 #undef  CALL_DUMMY_ADDRESS
@@ -143,8 +143,8 @@
 
 /* 128 is to reserve space to write the %i/%l registers that will be restored
    when we resume. */
-#undef  CALL_DUMMY_STACK_ADJUST
-#define CALL_DUMMY_STACK_ADJUST 128
+#undef  DEPRECATED_CALL_DUMMY_STACK_ADJUST
+#define DEPRECATED_CALL_DUMMY_STACK_ADJUST 128
 
 /* Size of the call dummy in bytes. */
 #undef  CALL_DUMMY_LENGTH
Index: config/sparc/tm-sparc.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-sparc.h,v
retrieving revision 1.39
diff -u -r1.39 tm-sparc.h
--- config/sparc/tm-sparc.h	14 Mar 2003 17:07:00 -0000	1.39
+++ config/sparc/tm-sparc.h	24 Mar 2003 18:50:02 -0000
@@ -649,7 +649,7 @@
 
 #define CALL_DUMMY_BREAKPOINT_OFFSET (CALL_DUMMY_START_OFFSET + 0x30)
 
-#define CALL_DUMMY_STACK_ADJUST 68
+#define DEPRECATED_CALL_DUMMY_STACK_ADJUST 68
 
 /* Call dummy method (eg. on stack, at entry point, etc.) */
 
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.132
diff -u -r1.132 gdbint.texinfo
--- doc/gdbint.texinfo	18 Mar 2003 17:44:23 -0000	1.132
+++ doc/gdbint.texinfo	24 Mar 2003 18:50:05 -0000
@@ -3112,17 +3112,11 @@
 @findex CALL_DUMMY_LOCATION
 See the file @file{inferior.h}.
 
- at item CALL_DUMMY_STACK_ADJUST
- at findex CALL_DUMMY_STACK_ADJUST
-Stack adjustment needed when performing an inferior function call.
-
-Should be deprecated in favor of something like @code{STACK_ALIGN}.
-
- at item CALL_DUMMY_STACK_ADJUST_P
- at findex CALL_DUMMY_STACK_ADJUST_P
-Predicate for use of @code{CALL_DUMMY_STACK_ADJUST}.
-
-Should be deprecated in favor of something like @code{STACK_ALIGN}.
+ at item DEPRECATED_CALL_DUMMY_STACK_ADJUST
+ at findex DEPRECATED_CALL_DUMMY_STACK_ADJUST
+Stack adjustment needed when performing an inferior function call.  This
+function is no longer needed.  @xref{PUSH_ARGUMENTS}, which can handle
+all alignment directly.
 
 @item CANNOT_FETCH_REGISTER (@var{regno})
 @findex CANNOT_FETCH_REGISTER
@@ -3711,6 +3705,7 @@
 
 @item PUSH_ARGUMENTS (@var{nargs}, @var{args}, @var{sp}, @var{struct_return}, @var{struct_addr})
 @findex PUSH_ARGUMENTS
+ at anchor{PUSH_ARGUMENTS}
 Define this to push arguments onto the stack for inferior function
 call.  Returns the updated stack pointer value.
 

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