summaryrefslogtreecommitdiff
path: root/gcc/config/stormy16/stormy16.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-02 17:06:50 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-02 17:06:50 +0000
commited03eadb804efe99a3359fda6d489b597189d2b3 (patch)
tree90f1caf200cda3d26483d4ff07ddcad996ff4c51 /gcc/config/stormy16/stormy16.c
parentc76187f7adc232ed244feed4b9c39c1bddee6a1d (diff)
downloadgcc-ed03eadb804efe99a3359fda6d489b597189d2b3.tar.gz
2005-12-02 Richard Guenther <rguenther@suse.de>
* config/alpha/alpha.c (alpha_va_start, alpha_gimplify_va_arg_1i, alpha_gimplify_va_arg): Use buildN and fold_buildN where applicable. * config/frv/frv.c (frv_expand_builtin_va_start): Likewise. * config/s390/s390.c (s390_va_start, s390_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise. * config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg): Likewise. * config/sh/sh.c (sh_va_start, sh_gimplify_va_arg_expr, sh_adjust_unroll_max): Likewise. * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/xtensa/xtensa.c (xtensa_va_start, xtensa_gimplify_va_arg_expr): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. * config/mips/mips.c (mips_va_start, mips_gimplify_va_arg_expr): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107906 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/stormy16/stormy16.c')
-rw-r--r--gcc/config/stormy16/stormy16.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index d1f33c7b719..3e779248d1a 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -1365,20 +1365,20 @@ xstormy16_expand_builtin_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
f_base = TYPE_FIELDS (va_list_type_node);
f_count = TREE_CHAIN (f_base);
- base = build (COMPONENT_REF, TREE_TYPE (f_base), valist, f_base, NULL_TREE);
- count = build (COMPONENT_REF, TREE_TYPE (f_count), valist, f_count,
- NULL_TREE);
+ base = build3 (COMPONENT_REF, TREE_TYPE (f_base), valist, f_base, NULL_TREE);
+ count = build3 (COMPONENT_REF, TREE_TYPE (f_count), valist, f_count,
+ NULL_TREE);
t = make_tree (TREE_TYPE (base), virtual_incoming_args_rtx);
- t = build (PLUS_EXPR, TREE_TYPE (base), t,
- build_int_cst (NULL_TREE, INCOMING_FRAME_SP_OFFSET));
- t = build (MODIFY_EXPR, TREE_TYPE (base), base, t);
+ t = build2 (PLUS_EXPR, TREE_TYPE (base), t,
+ build_int_cst (NULL_TREE, INCOMING_FRAME_SP_OFFSET));
+ t = build2 (MODIFY_EXPR, TREE_TYPE (base), base, t);
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
- t = build (MODIFY_EXPR, TREE_TYPE (count), count,
- build_int_cst (NULL_TREE,
- current_function_args_info * UNITS_PER_WORD));
+ t = build2 (MODIFY_EXPR, TREE_TYPE (count), count,
+ build_int_cst (NULL_TREE,
+ current_function_args_info * UNITS_PER_WORD));
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
}
@@ -1401,9 +1401,9 @@ xstormy16_expand_builtin_va_arg (tree valist, tree type, tree *pre_p,
f_base = TYPE_FIELDS (va_list_type_node);
f_count = TREE_CHAIN (f_base);
- base = build (COMPONENT_REF, TREE_TYPE (f_base), valist, f_base, NULL_TREE);
- count = build (COMPONENT_REF, TREE_TYPE (f_count), valist, f_count,
- NULL_TREE);
+ base = build3 (COMPONENT_REF, TREE_TYPE (f_base), valist, f_base, NULL_TREE);
+ count = build3 (COMPONENT_REF, TREE_TYPE (f_count), valist, f_count,
+ NULL_TREE);
must_stack = targetm.calls.must_pass_in_stack (TYPE_MODE (type), type);
size_tree = round_up (size_in_bytes (type), UNITS_PER_WORD);
@@ -1421,23 +1421,23 @@ xstormy16_expand_builtin_va_arg (tree valist, tree type, tree *pre_p,
tree r;
t = fold_convert (TREE_TYPE (count), size_tree);
- t = build (PLUS_EXPR, TREE_TYPE (count), count_tmp, t);
+ t = build2 (PLUS_EXPR, TREE_TYPE (count), count_tmp, t);
r = fold_convert (TREE_TYPE (count), size_int (size_of_reg_args));
- t = build (GT_EXPR, boolean_type_node, t, r);
- t = build (COND_EXPR, void_type_node, t,
- build (GOTO_EXPR, void_type_node, lab_fromstack),
- NULL);
+ t = build2 (GT_EXPR, boolean_type_node, t, r);
+ t = build3 (COND_EXPR, void_type_node, t,
+ build1 (GOTO_EXPR, void_type_node, lab_fromstack),
+ NULL_TREE);
gimplify_and_add (t, pre_p);
t = fold_convert (ptr_type_node, count_tmp);
- t = build (PLUS_EXPR, ptr_type_node, base, t);
- t = build (MODIFY_EXPR, void_type_node, addr, t);
+ t = build2 (PLUS_EXPR, ptr_type_node, base, t);
+ t = build2 (MODIFY_EXPR, void_type_node, addr, t);
gimplify_and_add (t, pre_p);
- t = build (GOTO_EXPR, void_type_node, lab_gotaddr);
+ t = build1 (GOTO_EXPR, void_type_node, lab_gotaddr);
gimplify_and_add (t, pre_p);
- t = build (LABEL_EXPR, void_type_node, lab_fromstack);
+ t = build1 (LABEL_EXPR, void_type_node, lab_fromstack);
gimplify_and_add (t, pre_p);
}
@@ -1450,31 +1450,31 @@ xstormy16_expand_builtin_va_arg (tree valist, tree type, tree *pre_p,
tree r, u;
r = size_int (NUM_ARGUMENT_REGISTERS * UNITS_PER_WORD);
- u = build (MODIFY_EXPR, void_type_node, count_tmp, r);
+ u = build2 (MODIFY_EXPR, void_type_node, count_tmp, r);
t = fold_convert (TREE_TYPE (count), r);
- t = build (GE_EXPR, boolean_type_node, count_tmp, t);
- t = build (COND_EXPR, void_type_node, t, NULL, u);
+ t = build2 (GE_EXPR, boolean_type_node, count_tmp, t);
+ t = build3 (COND_EXPR, void_type_node, t, NULL_TREE, u);
gimplify_and_add (t, pre_p);
}
t = size_int (NUM_ARGUMENT_REGISTERS * UNITS_PER_WORD
- INCOMING_FRAME_SP_OFFSET);
t = fold_convert (TREE_TYPE (count), t);
- t = build (MINUS_EXPR, TREE_TYPE (count), count_tmp, t);
- t = build (PLUS_EXPR, TREE_TYPE (count), t,
- fold_convert (TREE_TYPE (count), size_tree));
+ t = build2 (MINUS_EXPR, TREE_TYPE (count), count_tmp, t);
+ t = build2 (PLUS_EXPR, TREE_TYPE (count), t,
+ fold_convert (TREE_TYPE (count), size_tree));
t = fold_convert (TREE_TYPE (base), fold (t));
- t = build (MINUS_EXPR, TREE_TYPE (base), base, t);
- t = build (MODIFY_EXPR, void_type_node, addr, t);
+ t = build2 (MINUS_EXPR, TREE_TYPE (base), base, t);
+ t = build2 (MODIFY_EXPR, void_type_node, addr, t);
gimplify_and_add (t, pre_p);
- t = build (LABEL_EXPR, void_type_node, lab_gotaddr);
+ t = build1 (LABEL_EXPR, void_type_node, lab_gotaddr);
gimplify_and_add (t, pre_p);
t = fold_convert (TREE_TYPE (count), size_tree);
- t = build (PLUS_EXPR, TREE_TYPE (count), count_tmp, t);
- t = build (MODIFY_EXPR, TREE_TYPE (count), count, t);
+ t = build2 (PLUS_EXPR, TREE_TYPE (count), count_tmp, t);
+ t = build2 (MODIFY_EXPR, TREE_TYPE (count), count, t);
gimplify_and_add (t, pre_p);
addr = fold_convert (build_pointer_type (type), addr);