+Fri Jan 25 08:26:19 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * builtins.c (expand_builtin_strncpy): Use integer_zerop instead
+ of compare_tree_int.
+ (expand_builtin_strncat): Likewise.
+ * c-decl.c (finish_struct): Use tree_low_cst.
+ * tree.h (compare_tree_int): Arg is unsigned HOST_WIDE_INT.
+ * tree.c (compare_tree_int): Likewise.
+
2002-01-25 Ulrich Weigand <uweigand@de.ibm.com>
* reload1.c (eliminate_regs_in_insn): Recognize frame pointer
Fri Jan 25 20:43:56 CET 2002 Jan Hubicka <jh@suse.cz>
- * df.c (df_ref_create, df_ref_record_1, df_ref_record): Kill BB argument.
+ * df.c (df_ref_create, df_ref_record_1, df_ref_record): Kill BB arg.
* df.h (struct ref): Kill B.
(DF_REF_BB, DF_REF_BBNO): Use BLOCK_FOR_INSN.
return 0;
/* If the len parameter is zero, return the dst parameter. */
- if (compare_tree_int (len, 0) == 0)
+ if (integer_zerop (len))
{
/* Evaluate and ignore the src argument in case it has
side-effects. */
/* If all arguments are constant, and the value of len is not greater
than the lengths of arg1 and arg2, evaluate at compile-time. */
if (host_integerp (len, 1) && p1 && p2
- && compare_tree_int (len, strlen (p1)+1) <= 0
- && compare_tree_int (len, strlen (p2)+1) <= 0)
+ && compare_tree_int (len, strlen (p1) + 1) <= 0
+ && compare_tree_int (len, strlen (p2) + 1) <= 0)
{
const int r = memcmp (p1, p2, tree_low_cst (len, 1));
+
return (r < 0 ? constm1_rtx : (r > 0 ? const1_rtx : const0_rtx));
}
/* If the requested length is zero, or the src parameter string
length is zero, return the dst parameter. */
- if ((TREE_CODE (len) == INTEGER_CST && compare_tree_int (len, 0) == 0)
+ if ((TREE_CODE (len) == INTEGER_CST && integer_zerop (len))
|| (p && *p == '\0'))
{
/* Evaluate and ignore the src and len parameters in case
if (TREE_CODE (len) == INTEGER_CST && p
&& compare_tree_int (len, strlen (p)) >= 0)
{
- tree newarglist =
- tree_cons (NULL_TREE, dst, build_tree_list (NULL_TREE, src)),
- fn = built_in_decls[BUILT_IN_STRCAT];
+ tree newarglist
+ = tree_cons (NULL_TREE, dst, build_tree_list (NULL_TREE, src));
+ tree fn = built_in_decls[BUILT_IN_STRCAT];
/* If the replacement _DECL isn't initialized, don't do the
transformation. */
field widths. */
if (DECL_INITIAL (x))
{
- int max_width;
- if (TYPE_MAIN_VARIANT (TREE_TYPE (x)) == c_bool_type_node)
- max_width = CHAR_TYPE_SIZE;
- else
- max_width = TYPE_PRECISION (TREE_TYPE (x));
+ int max_width
+ = (TYPE_MAIN_VARIANT (TREE_TYPE (x)) == c_bool_type_node
+ ? CHAR_TYPE_SIZE : TYPE_PRECISION (TREE_TYPE (x)));
+
if (tree_int_cst_sgn (DECL_INITIAL (x)) < 0)
error_with_decl (x, "negative width in bit-field `%s'");
else if (0 < compare_tree_int (DECL_INITIAL (x), max_width))
{
/* The test above has assured us that TREE_INT_CST_HIGH is 0. */
unsigned HOST_WIDE_INT width
- = TREE_INT_CST_LOW (DECL_INITIAL (x));
+ = tree_low_cst (DECL_INITIAL (x), 1);
if (TREE_CODE (TREE_TYPE (x)) == ENUMERAL_TYPE
&& (width < min_precision (TYPE_MIN_VALUE (TREE_TYPE (x)),
int
compare_tree_int (t, u)
tree t;
- unsigned int u;
+ unsigned HOST_WIDE_INT u;
{
if (tree_int_cst_sgn (t) < 0)
return -1;
extern int object_permanent_p PARAMS ((tree));
extern int type_precision PARAMS ((tree));
extern int simple_cst_equal PARAMS ((tree, tree));
-extern int compare_tree_int PARAMS ((tree, unsigned int));
+extern int compare_tree_int PARAMS ((tree,
+ unsigned HOST_WIDE_INT));
extern int type_list_equal PARAMS ((tree, tree));
extern int chain_member PARAMS ((tree, tree));
extern int chain_member_purpose PARAMS ((tree, tree));