aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2003-03-05 22:32:11 +0100
committerStephane Carrez <ciceron@gcc.gnu.org>2003-03-05 22:32:11 +0100
commitf2d0440f54c4d1c79cc8e165cfd24ff02d9f6b52 (patch)
tree71963bc4c2e893384766d3bd5a23ff7cc46fb244 /gcc
parent1c442892b378ded74a8c2207adba332f62a85471 (diff)
downloadgcc-f2d0440f54c4d1c79cc8e165cfd24ff02d9f6b52.zip
gcc-f2d0440f54c4d1c79cc8e165cfd24ff02d9f6b52.tar.gz
gcc-f2d0440f54c4d1c79cc8e165cfd24ff02d9f6b52.tar.bz2
m68hc11.h (PAD_VARARGS_DOWN): Define and return according to va_arg type.
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/m68hc11/m68hc11-protos.h2
-rw-r--r--gcc/config/m68hc11/m68hc11.c45
-rw-r--r--gcc/config/m68hc11/m68hc11.h8
4 files changed, 12 insertions, 51 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a63497e..6e4ebba 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/m68hc11/m68hc11-protos.h b/gcc/config/m68hc11/m68hc11-protos.h
index 5bb69cf..dda1469 100644
--- a/gcc/config/m68hc11/m68hc11-protos.h
+++ b/gcc/config/m68hc11/m68hc11-protos.h
@@ -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 */
diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c
index f4c1151..46d28a0 100644
--- a/gcc/config/m68hc11/m68hc11.c
+++ b/gcc/config/m68hc11/m68hc11.c
@@ -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,
diff --git a/gcc/config/m68hc11/m68hc11.h b/gcc/config/m68hc11/m68hc11.h
index df4f818..9325302 100644
--- a/gcc/config/m68hc11/m68hc11.h
+++ b/gcc/config/m68hc11/m68hc11.h
@@ -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.