calls.c: Don't reference FINAL_REG_PARM_STACK_SPACE or MAYBE_REG_PARM_STACK_SPACE.
authorKazu Hirata <kazu@cs.umass.edu>
Thu, 26 Feb 2004 23:32:09 +0000 (23:32 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Thu, 26 Feb 2004 23:32:09 +0000 (23:32 +0000)
* calls.c: Don't reference FINAL_REG_PARM_STACK_SPACE or
MAYBE_REG_PARM_STACK_SPACE.
* function.c: Likewise.
* system.h (FINAL_REG_PARM_STACK_SPACE): Poison.
(MAYBE_REG_PARM_STACK_SPACE): Likewise.
* doc/tm.texi (FINAL_REG_PARM_STACK_SPACE): Remove.
(MAYBE_REG_PARM_STACK_SPACE): Likewise.

From-SVN: r78530

gcc/ChangeLog
gcc/calls.c
gcc/doc/tm.texi
gcc/function.c
gcc/system.h

index 6184136..5186c27 100644 (file)
@@ -1,5 +1,15 @@
 2004-02-26  Kazu Hirata  <kazu@cs.umass.edu>
 
+       * calls.c: Don't reference FINAL_REG_PARM_STACK_SPACE or
+       MAYBE_REG_PARM_STACK_SPACE.
+       * function.c: Likewise.
+       * system.h (FINAL_REG_PARM_STACK_SPACE): Poison.
+       (MAYBE_REG_PARM_STACK_SPACE): Likewise.
+       * doc/tm.texi (FINAL_REG_PARM_STACK_SPACE): Remove.
+       (MAYBE_REG_PARM_STACK_SPACE): Likewise.
+
+2004-02-26  Kazu Hirata  <kazu@cs.umass.edu>
+
        * c-decl.c (c_expand_deferred_function): Remove.
        * c-tree.h: Remove the corresponding prototype.
 
index 4bbec9d..4bfcde4 100644 (file)
@@ -1349,11 +1349,6 @@ compute_argument_block_size (int reg_parm_stack_space,
       args_size->constant = MAX (args_size->constant,
                                 reg_parm_stack_space);
 
-#ifdef MAYBE_REG_PARM_STACK_SPACE
-      if (reg_parm_stack_space == 0)
-       args_size->constant = 0;
-#endif
-
 #ifndef OUTGOING_REG_PARM_STACK_SPACE
       args_size->constant -= reg_parm_stack_space;
 #endif
@@ -1735,12 +1730,8 @@ try_to_integrate (tree fndecl, tree actparms, rtx target, int ignore,
   int reg_parm_stack_space = 0;
 
 #ifdef REG_PARM_STACK_SPACE
-#ifdef MAYBE_REG_PARM_STACK_SPACE
-  reg_parm_stack_space = MAYBE_REG_PARM_STACK_SPACE;
-#else
   reg_parm_stack_space = REG_PARM_STACK_SPACE (fndecl);
 #endif
-#endif
 
   before_call = get_last_insn ();
 
@@ -2265,12 +2256,8 @@ expand_call (tree exp, rtx target, int ignore)
     }
 
 #ifdef REG_PARM_STACK_SPACE
-#ifdef MAYBE_REG_PARM_STACK_SPACE
-  reg_parm_stack_space = MAYBE_REG_PARM_STACK_SPACE;
-#else
   reg_parm_stack_space = REG_PARM_STACK_SPACE (fndecl);
 #endif
-#endif
 
 #ifndef OUTGOING_REG_PARM_STACK_SPACE
   if (reg_parm_stack_space > 0 && PUSH_ARGS)
@@ -2729,10 +2716,6 @@ expand_call (tree exp, rtx target, int ignore)
       if (pass && (flags & ECF_LIBCALL_BLOCK))
        NO_DEFER_POP;
 
-#ifdef FINAL_REG_PARM_STACK_SPACE
-      reg_parm_stack_space = FINAL_REG_PARM_STACK_SPACE (args_size.constant,
-                                                        args_size.var);
-#endif
       /* Precompute any arguments as needed.  */
       if (pass)
        precompute_arguments (flags, num_actuals, args);
@@ -3695,12 +3678,8 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
   rtx struct_value = targetm.calls.struct_value_rtx (0, 0);
 
 #ifdef REG_PARM_STACK_SPACE
-#ifdef MAYBE_REG_PARM_STACK_SPACE
-  reg_parm_stack_space = MAYBE_REG_PARM_STACK_SPACE;
-#else
   reg_parm_stack_space = REG_PARM_STACK_SPACE ((tree) 0);
 #endif
-#endif
 
   /* By default, library functions can not throw.  */
   flags = ECF_NOTHROW;
@@ -3951,10 +3930,6 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
       FUNCTION_ARG_ADVANCE (args_so_far, mode, (tree) 0, 1);
     }
 
-#ifdef FINAL_REG_PARM_STACK_SPACE
-  reg_parm_stack_space = FINAL_REG_PARM_STACK_SPACE (args_size.constant,
-                                                    args_size.var);
-#endif
   /* If this machine requires an external definition for library
      functions, write one out.  */
   assemble_external_libcall (fun);
index 1ffa5ee..9bdff46 100644 (file)
@@ -3455,33 +3455,6 @@ which.
 @c above is overfull.  not sure what to do.  --mew 5feb93  did
 @c something, not sure if it looks good.  --mew 10feb93
 
-@defmac MAYBE_REG_PARM_STACK_SPACE
-@defmacx FINAL_REG_PARM_STACK_SPACE (@var{const_size}, @var{var_size})
-Define these macros in addition to the one above if functions might
-allocate stack space for arguments even when their values are passed
-in registers.  These should be used when the stack space allocated
-for arguments in registers is not a simple constant independent of the
-function declaration.
-
-The value of the first macro is the size, in bytes, of the area that
-we should initially assume would be reserved for arguments passed in registers.
-
-The value of the second macro is the actual size, in bytes, of the area
-that will be reserved for arguments passed in registers.  This takes two
-arguments: an integer representing the number of bytes of fixed sized
-arguments on the stack, and a tree representing the number of bytes of
-variable sized arguments on the stack.
-
-When these macros are defined, @code{REG_PARM_STACK_SPACE} will only be
-called for libcall functions, the current function, or for a function
-being called when it is known that such stack space must be allocated.
-In each case this value can be easily computed.
-
-When deciding whether a called function needs such stack space, and how
-much space to reserve, GCC uses these two macros instead of
-@code{REG_PARM_STACK_SPACE}.
-@end defmac
-
 @defmac OUTGOING_REG_PARM_STACK_SPACE
 Define this if it is the responsibility of the caller to allocate the area
 reserved for arguments passed in registers.
index 3991ff8..b811f3d 100644 (file)
@@ -4347,12 +4347,8 @@ assign_parms (tree fndecl)
     fnargs = split_complex_args (fnargs);
 
 #ifdef REG_PARM_STACK_SPACE
-#ifdef MAYBE_REG_PARM_STACK_SPACE
-  reg_parm_stack_space = MAYBE_REG_PARM_STACK_SPACE;
-#else
   reg_parm_stack_space = REG_PARM_STACK_SPACE (fndecl);
 #endif
-#endif
 
 #ifdef INIT_CUMULATIVE_INCOMING_ARGS
   INIT_CUMULATIVE_INCOMING_ARGS (args_so_far, fntype, NULL_RTX);
@@ -4554,12 +4550,9 @@ assign_parms (tree fndecl)
          partial = FUNCTION_ARG_PARTIAL_NREGS (args_so_far, promoted_mode,
                                                passed_type, named_arg);
          if (partial
-#ifndef MAYBE_REG_PARM_STACK_SPACE
              /* The caller might already have allocated stack space
                 for the register parameters.  */
-             && reg_parm_stack_space == 0
-#endif
-             )
+             && reg_parm_stack_space == 0)
            {
              /* Part of this argument is passed in registers and part
                 is passed on the stack.  Ask the prologue code to extend
@@ -4660,16 +4653,10 @@ assign_parms (tree fndecl)
       if (entry_parm == stack_parm
          || (GET_CODE (entry_parm) == PARALLEL
              && XEXP (XVECEXP (entry_parm, 0, 0), 0) == NULL_RTX)
-#if defined (REG_PARM_STACK_SPACE) && ! defined (MAYBE_REG_PARM_STACK_SPACE)
+#if defined (REG_PARM_STACK_SPACE)
          /* On some machines, even if a parm value arrives in a register
-            there is still an (uninitialized) stack slot allocated for it.
-
-            ??? When MAYBE_REG_PARM_STACK_SPACE is defined, we can't tell
-            whether this parameter already has a stack slot allocated,
-            because an arg block exists only if current_function_args_size
-            is larger than some threshold, and we haven't calculated that
-            yet.  So, for now, we just assume that stack slots never exist
-            in this case.  */
+            there is still an (uninitialized) stack slot allocated
+            for it.  */
          || REG_PARM_STACK_SPACE (fndecl) > 0
 #endif
          )
@@ -5292,11 +5279,9 @@ assign_parms (tree fndecl)
      minimum length.  */
 
 #ifdef REG_PARM_STACK_SPACE
-#ifndef MAYBE_REG_PARM_STACK_SPACE
   current_function_args_size = MAX (current_function_args_size,
                                    REG_PARM_STACK_SPACE (fndecl));
 #endif
-#endif
 
   current_function_args_size
     = ((current_function_args_size + STACK_BYTES - 1)
@@ -5490,11 +5475,7 @@ locate_and_pad_parm (enum machine_mode passed_mode, tree type, int in_regs,
   int part_size_in_regs;
 
 #ifdef REG_PARM_STACK_SPACE
-#ifdef MAYBE_REG_PARM_STACK_SPACE
-  reg_parm_stack_space = MAYBE_REG_PARM_STACK_SPACE;
-#else
   reg_parm_stack_space = REG_PARM_STACK_SPACE (fndecl);
-#endif
 
   /* If we have found a stack parm before we reach the end of the
      area reserved for registers, skip that area.  */
index 2631de1..5e8a2cd 100644 (file)
@@ -637,7 +637,8 @@ typedef char _Bool;
        PROMOTED_MODE EXPAND_BUILTIN_VA_END                                \
        LINKER_DOES_NOT_WORK_WITH_DWARF2 FUNCTION_ARG_KEEP_AS_REFERENCE    \
        GIV_SORT_CRITERION MAX_LONG_TYPE_SIZE MAX_LONG_DOUBLE_TYPE_SIZE    \
-       MAX_WCHAR_TYPE_SIZE GCOV_TYPE_SIZE SHARED_SECTION_ASM_OP
+       MAX_WCHAR_TYPE_SIZE GCOV_TYPE_SIZE SHARED_SECTION_ASM_OP           \
+       FINAL_REG_PARM_STACK_SPACE MAYBE_REG_PARM_STACK_SPACE
 
 /* Hooks that are no longer used.  */
  #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE  \