* builtins.c (ind_gimplify_va_arg_expr): New.
* tree.h (ind_gimplify_va_arg_expr): Declare.
* config/arc/arc.c (arc_gimplify_va_arg_expr): Use it.
From-SVN: r84317
+2004-07-08 Richard Henderson <rth@redhat.com>
+
+ * builtins.c (ind_gimplify_va_arg_expr): New.
+ * tree.h (ind_gimplify_va_arg_expr): Declare.
+ * config/arc/arc.c (arc_gimplify_va_arg_expr): Use it.
+
2004-07-08 Jan Beulich <jbeulich@novell.com>
* expmed.c (extract_bit_field): Correct condition to use vec_extract
return build_fold_indirect_ref (addr);
}
+/* Like std_gimplify_va_arg_expr, but uses pass-by-reference. */
+
+tree
+ind_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
+{
+ tree t;
+ t = build_pointer_type (type);
+ t = std_gimplify_va_arg_expr (valist, t, pre_p, post_p);
+ return build_fold_indirect_ref (t);
+}
+
/* Return a dummy expression of type TYPE in order to keep going after an
error. */
than 8 bytes are passed by reference. */
if (AGGREGATE_TYPE_P (type) || int_size_in_bytes (type) > 8)
- {
- tree type_ptr = build_pointer_type (type);
- tree addr = std_gimplify_va_arg_expr (valist, type_ptr, pre_p, post_p);
- return build_fold_indirect_ref (addr);
- }
+ return ind_gimplify_va_arg_expr (valist, type, pre_p, post_p);
return std_gimplify_va_arg_expr (valist, type, pre_p, post_p);
}
extern tree simplify_builtin (tree, int);
extern tree c_strlen (tree, int);
extern tree std_gimplify_va_arg_expr (tree, tree, tree *, tree *);
+extern tree ind_gimplify_va_arg_expr (tree, tree, tree *, tree *);
/* In convert.c */
extern tree strip_float_extensions (tree);