m68hc11.h (PAD_VARARGS_DOWN): Define and return according to va_arg type.
authorStephane Carrez <stcarrez@nerim.fr>
Wed, 5 Mar 2003 21:32:11 +0000 (22:32 +0100)
committerStephane Carrez <ciceron@gcc.gnu.org>
Wed, 5 Mar 2003 21:32:11 +0000 (22:32 +0100)
* config/m68hc11/m68hc11.h (PAD_VARARGS_DOWN): Define and return
according to va_arg type.
(EXPAND_BUILTIN_VA_ARG): Remove.
* config/m68hc11/m68hc11.c (m68hc11_va_arg): Remove.
* config/m68hc11/m68hc11-protos.h (m68hc11_va_arg): Remove.

From-SVN: r63859

gcc/ChangeLog
gcc/config/m68hc11/m68hc11-protos.h
gcc/config/m68hc11/m68hc11.c
gcc/config/m68hc11/m68hc11.h

index a63497e346cfcdaf8d2ba46be734ffac5af049ac..6e4ebbabe0d374a8ed112b90b3b2b901806273dc 100644 (file)
@@ -1,3 +1,11 @@
+2003-03-05  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * config/m68hc11/m68hc11.h (PAD_VARARGS_DOWN): Define and return
+       according to va_arg type.
+       (EXPAND_BUILTIN_VA_ARG): Remove.
+       * config/m68hc11/m68hc11.c (m68hc11_va_arg): Remove.
+       * config/m68hc11/m68hc11-protos.h (m68hc11_va_arg): Remove.
+
 2003-03-05  David Edelsohn  <edelsohn@gnu.org>
 
        * config/rs6000/rs6000.c (rs6000_variable_issue): Remove unnecessary
index 5bb69cf98517b0e00abb12301647faf166827edb..dda14692b3111a4bfe764a0a714d044cb2dc162c 100644 (file)
@@ -138,8 +138,6 @@ extern int m68hc11_function_arg_pass_by_reference PARAMS((const CUMULATIVE_ARGS*
                                                           int));
 extern int m68hc11_function_arg_padding PARAMS((enum machine_mode, tree));
 
-extern rtx m68hc11_va_arg PARAMS((tree,tree));
-
 extern void m68hc11_function_epilogue PARAMS((FILE*,int));
 
 #endif /* TREE_CODE */
index f4c1151ae6b6371fe7f1e188fe34b7e308105bdf..46d28a090855e1aee06c85514479bc634a52e0eb 100644 (file)
@@ -1471,51 +1471,6 @@ m68hc11_function_arg (cum, mode, type, named)
   return NULL_RTX;
 }
 
-rtx
-m68hc11_va_arg (valist, type)
-     tree valist;
-     tree type;
-{
-  tree addr_tree, t;
-  HOST_WIDE_INT align;
-  HOST_WIDE_INT rounded_size;
-  rtx addr;
-  int pad_direction;
-
-  /* Compute the rounded size of the type.  */
-  align = PARM_BOUNDARY / BITS_PER_UNIT;
-  rounded_size = (((int_size_in_bytes (type) + align - 1) / align) * align);
-
-  /* Get AP.  */
-  addr_tree = valist;
-  pad_direction = m68hc11_function_arg_padding (TYPE_MODE (type), type);
-
-  if (pad_direction == downward)
-    {
-      /* Small args are padded downward.  */
-
-      HOST_WIDE_INT adj;
-      adj = TREE_INT_CST_LOW (TYPE_SIZE (type)) / BITS_PER_UNIT;
-      if (rounded_size > align)
-       adj = rounded_size;
-
-      addr_tree = build (PLUS_EXPR, TREE_TYPE (addr_tree), addr_tree,
-                        build_int_2 (rounded_size - adj, 0));
-    }
-
-  addr = expand_expr (addr_tree, NULL_RTX, Pmode, EXPAND_NORMAL);
-  addr = copy_to_reg (addr);
-
-  /* Compute new value for AP.  */
-  t = build (MODIFY_EXPR, TREE_TYPE (valist), valist,
-            build (PLUS_EXPR, TREE_TYPE (valist), valist,
-                   build_int_2 (rounded_size, 0)));
-  TREE_SIDE_EFFECTS (t) = 1;
-  expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
-
-  return addr;
-}
-
 /* If defined, a C expression which determines whether, and in which direction,
    to pad out an argument with extra space.  The value should be of type
    `enum direction': either `upward' to pad above the argument,
index df4f8184e0c79e51ed976afe9eda16277e1eeea9..93253023660feef245d37894b688a79a91f193a3 100644 (file)
@@ -1047,6 +1047,10 @@ typedef struct m68hc11_args
 #define FUNCTION_ARG_PADDING(MODE, TYPE) \
   m68hc11_function_arg_padding ((MODE), (TYPE))
 
+#undef PAD_VARARGS_DOWN
+#define PAD_VARARGS_DOWN \
+  (m68hc11_function_arg_padding (TYPE_MODE (type), type) == downward)
+
 /* A C expression that indicates when it is the called function's
    responsibility to make a copy of arguments passed by invisible
    reference.  Normally, the caller makes a copy and passes the
@@ -1093,10 +1097,6 @@ typedef struct m68hc11_args
    caller saving results in spill failure.  */
 #define CALLER_SAVE_PROFITABLE(REFS,CALLS) 0
 
-/* Implement `va_arg'.  */
-#define EXPAND_BUILTIN_VA_ARG(valist, type) \
-  m68hc11_va_arg (valist, type)
-
 /* For an arg passed partly in registers and partly in memory,
    this is the number of registers used.
    For args passed entirely in registers or entirely in memory, zero.