diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2004-07-13 17:22:41 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2004-07-13 17:22:41 +0000 |
commit | 6c6dd4bd12c4b6a99bce85f9873d95c0d5859522 (patch) | |
tree | 26701e8a793d3508e143d9b0f7b2852fb80e7e71 | |
parent | 27605cbe23b16fc978ec153a8cfd9f414b005ffd (diff) | |
download | gcc-6c6dd4bd12c4b6a99bce85f9873d95c0d5859522.zip gcc-6c6dd4bd12c4b6a99bce85f9873d95c0d5859522.tar.gz gcc-6c6dd4bd12c4b6a99bce85f9873d95c0d5859522.tar.bz2 |
s390.c (s390_gimplify_va_arg): Use size_int instead of build_int_2.
* config/s390/s390.c (s390_gimplify_va_arg): Use size_int instead
of build_int_2. Convert both operands of PLUS_EXPR and MULT_EXPR
to the same type.
From-SVN: r84632
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 27 |
2 files changed, 18 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 67fcce1..ca219cb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-07-13 Ulrich Weigand <uweigand@de.ibm.com> + + * config/s390/s390.c (s390_gimplify_va_arg): Use size_int instead + of build_int_2. Convert both operands of PLUS_EXPR and MULT_EXPR + to the same type. + 2004-07-13 Per Bothner <per@bothner.com> * collect2.c (main): Handle --no-demangle and --demangle flags. diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 614e714..58424a4 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -6716,21 +6716,17 @@ s390_gimplify_va_arg (tree valist, tree type, tree *pre_p, lab_over = create_artificial_label (); addr = create_tmp_var (ptr_type_node, "addr"); - t = build_int_2 (max_reg, 0); - TREE_TYPE (t) = TREE_TYPE (reg); + t = fold_convert (TREE_TYPE (reg), size_int (max_reg)); t = build2 (GT_EXPR, boolean_type_node, reg, t); u = build1 (GOTO_EXPR, void_type_node, lab_false); t = build3 (COND_EXPR, void_type_node, t, u, NULL_TREE); gimplify_and_add (t, pre_p); - if (sav_ofs) - t = build2 (PLUS_EXPR, ptr_type_node, sav, build_int_2 (sav_ofs, 0)); - else - t = sav; - - u = build2 (MULT_EXPR, long_integer_type_node, - reg, build_int_2 (sav_scale, 0)); - t = build2 (PLUS_EXPR, ptr_type_node, t, u); + t = build2 (PLUS_EXPR, ptr_type_node, sav, + fold_convert (ptr_type_node, size_int (sav_ofs))); + u = build2 (MULT_EXPR, TREE_TYPE (reg), reg, + fold_convert (TREE_TYPE (reg), size_int (sav_scale))); + t = build2 (PLUS_EXPR, ptr_type_node, t, fold_convert (ptr_type_node, u)); t = build2 (MODIFY_EXPR, void_type_node, addr, t); gimplify_and_add (t, pre_p); @@ -6746,16 +6742,17 @@ s390_gimplify_va_arg (tree valist, tree type, tree *pre_p, t = ovf; if (size < UNITS_PER_WORD) - t = build2 (PLUS_EXPR, TREE_TYPE (t), t, - build_int_2 (UNITS_PER_WORD - size, 0)); + t = build2 (PLUS_EXPR, ptr_type_node, t, + fold_convert (ptr_type_node, size_int (UNITS_PER_WORD - size))); gimplify_expr (&t, pre_p, NULL, is_gimple_val, fb_rvalue); u = build2 (MODIFY_EXPR, void_type_node, addr, t); gimplify_and_add (u, pre_p); - t = build2 (PLUS_EXPR, TREE_TYPE (t), t, build_int_2 (size, 0)); - t = build2 (MODIFY_EXPR, TREE_TYPE (ovf), ovf, t); + t = build2 (PLUS_EXPR, ptr_type_node, t, + fold_convert (ptr_type_node, size_int (size))); + t = build2 (MODIFY_EXPR, ptr_type_node, ovf, t); gimplify_and_add (t, pre_p); t = build1 (LABEL_EXPR, void_type_node, lab_over); @@ -6765,7 +6762,7 @@ s390_gimplify_va_arg (tree valist, tree type, tree *pre_p, /* Increment register save count. */ u = build2 (PREINCREMENT_EXPR, TREE_TYPE (reg), reg, - build_int_2 (n_reg, 0)); + fold_convert (TREE_TYPE (reg), size_int (n_reg))); gimplify_and_add (u, pre_p); if (indirect_p) |