summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/rs6000.c
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@gnu.org>2002-03-13 16:57:48 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2002-03-13 11:57:48 -0500
commit2a55fd4253835815654c550536b3311046bb2b14 (patch)
treec33e84ffbc23fa18d05f23a954ab1c55497df37f /gcc/config/rs6000/rs6000.c
parent9a789d73d1e3ec0db2755ea8ed4ba3cfc0231d1f (diff)
downloadgcc-2a55fd4253835815654c550536b3311046bb2b14.tar.gz
rs6000.h (PAD_VARARGS_DOWN): Define.
* config/rs6000/rs6000.h (PAD_VARARGS_DOWN): Define. * config/rs6000/rs6000.c (rs6000_va_arg): Use std_expand_builtin_va_arg if not ABI_V4. From-SVN: r50739
Diffstat (limited to 'gcc/config/rs6000/rs6000.c')
-rw-r--r--gcc/config/rs6000/rs6000.c44
1 files changed, 1 insertions, 43 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index d2046a16845..8ad9fa52e41 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -2903,8 +2903,6 @@ setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl)
if (DEFAULT_ABI == ABI_V4)
{
/* Indicate to allocate space on the stack for varargs save area. */
- /* ??? Does this really have to be located at a magic spot on the
- stack, or can we allocate this with assign_stack_local instead. */
cfun->machine->sysv_varargs_p = 1;
if (! no_rtl)
save_area = plus_constant (virtual_stack_vars_rtx,
@@ -3096,48 +3094,8 @@ rs6000_va_arg (valist, type)
int indirect_p, size, rsize, n_reg, sav_ofs, sav_scale;
rtx lab_false, lab_over, addr_rtx, r;
- /* For AIX, the rule is that structures are passed left-aligned in
- their stack slot. However, GCC does not presently do this:
- structures which are the same size as integer types are passed
- right-aligned, as if they were in fact integers. This only
- matters for structures of size 1 or 2, or 4 when TARGET_64BIT. */
if (DEFAULT_ABI != ABI_V4)
- {
- HOST_WIDE_INT align, rounded_size;
- enum machine_mode mode;
- tree addr_tree;
-
- /* Compute the rounded size of the type. */
- align = PARM_BOUNDARY / BITS_PER_UNIT;
- rounded_size = (((int_size_in_bytes (type) + align - 1) / align)
- * align);
-
- addr_tree = valist;
-
- mode = TYPE_MODE (type);
- if (mode != BLKmode)
- {
- 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_rtx = expand_expr (addr_tree, NULL_RTX, Pmode, EXPAND_NORMAL);
- addr_rtx = copy_to_reg (addr_rtx);
-
- /* 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_rtx;
- }
+ return std_expand_builtin_va_arg (valist, type);
f_gpr = TYPE_FIELDS (TREE_TYPE (va_list_type_node));
f_fpr = TREE_CHAIN (f_gpr);