diff options
author | Roger Sayle <roger@eyesopen.com> | 2006-04-16 04:01:25 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2006-04-16 04:01:25 +0000 |
commit | 3db8a1134670de6000b92253f8274442cd3e5f33 (patch) | |
tree | c34af101c1173d68003ecd5c8595c7c1af29175e | |
parent | f5f701ad0010445cfff157bda3d08441ab0e82f4 (diff) | |
download | gcc-3db8a1134670de6000b92253f8274442cd3e5f33.zip gcc-3db8a1134670de6000b92253f8274442cd3e5f33.tar.gz gcc-3db8a1134670de6000b92253f8274442cd3e5f33.tar.bz2 |
i386.c (ix86_va_start): Ensure all integer constant trees are constructed with a suitable tree type.
* config/i386/i386.c (ix86_va_start): Ensure all integer constant
trees are constructed with a suitable tree type.
From-SVN: r112982
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 25 |
2 files changed, 20 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2645eba..10b55b1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2006-04-15 Roger Sayle <roger@eyesopen.com> + * config/i386/i386.c (ix86_va_start): Ensure all integer constant + trees are constructed with a suitable tree type. + +2006-04-15 Roger Sayle <roger@eyesopen.com> + * tree.c (integer_zerop): Ignore TREE_CONSTANT_OVERFLOW. (integer_onep): Likewise. (integer_all_onesp): Likewise. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 6562685..4d3a972 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4122,6 +4122,7 @@ ix86_va_start (tree valist, rtx nextarg) HOST_WIDE_INT words, n_gpr, n_fpr; tree f_gpr, f_fpr, f_ovf, f_sav; tree gpr, fpr, ovf, sav, t; + tree type; /* Only 64bit target needs something special. */ if (!TARGET_64BIT) @@ -4152,26 +4153,29 @@ ix86_va_start (tree valist, rtx nextarg) if (cfun->va_list_gpr_size) { - t = build2 (MODIFY_EXPR, TREE_TYPE (gpr), gpr, - build_int_cst (NULL_TREE, n_gpr * 8)); + type = TREE_TYPE (gpr); + 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); } if (cfun->va_list_fpr_size) { - t = build2 (MODIFY_EXPR, TREE_TYPE (fpr), fpr, - build_int_cst (NULL_TREE, n_fpr * 16 + 8*REGPARM_MAX)); + type = TREE_TYPE (fpr); + t = build2 (MODIFY_EXPR, type, fpr, + build_int_cst (type, n_fpr * 16 + 8*REGPARM_MAX)); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } /* Find the overflow area. */ - t = make_tree (TREE_TYPE (ovf), virtual_incoming_args_rtx); + type = TREE_TYPE (ovf); + t = make_tree (type, virtual_incoming_args_rtx); if (words != 0) - t = build2 (PLUS_EXPR, TREE_TYPE (ovf), t, - build_int_cst (NULL_TREE, words * UNITS_PER_WORD)); - t = build2 (MODIFY_EXPR, TREE_TYPE (ovf), ovf, t); + t = build2 (PLUS_EXPR, type, t, + build_int_cst (type, words * UNITS_PER_WORD)); + t = build2 (MODIFY_EXPR, type, ovf, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); @@ -4179,8 +4183,9 @@ ix86_va_start (tree valist, rtx nextarg) { /* Find the register save area. Prologue of the function save it right above stack frame. */ - t = make_tree (TREE_TYPE (sav), frame_pointer_rtx); - t = build2 (MODIFY_EXPR, TREE_TYPE (sav), sav, t); + type = TREE_TYPE (sav); + t = make_tree (type, frame_pointer_rtx); + t = build2 (MODIFY_EXPR, type, sav, t); TREE_SIDE_EFFECTS (t) = 1; expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); } |