This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[Janitor] Remove ALLOCATE_TRAMPOLINE


ALLOCATE_TRAMPOLINE is not used anymore:

$ grep -r ALLOCATE_TRAMPOLINE .
./config/d30v/d30v.h:   which the trampoline is for.  Normally (when `ALLOCATE_TRAMPOLINE' is not
./config/d30v/d30v.h:/* #define ALLOCATE_TRAMPOLINE(FP) */
./doc/tm.texi:@findex ALLOCATE_TRAMPOLINE
./doc/tm.texi:@item ALLOCATE_TRAMPOLINE (@var{fp})
./doc/tm.texi:@code{ALLOCATE_TRAMPOLINE} is not defined), the stack slot for the
./function.c:#ifdef ALLOCATE_TRAMPOLINE
./function.c:  tramp = ALLOCATE_TRAMPOLINE (fp);

Ok to commit the appended patch if bootstrap on i686-linux-gnu passes?

Andreas

2003-05-30  Andreas Jaeger  <aj@suse.de>

	* function.c (trampoline_address): Remove ALLOCATE_TRAMPOLINE
	usage.

	* doc/tm.texi (Trampolines): Remove ALLOCATE_TRAMPOLINE.

	* config/d30v/d30v.h: Remove traces of ALLOCATE_TRAMPOLINE.

============================================================
Index: gcc/function.c
--- gcc/function.c	27 May 2003 18:44:57 -0000	1.429
+++ gcc/function.c	30 May 2003 18:14:16 -0000
@@ -5842,18 +5842,13 @@ trampoline_address (function)
       && fn_context != inline_function_decl)
     fp = find_function_data (fn_context);
 
-  /* Allocate run-time space for this trampoline
-     (usually in the defining function's stack frame).  */
-#ifdef ALLOCATE_TRAMPOLINE
-  tramp = ALLOCATE_TRAMPOLINE (fp);
-#else
+  /* Allocate run-time space for this trampoline.  */
   /* If rounding needed, allocate extra space
      to ensure we have TRAMPOLINE_SIZE bytes left after rounding up.  */
 #define TRAMPOLINE_REAL_SIZE \
   (TRAMPOLINE_SIZE + (TRAMPOLINE_ALIGNMENT / BITS_PER_UNIT) - 1)
   tramp = assign_stack_local_1 (BLKmode, TRAMPOLINE_REAL_SIZE, 0,
 				fp ? fp : cfun);
-#endif
 
   /* Record the trampoline for reuse and note it for later initialization
      by expand_function_end.  */
============================================================
Index: gcc/doc/tm.texi
--- doc/tm.texi	29 May 2003 21:13:33 -0000	1.223
+++ doc/tm.texi	30 May 2003 18:14:22 -0000
@@ -4599,12 +4599,6 @@ the template was stored, the different a
 @var{addr}.  If this macro is not defined, @var{addr} will be used for
 function calls.
 
-@findex ALLOCATE_TRAMPOLINE
-@item ALLOCATE_TRAMPOLINE (@var{fp})
-A C expression to allocate run-time space for a trampoline.  The
-expression value should be an RTX representing a memory reference to the
-space for the trampoline.
-
 @cindex @code{TARGET_ASM_FUNCTION_EPILOGUE} and trampolines
 @cindex @code{TARGET_ASM_FUNCTION_PROLOGUE} and trampolines
 If this macro is not defined, by default the trampoline is allocated as
============================================================
Index: gcc/config/d30v/d30v.h
--- config/d30v/d30v.h	29 May 2003 21:13:34 -0000	1.82
+++ config/d30v/d30v.h	30 May 2003 18:14:25 -0000
@@ -1,5 +1,5 @@
 /* Definitions of target machine for Mitsubishi D30V.
-   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Contributed by Cygnus Solutions.
 
@@ -2023,25 +2023,6 @@ typedef struct machine_function GTY(())
    should be passed to the function when it is called.  */
 #define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) \
   d30v_initialize_trampoline (ADDR, FNADDR, STATIC_CHAIN)
-
-/* A C expression to allocate run-time space for a trampoline.  The expression
-   value should be an RTX representing a memory reference to the space for the
-   trampoline.
-
-   If this macro is not defined, by default the trampoline is allocated as a
-   stack slot.  This default is right for most machines.  The exceptions are
-   machines where it is impossible to execute instructions in the stack area.
-   On such machines, you may have to implement a separate stack, using this
-   macro in conjunction with output_function_prologue () and
-   output_function_epilogue ().
-
-   FP points to a data structure, a `struct function', which describes the
-   compilation status of the immediate containing function of the function
-   which the trampoline is for.  Normally (when `ALLOCATE_TRAMPOLINE' is not
-   defined), the stack slot for the trampoline is in the stack frame of this
-   containing function.  Other allocation strategies probably must do something
-   analogous with this information.  */
-/* #define ALLOCATE_TRAMPOLINE(FP) */
 
 /* Implementing trampolines is difficult on many machines because they have
    separate instruction and data caches.  Writing into a stack location fails

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


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