summaryrefslogtreecommitdiff
path: root/gcc/config/i860/i860.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-14 21:19:39 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-14 21:19:39 +0000
commit2cd7bb8449273be0565592f53a711b8196bb0bca (patch)
treee0d82178249e0ae888344ddf64b600801b7b9a7b /gcc/config/i860/i860.c
parent48da0c25d14deee27fd788057af292249b5cde3d (diff)
downloadgcc-2cd7bb8449273be0565592f53a711b8196bb0bca.tar.gz
* config/alpha/alpha.c (alpha_gimplify_va_arg_1): Move indirect ...
(alpha_gimplify_va_arg): ... handling here. Use pass_by_reference. * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Use pass_by_reference. * config/i386/i386.c (ix86_gimplify_va_arg): Likewise. * config/i860/i860.c (i860_gimplify_va_arg_expr): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise. * config/sh/sh.c (sh_gimplify_va_arg_expr): Likewise. * config/xtensa/xtensa.c (xtensa_gimplify_va_arg_expr): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84713 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i860/i860.c')
-rw-r--r--gcc/config/i860/i860.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/config/i860/i860.c b/gcc/config/i860/i860.c
index 1dc58a40051..d4976680997 100644
--- a/gcc/config/i860/i860.c
+++ b/gcc/config/i860/i860.c
@@ -1932,6 +1932,7 @@ i860_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
tree size, t, u, addr, type_ptr;
tree reg, n_reg, sav_ofs, lim_reg;
HOST_WIDE_INT isize;
+ bool indirect;
#ifdef I860_SVR4_VA_LIST
f_gpr = TYPE_FIELDS (va_list_type_node);
@@ -1950,6 +1951,9 @@ i860_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
mem = build (COMPONENT_REF, TREE_TYPE (f_mem), valist, f_mem, NULL_TREE);
sav = build (COMPONENT_REF, TREE_TYPE (f_sav), valist, f_sav, NULL_TREE);
+ indirect = pass_by_reference (NULL, TYPE_MODE (type), type, false);
+ if (indirect)
+ type = build_pointer_type (type);
size = size_in_bytes (type);
type_ptr = build_pointer_type (type);
@@ -2029,6 +2033,8 @@ i860_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
}
addr = fold_convert (type_ptr, addr);
+ if (indirect)
+ addr = build_fold_indirect_ref (addr);
return build_fold_indirect_ref (addr);
}