diff options
Diffstat (limited to 'gcc/config/spu/spu.c')
-rw-r--r-- | gcc/config/spu/spu.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index e645adb..83bd9f5 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc. This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -50,7 +50,7 @@ #include "assert.h" #include "c-common.h" #include "machmode.h" -#include "tree-gimple.h" +#include "gimple.h" #include "tm-constrs.h" #include "spu-builtins.h" #include "ddg.h" @@ -118,8 +118,8 @@ static unsigned char spu_pass_by_reference (CUMULATIVE_ARGS *cum, enum machine_m const_tree type, unsigned char named); static tree spu_build_builtin_va_list (void); static void spu_va_start (tree, rtx); -static tree spu_gimplify_va_arg_expr (tree valist, tree type, tree * pre_p, - tree * post_p); +static tree spu_gimplify_va_arg_expr (tree valist, tree type, + gimple_seq * pre_p, gimple_seq * post_p); static int regno_aligned_for_load (int regno); static int store_with_one_insn_p (rtx mem); static int mem_is_padded_component_ref (rtx x); @@ -3238,7 +3238,7 @@ spu_va_start (tree valist, rtx nextarg) if (crtl->args.pretend_args_size > 0) t = build2 (POINTER_PLUS_EXPR, TREE_TYPE (args), t, size_int (-STACK_POINTER_OFFSET)); - t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (args), args, t); + t = build2 (MODIFY_EXPR, TREE_TYPE (args), args, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -3247,7 +3247,7 @@ spu_va_start (tree valist, rtx nextarg) t = build2 (POINTER_PLUS_EXPR, TREE_TYPE (skip), t, size_int (crtl->args.pretend_args_size - STACK_POINTER_OFFSET)); - t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (skip), skip, t); + t = build2 (MODIFY_EXPR, TREE_TYPE (skip), skip, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } @@ -3270,8 +3270,8 @@ spu_va_start (tree valist, rtx nextarg) ret = *(TYPE *)addr; */ static tree -spu_gimplify_va_arg_expr (tree valist, tree type, tree * pre_p, - tree * post_p ATTRIBUTE_UNUSED) +spu_gimplify_va_arg_expr (tree valist, tree type, gimple_seq * pre_p, + gimple_seq * post_p ATTRIBUTE_UNUSED) { tree f_args, f_skip; tree args, skip; @@ -3303,22 +3303,21 @@ spu_gimplify_va_arg_expr (tree valist, tree type, tree * pre_p, /* build conditional expression to calculate addr. The expression will be gimplified later. */ paddedsize = size_int (rsize); - tmp = build2 (POINTER_PLUS_EXPR, ptr_type_node, args, paddedsize); + tmp = build2 (POINTER_PLUS_EXPR, ptr_type_node, unshare_expr (args), paddedsize); tmp = build2 (TRUTH_AND_EXPR, boolean_type_node, - build2 (GT_EXPR, boolean_type_node, tmp, skip), - build2 (LE_EXPR, boolean_type_node, args, skip)); + build2 (GT_EXPR, boolean_type_node, tmp, unshare_expr (skip)), + build2 (LE_EXPR, boolean_type_node, unshare_expr (args), + unshare_expr (skip))); tmp = build3 (COND_EXPR, ptr_type_node, tmp, - build2 (POINTER_PLUS_EXPR, ptr_type_node, skip, - size_int (32)), args); + build2 (POINTER_PLUS_EXPR, ptr_type_node, unshare_expr (skip), + size_int (32)), unshare_expr (args)); - tmp = build2 (GIMPLE_MODIFY_STMT, ptr_type_node, addr, tmp); - gimplify_and_add (tmp, pre_p); + gimplify_assign (addr, tmp, pre_p); /* update VALIST.__args */ tmp = build2 (POINTER_PLUS_EXPR, ptr_type_node, addr, paddedsize); - tmp = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (args), args, tmp); - gimplify_and_add (tmp, pre_p); + gimplify_assign (unshare_expr (args), tmp, pre_p); addr = fold_convert (build_pointer_type (type), addr); |