expr.h (FUNCTION_ARG_PARTIAL_NREGS): Default to 0.
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 8 Jul 2004 16:57:48 +0000 (16:57 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 8 Jul 2004 16:57:48 +0000 (16:57 +0000)
* expr.h (FUNCTION_ARG_PARTIAL_NREGS): Default to 0.
(FUNCTION_ARG_PASS_BY_REFERENCE): Likewise.
(FUNCTION_ARG_CALLEE_COPIES): Likewise.
* calls.c: Remove ifdefs of macros above.
* functions.c: Likewise.
* expr.c: Likewise.

From-SVN: r84300

gcc/ChangeLog
gcc/calls.c
gcc/expr.c
gcc/expr.h
gcc/function.c

index da392fd3325d32c1ed9986fb899b5139c4d0fef4..e2cdc6693e1d944795e5471fe124286debf79f1a 100644 (file)
@@ -1,3 +1,12 @@
+2004-07-08  Alexandre Oliva  <aoliva@redhat.com>
+
+       * expr.h (FUNCTION_ARG_PARTIAL_NREGS): Default to 0.
+       (FUNCTION_ARG_PASS_BY_REFERENCE): Likewise.
+       (FUNCTION_ARG_CALLEE_COPIES): Likewise.
+       * calls.c: Remove ifdefs of macros above.
+       * functions.c: Likewise.
+       * expr.c: Likewise.
+
 2004-07-08  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * config/sparc/sparc.md (UNSPECV_GOTO_V9): Delete.
index b1c226de0e2359c9323a32bbf6262ae187a76294..d46b653eb527725bbca8c76e58711ce0ad409511 100644 (file)
@@ -975,16 +975,13 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
       /* See if this argument should be passed by invisible reference.  */
       if (CONTAINS_PLACEHOLDER_P (TYPE_SIZE (type))
          || TREE_ADDRESSABLE (type)
-#ifdef FUNCTION_ARG_PASS_BY_REFERENCE
          || FUNCTION_ARG_PASS_BY_REFERENCE (*args_so_far, TYPE_MODE (type),
                                             type, argpos < n_named_args)
-#endif
          )
        {
          /* If we're compiling a thunk, pass through invisible
              references instead of making a copy.  */
          if (call_from_thunk_p
-#ifdef FUNCTION_ARG_CALLEE_COPIES
              || (FUNCTION_ARG_CALLEE_COPIES (*args_so_far, TYPE_MODE (type),
                                             type, argpos < n_named_args)
                  /* If it's in a register, we must make a copy of it too.  */
@@ -992,7 +989,6 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
                  && !(TREE_CODE (args[i].tree_value) == VAR_DECL
                       && REG_P (DECL_RTL (args[i].tree_value)))
                  && ! TREE_ADDRESSABLE (type))
-#endif
              )
            {
              /* C++ uses a TARGET_EXPR to indicate that we want to make a
@@ -1095,12 +1091,10 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
       args[i].tail_call_reg = args[i].reg;
 #endif
 
-#ifdef FUNCTION_ARG_PARTIAL_NREGS
       if (args[i].reg)
        args[i].partial
          = FUNCTION_ARG_PARTIAL_NREGS (*args_so_far, mode, type,
                                        argpos < n_named_args);
-#endif
 
       args[i].pass_on_stack = MUST_PASS_IN_STACK (mode, type);
 
@@ -3525,10 +3519,8 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
       argvec[count].partial = 0;
 
       argvec[count].reg = FUNCTION_ARG (args_so_far, Pmode, NULL_TREE, 1);
-#ifdef FUNCTION_ARG_PARTIAL_NREGS
       if (FUNCTION_ARG_PARTIAL_NREGS (args_so_far, Pmode, NULL_TREE, 1))
        abort ();
-#endif
 
       locate_and_pad_parm (Pmode, NULL_TREE,
 #ifdef STACK_PARMS_IN_REG_PARM_AREA
@@ -3566,16 +3558,11 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
          && ! (CONSTANT_P (val) && LEGITIMATE_CONSTANT_P (val)))
        val = force_operand (val, NULL_RTX);
 
-#ifdef FUNCTION_ARG_PASS_BY_REFERENCE
       if (FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, mode, NULL_TREE, 1))
        {
          rtx slot;
-         int must_copy = 1
-#ifdef FUNCTION_ARG_CALLEE_COPIES
-           && ! FUNCTION_ARG_CALLEE_COPIES (args_so_far, mode,
-                                            NULL_TREE, 1)
-#endif
-           ;
+         int must_copy = ! FUNCTION_ARG_CALLEE_COPIES (args_so_far, mode,
+                                                       NULL_TREE, 1);
 
          /* loop.c won't look at CALL_INSN_FUNCTION_USAGE of const/pure
             functions, so we have to pretend this isn't such a function.  */
@@ -3627,19 +3614,14 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
          mode = Pmode;
          val = force_operand (XEXP (slot, 0), NULL_RTX);
        }
-#endif
 
       argvec[count].value = val;
       argvec[count].mode = mode;
 
       argvec[count].reg = FUNCTION_ARG (args_so_far, mode, NULL_TREE, 1);
 
-#ifdef FUNCTION_ARG_PARTIAL_NREGS
       argvec[count].partial
        = FUNCTION_ARG_PARTIAL_NREGS (args_so_far, mode, NULL_TREE, 1);
-#else
-      argvec[count].partial = 0;
-#endif
 
       locate_and_pad_parm (mode, NULL_TREE,
 #ifdef STACK_PARMS_IN_REG_PARM_AREA
index 3be412dd56f09ac00f81fd1603b48e6ba7c429b6..abe6d7cc936fc2cbee33f8e1ddb5e00603f3db9a 100644 (file)
@@ -1424,11 +1424,9 @@ block_move_libcall_safe_for_call_parm (void)
        rtx tmp = FUNCTION_ARG (args_so_far, mode, NULL_TREE, 1);
        if (!tmp || !REG_P (tmp))
          return false;
-#ifdef FUNCTION_ARG_PARTIAL_NREGS
        if (FUNCTION_ARG_PARTIAL_NREGS (args_so_far, mode,
                                        NULL_TREE, 1))
          return false;
-#endif
        FUNCTION_ARG_ADVANCE (args_so_far, mode, NULL_TREE, 1);
       }
   }
index 9bfef9381c97fab4ce5e548f8f08453db1c56f5b..b335db0f373ab52560f2d759703d401f46a5674b 100644 (file)
@@ -203,6 +203,18 @@ do {                                                       \
 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE)      PARM_BOUNDARY
 #endif
 
+#ifndef FUNCTION_ARG_PARTIAL_NREGS
+#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0
+#endif
+
+#ifndef FUNCTION_ARG_PASS_BY_REFERENCE
+#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) 0
+#endif
+
+#ifndef FUNCTION_ARG_CALLEE_COPIES
+#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) 0
+#endif
+
 tree split_complex_types (tree);
 tree split_complex_values (tree);
 
index 57d52eee2659a3fe149017c17324c0731e61e262..79d7f6933c0ddbc2f4ad0d0dddb9212b3b71c72a 100644 (file)
@@ -2241,10 +2241,8 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm,
      the machine requires these objects be passed that way.  */
   if (CONTAINS_PLACEHOLDER_P (TYPE_SIZE (passed_type))
       || TREE_ADDRESSABLE (passed_type)
-#ifdef FUNCTION_ARG_PASS_BY_REFERENCE
       || FUNCTION_ARG_PASS_BY_REFERENCE (all->args_so_far, passed_mode,
                                         passed_type, data->named_arg)
-#endif
       )
     {
       passed_type = nominal_type = build_pointer_type (passed_type);
@@ -2361,7 +2359,6 @@ assign_parm_find_entry_rtl (struct assign_parm_data_all *all,
   if (MUST_PASS_IN_STACK (data->promoted_mode, data->passed_type))
     entry_parm = 0;
 
-#ifdef FUNCTION_ARG_PARTIAL_NREGS
   if (entry_parm)
     {
       int partial;
@@ -2404,7 +2401,6 @@ assign_parm_find_entry_rtl (struct assign_parm_data_all *all,
          all->extra_pretend_bytes = all->pretend_args_size;
        }
     }
-#endif
 
   locate_and_pad_parm (data->promoted_mode, data->passed_type, in_regs,
                       entry_parm ? data->partial : 0, current_function_decl,
@@ -2849,7 +2845,6 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm,
       data->stack_parm = NULL;
     }
 
-#ifdef FUNCTION_ARG_CALLEE_COPIES
   /* If we are passed an arg by reference and it is our responsibility
      to make a copy, do it now.
      PASSED_TYPE and PASSED mode now refer to the pointer, not the
@@ -2894,7 +2889,6 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm,
          did_conversion = true;
        }
     }
-#endif /* FUNCTION_ARG_CALLEE_COPIES */
 
   /* Mark the register as eliminable if we did no conversion and it was
      copied from memory at a fixed offset, and the arg pointer was not