diff options
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 65028cf..9b4a88d 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -903,12 +903,12 @@ expand_builtin_prefetch (tree arglist) if (TREE_CHAIN (TREE_CHAIN (arglist))) arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))); else - arg2 = build_int_cst (NULL_TREE, 3, 0); + arg2 = build_int_cst (NULL_TREE, 3); } else { arg1 = integer_zero_node; - arg2 = build_int_cst (NULL_TREE, 3, 0); + arg2 = build_int_cst (NULL_TREE, 3); } /* Argument 0 is an address. */ @@ -2491,7 +2491,7 @@ expand_builtin_strstr (tree arglist, rtx target, enum machine_mode mode) /* New argument list transforming strstr(s1, s2) to strchr(s1, s2[0]). */ arglist = build_tree_list (NULL_TREE, - build_int_cst (NULL_TREE, p2[0], 0)); + build_int_cst (NULL_TREE, p2[0])); arglist = tree_cons (NULL_TREE, s1, arglist); return expand_expr (build_function_call_expr (fn, arglist), target, mode, EXPAND_NORMAL); @@ -2648,7 +2648,7 @@ expand_builtin_strpbrk (tree arglist, rtx target, enum machine_mode mode) /* New argument list transforming strpbrk(s1, s2) to strchr(s1, s2[0]). */ arglist = build_tree_list (NULL_TREE, - build_int_cst (NULL_TREE, p2[0], 0)); + build_int_cst (NULL_TREE, p2[0])); arglist = tree_cons (NULL_TREE, s1, arglist); return expand_expr (build_function_call_expr (fn, arglist), target, mode, EXPAND_NORMAL); @@ -4679,7 +4679,7 @@ expand_builtin_fputs (tree arglist, rtx target, bool unlocked) arglist = build_tree_list (NULL_TREE, TREE_VALUE (TREE_CHAIN (arglist))); arglist = tree_cons (NULL_TREE, - build_int_cst (NULL_TREE, p[0], 0), + build_int_cst (NULL_TREE, p[0]), arglist); fn = fn_fputc; break; @@ -4937,7 +4937,7 @@ build_string_literal (int len, const char *str) t = build_string (len, str); elem = build_type_variant (char_type_node, 1, 0); - index = build_index_type (build_int_cst (NULL_TREE, len - 1, 0)); + index = build_index_type (build_int_cst (NULL_TREE, len - 1)); type = build_array_type (elem, index); TREE_TYPE (t) = type; TREE_CONSTANT (t) = 1; @@ -5023,7 +5023,7 @@ expand_builtin_printf (tree arglist, rtx target, enum machine_mode mode, /* Given printf("c"), (where c is any one character,) convert "c"[0] to an int and pass that to the replacement function. */ - arg = build_int_cst (NULL_TREE, fmt_str[0], 0); + arg = build_int_cst (NULL_TREE, fmt_str[0]); arglist = build_tree_list (NULL_TREE, arg); fn = fn_putchar; } @@ -5194,7 +5194,7 @@ expand_builtin_sprintf (tree arglist, rtx target, enum machine_mode mode) const0_rtx, VOIDmode, EXPAND_NORMAL); if (target == const0_rtx) return const0_rtx; - exp = build_int_cst (NULL_TREE, strlen (fmt_str), 0); + exp = build_int_cst (NULL_TREE, strlen (fmt_str)); return expand_expr (exp, target, mode, EXPAND_NORMAL); } /* If the format is "%s", use strcpy if the result isn't used. */ @@ -6271,10 +6271,10 @@ static tree fold_builtin_classify_type (tree arglist) { if (arglist == 0) - return build_int_cst (NULL_TREE, no_type_class, 0); + return build_int_cst (NULL_TREE, no_type_class); return build_int_cst (NULL_TREE, - type_to_class (TREE_TYPE (TREE_VALUE (arglist))), 0); + type_to_class (TREE_TYPE (TREE_VALUE (arglist)))); } /* Fold a call to __builtin_inf or __builtin_huge_val. */ @@ -6707,7 +6707,7 @@ fold_builtin_lround (tree exp) real_round (&r, TYPE_MODE (ftype), &x); REAL_VALUE_TO_INT (&lo, &hi, r); - result = build_int_cst (NULL_TREE, lo, hi); + result = build_int_cst_wide (NULL_TREE, lo, hi); if (int_fits_type_p (result, itype)) return fold_convert (itype, result); } @@ -6816,7 +6816,7 @@ fold_builtin_bitop (tree exp) abort(); } - return build_int_cst (TREE_TYPE (exp), result, 0); + return build_int_cst (TREE_TYPE (exp), result); } return NULL_TREE; @@ -7573,8 +7573,7 @@ fold_builtin_isascii (tree arglist) arg = build2 (BIT_AND_EXPR, integer_type_node, arg, build_int_cst (NULL_TREE, - ~ (unsigned HOST_WIDE_INT) 0x7f, - ~ (HOST_WIDE_INT) 0)); + ~ (unsigned HOST_WIDE_INT) 0x7f)); arg = fold (build2 (EQ_EXPR, integer_type_node, arg, integer_zero_node)); @@ -7598,7 +7597,7 @@ fold_builtin_toascii (tree arglist) tree arg = TREE_VALUE (arglist); return fold (build2 (BIT_AND_EXPR, integer_type_node, arg, - build_int_cst (NULL_TREE, 0x7f, 0))); + build_int_cst (NULL_TREE, 0x7f))); } } @@ -7616,9 +7615,9 @@ fold_builtin_isdigit (tree arglist) tree arg = TREE_VALUE (arglist); arg = fold_convert (unsigned_type_node, arg); arg = build2 (MINUS_EXPR, unsigned_type_node, arg, - build_int_cst (unsigned_type_node, TARGET_DIGIT0, 0)); + build_int_cst (unsigned_type_node, TARGET_DIGIT0)); arg = build2 (LE_EXPR, integer_type_node, arg, - build_int_cst (unsigned_type_node, 9, 0)); + build_int_cst (unsigned_type_node, 9)); arg = fold (arg); if (in_gimple_form && !TREE_CONSTANT (arg)) return NULL_TREE; @@ -8696,7 +8695,7 @@ simplify_builtin_strstr (tree arglist) /* New argument list transforming strstr(s1, s2) to strchr(s1, s2[0]). */ arglist = build_tree_list (NULL_TREE, - build_int_cst (NULL_TREE, p2[0], 0)); + build_int_cst (NULL_TREE, p2[0])); arglist = tree_cons (NULL_TREE, s1, arglist); return build_function_call_expr (fn, arglist); } @@ -8882,7 +8881,7 @@ simplify_builtin_strpbrk (tree arglist) /* New argument list transforming strpbrk(s1, s2) to strchr(s1, s2[0]). */ arglist = build_tree_list (NULL_TREE, - build_int_cst (NULL_TREE, p2[0], 0)); + build_int_cst (NULL_TREE, p2[0])); arglist = tree_cons (NULL_TREE, s1, arglist); return build_function_call_expr (fn, arglist); } @@ -9133,7 +9132,7 @@ fold_builtin_fputs (tree arglist, bool ignore, bool unlocked, tree len) arglist = build_tree_list (NULL_TREE, TREE_VALUE (TREE_CHAIN (arglist))); arglist = tree_cons (NULL_TREE, - build_int_cst (NULL_TREE, p[0], 0), + build_int_cst (NULL_TREE, p[0]), arglist); fn = fn_fputc; break; @@ -9258,7 +9257,7 @@ simplify_builtin_sprintf (tree arglist, int ignored) arglist = tree_cons (NULL_TREE, dest, arglist); call = build_function_call_expr (fn, arglist); if (!ignored) - retval = build_int_cst (NULL_TREE, strlen (fmt_str), 0); + retval = build_int_cst (NULL_TREE, strlen (fmt_str)); } /* If the format is "%s", use strcpy if the result isn't used. */ |