diff options
Diffstat (limited to 'gcc/config/i386/i386.c')
-rw-r--r-- | gcc/config/i386/i386.c | 52 |
1 files changed, 20 insertions, 32 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7b4c243035a..62d1b8d9bce 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see #include "target-def.h" #include "langhooks.h" #include "cgraph.h" -#include "tree-gimple.h" +#include "gimple.h" #include "dwarf2.h" #include "df.h" #include "tm-constrs.h" @@ -6327,8 +6327,8 @@ ix86_va_start (tree valist, rtx nextarg) if (cfun->va_list_gpr_size) { type = TREE_TYPE (gpr); - t = build2 (GIMPLE_MODIFY_STMT, type, gpr, - build_int_cst (type, n_gpr * 8)); + t = build2 (MODIFY_EXPR, type, + gpr, build_int_cst (type, n_gpr * 8)); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } @@ -6336,7 +6336,7 @@ ix86_va_start (tree valist, rtx nextarg) if (cfun->va_list_fpr_size) { type = TREE_TYPE (fpr); - t = build2 (GIMPLE_MODIFY_STMT, type, fpr, + t = build2 (MODIFY_EXPR, type, fpr, build_int_cst (type, n_fpr * 16 + 8*X86_64_REGPARM_MAX)); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -6348,7 +6348,7 @@ ix86_va_start (tree valist, rtx nextarg) if (words != 0) t = build2 (POINTER_PLUS_EXPR, type, t, size_int (words * UNITS_PER_WORD)); - t = build2 (GIMPLE_MODIFY_STMT, type, ovf, t); + t = build2 (MODIFY_EXPR, type, ovf, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -6358,7 +6358,7 @@ ix86_va_start (tree valist, rtx nextarg) Prologue of the function save it right above stack frame. */ type = TREE_TYPE (sav); t = make_tree (type, frame_pointer_rtx); - t = build2 (GIMPLE_MODIFY_STMT, type, sav, t); + t = build2 (MODIFY_EXPR, type, sav, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } @@ -6367,7 +6367,8 @@ ix86_va_start (tree valist, rtx nextarg) /* Implement va_arg. */ static tree -ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) +ix86_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p, + gimple_seq *post_p) { static const int intreg[6] = { 0, 1, 2, 3, 4, 5 }; tree f_gpr, f_fpr, f_ovf, f_sav; @@ -6497,16 +6498,14 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) /* int_addr = gpr + sav; */ t = fold_convert (sizetype, gpr); t = build2 (POINTER_PLUS_EXPR, ptr_type_node, sav, t); - t = build2 (GIMPLE_MODIFY_STMT, void_type_node, int_addr, t); - gimplify_and_add (t, pre_p); + gimplify_assign (int_addr, t, pre_p); } if (needed_sseregs) { /* sse_addr = fpr + sav; */ t = fold_convert (sizetype, fpr); t = build2 (POINTER_PLUS_EXPR, ptr_type_node, sav, t); - t = build2 (GIMPLE_MODIFY_STMT, void_type_node, sse_addr, t); - gimplify_and_add (t, pre_p); + gimplify_assign (sse_addr, t, pre_p); } if (need_temp) { @@ -6515,8 +6514,7 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) /* addr = &temp; */ t = build1 (ADDR_EXPR, build_pointer_type (type), temp); - t = build2 (GIMPLE_MODIFY_STMT, void_type_node, addr, t); - gimplify_and_add (t, pre_p); + gimplify_assign (addr, t, pre_p); for (i = 0; i < XVECLEN (container, 0); i++) { @@ -6549,8 +6547,7 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) size_int (INTVAL (XEXP (slot, 1)))); dest = build_va_arg_indirect_ref (dest_addr); - t = build2 (GIMPLE_MODIFY_STMT, void_type_node, dest, src); - gimplify_and_add (t, pre_p); + gimplify_assign (dest, src, pre_p); } } @@ -6558,22 +6555,19 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) { t = build2 (PLUS_EXPR, TREE_TYPE (gpr), gpr, build_int_cst (TREE_TYPE (gpr), needed_intregs * 8)); - t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (gpr), gpr, t); - gimplify_and_add (t, pre_p); + gimplify_assign (gpr, t, pre_p); } + if (needed_sseregs) { t = build2 (PLUS_EXPR, TREE_TYPE (fpr), fpr, build_int_cst (TREE_TYPE (fpr), needed_sseregs * 16)); - t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (fpr), fpr, t); - gimplify_and_add (t, pre_p); + gimplify_assign (fpr, t, pre_p); } - t = build1 (GOTO_EXPR, void_type_node, lab_over); - gimplify_and_add (t, pre_p); + gimple_seq_add_stmt (pre_p, gimple_build_goto (lab_over)); - t = build1 (LABEL_EXPR, void_type_node, lab_false); - append_to_statement_list (t, pre_p); + gimple_seq_add_stmt (pre_p, gimple_build_label (lab_false)); } /* ... otherwise out of the overflow area. */ @@ -6601,20 +6595,14 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p) t = fold_convert (TREE_TYPE (ovf), t); } gimplify_expr (&t, pre_p, NULL, is_gimple_val, fb_rvalue); - - t2 = build2 (GIMPLE_MODIFY_STMT, void_type_node, addr, t); - gimplify_and_add (t2, pre_p); + gimplify_assign (addr, t, pre_p); t = build2 (POINTER_PLUS_EXPR, TREE_TYPE (t), t, size_int (rsize * UNITS_PER_WORD)); - t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (ovf), ovf, t); - gimplify_and_add (t, pre_p); + gimplify_assign (unshare_expr (ovf), t, pre_p); if (container) - { - t = build1 (LABEL_EXPR, void_type_node, lab_over); - append_to_statement_list (t, pre_p); - } + gimple_seq_add_stmt (pre_p, gimple_build_label (lab_over)); ptrtype = build_pointer_type (type); addr = fold_convert (ptrtype, addr); |