int ii = 0;
if (TREE_CODE (TREE_OPERAND (t, 0)) == INTEGER_CST)
{
- len = tree_to_uhwi (TREE_OPERAND (t, 0));
+ len = TREE_INT_CST_LOW (TREE_OPERAND (t, 0));
for (ii = 0; ii < len; ii++)
extract_free_variables (TREE_OPERAND (t, ii), wd, ADD_READ);
-mv c/*$(objext) stageprofile/c
c.stagefeedback: stagefeedback-start
-mv c/*$(objext) stagefeedback/c
+
}
tmap = wide_int_to_tree (map_type, arg[0]);
- map = tree_to_uhwi (tmap);
+ map = TREE_INT_CST_LOW (tmap);
if (TREE_CODE (tval) != INTEGER_CST
&& 0 == avr_map_metric (map, MAP_MASK_PREIMAGE_F))
/* Pick up each vector id value. */
id = TREE_VALUE (id_list);
/* Add vector_number_offset to get actual vector number. */
- vector_id = tree_to_uhwi (id) + vector_number_offset;
+ vector_id = TREE_INT_CST_LOW (id) + vector_number_offset;
/* Enable corresponding vector and set function name. */
nds32_isr_vectors[vector_id].category = (intr)
/* The total vectors = interrupt + exception numbers + reset.
There are 8 exception and 1 reset in nds32 architecture. */
- nds32_isr_vectors[0].total_n_vectors = tree_to_uhwi (id) + 8 + 1;
+ nds32_isr_vectors[0].total_n_vectors = TREE_INT_CST_LOW (id) + 8 + 1;
strcpy (nds32_isr_vectors[0].func_name, func_name);
/* Retrieve nmi and warm function. */
tree charvec;
tree argpack = make_node (NONTYPE_ARGUMENT_PACK);
const char *str = TREE_STRING_POINTER (value);
- int sz = tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (value))));
+ int sz = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (value))));
int len = TREE_STRING_LENGTH (value) / sz - 1;
tree argvec = make_tree_vec (2);
vptr_address = TREE_OPERAND (vptr_address, 0);
if (TREE_OPERAND_LENGTH (vptr_address) > 1)
- offset = tree_to_uhwi (TREE_OPERAND (vptr_address, 1));
+ offset = TREE_INT_CST_LOW (TREE_OPERAND (vptr_address, 1));
else
offset = 0;
vptr_name = IDENTIFIER_POINTER (DECL_NAME (arg0));
if (TREE_CODE (arg1) == INTEGER_CST)
- vptr_offset = tree_to_uhwi (arg1);
+ vptr_offset = TREE_INT_CST_LOW (arg1);
}
snprintf (buffer, sizeof (buffer), "%s %s %s + %d\n",
return;
}
- // We'd have to extend this code to support odd sizes.
+ /* We'd have to extend this code to support odd sizes. */
gcc_assert (elt_size % (HOST_BITS_PER_WIDE_INT/BITS_PER_UNIT) == 0);
int n = elt_size / (HOST_BITS_PER_WIDE_INT/BITS_PER_UNIT);
unsigned HOST_WIDE_INT log2 = tree_log2 (arg01);
/* If (C2 << C1) doesn't overflow, then ((X >> C1) & C2) != 0
can be rewritten as (X & (C2 << C1)) != 0. */
- if ((log2 + tree_to_uhwi (arg001)) < prec)
+ if ((log2 + TREE_INT_CST_LOW (arg001)) < prec)
{
tem = fold_build2_loc (loc, LSHIFT_EXPR, itype, arg01, arg001);
tem = fold_build2_loc (loc, BIT_AND_EXPR, itype, arg000, tem);
&& (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (TREE_TYPE (string)))) == 1))
return build_int_cst_type (TREE_TYPE (exp),
(TREE_STRING_POINTER (string)
- [tree_to_uhwi (index)]));
+ [TREE_INT_CST_LOW (index)]));
}
return NULL;
}
gfc_warning ("Named COMMON block '%s' at %L shall be of the "
"same size as elsewhere (%lu vs %lu bytes)", com->name,
&com->where,
- (unsigned long) tree_to_uhwi (size),
- (unsigned long) tree_to_uhwi (DECL_SIZE_UNIT (decl)));
+ (unsigned long) TREE_INT_CST_LOW (size),
+ (unsigned long) TREE_INT_CST_LOW (DECL_SIZE_UNIT (decl)));
if (tree_int_cst_lt (DECL_SIZE_UNIT (decl), size))
{
&& TREE_CODE (TREE_OPERAND (TREE_OPERAND (str, 0), 0)) == STRING_CST
&& array_ref_low_bound (TREE_OPERAND (str, 0))
== TREE_OPERAND (TREE_OPERAND (str, 0), 1)
- && tree_to_uhwi (len) > 1
- && tree_to_uhwi (len)
+ && TREE_INT_CST_LOW (len) > 1
+ && TREE_INT_CST_LOW (len)
== (unsigned HOST_WIDE_INT)
TREE_STRING_LENGTH (TREE_OPERAND (TREE_OPERAND (str, 0), 0)))
{
{
enum rtx_code appropriate_code
= is_const_int ? CONST_INT : CONST_DOUBLE;
+
/* Consider relaxing this requirement in the future. */
if (regclass
|| GET_CODE (exp) != AND
return expr;
case ANNOTATE_EXPR:
- if ((enum annot_expr_kind) tree_to_uhwi (TREE_OPERAND (expr, 1))
+ if ((enum annot_expr_kind) TREE_INT_CST_LOW (TREE_OPERAND (expr, 1))
== annot_expr_ivdep_kind)
{
TREE_OPERAND (expr, 0) = gimple_boolify (TREE_OPERAND (expr, 0));
if (TREE_CODE (v) == POINTER_PLUS_EXPR)
{
- hash = TREE_INT_CST_ELT (TREE_OPERAND (v, 1), 0);
+ hash = TREE_INT_CST_LOW (TREE_OPERAND (v, 1));
v = TREE_OPERAND (TREE_OPERAND (v, 0), 0);
}
{
tree high = TYPE_MAX_VALUE (index_type);
if (TREE_CODE (high) == INTEGER_CST)
- return tree_to_uhwi (high) + 1;
+ return TREE_INT_CST_LOW (high) + 1;
}
}
return -1;
&& ! integer_zerop (DECL_SIZE (field))
&& tree_fits_uhwi_p (DECL_SIZE (field))
/* BUG!!! rli->offset is checked as unsigned but used as signed. */
- && tree_fits_shwi_p (rli->offset)
+ && tree_fits_uhwi_p (rli->offset)
&& tree_fits_uhwi_p (TYPE_SIZE (type)))
{
unsigned int type_align = TYPE_ALIGN (type);
return long_long_integer_type_node;
}
+
/* Returns the size of the cookie to use when allocating an array
whose elements have the indicated TYPE. Assumes that it is already
known that a cookie is needed. */
case ANNOTATE_EXPR:
pp_string (buffer, "ANNOTATE_EXPR <");
- switch ((enum annot_expr_kind) tree_to_shwi (TREE_OPERAND (node, 1)))
+ switch ((enum annot_expr_kind) TREE_INT_CST_LOW (TREE_OPERAND (node, 1)))
{
case annot_expr_ivdep_kind:
pp_string (buffer, "ivdep, ");
tree_to_shwi (const_tree t)
{
gcc_assert (tree_fits_shwi_p (t));
- return TREE_INT_CST_ELT (t, 0);
+ return TREE_INT_CST_LOW (t);
}
/* T is an INTEGER_CST whose numerical value (extended according to
tree_to_uhwi (const_tree t)
{
gcc_assert (tree_fits_uhwi_p (t));
- return TREE_INT_CST_ELT (t, 0);
+ return TREE_INT_CST_LOW (t);
}
/* Return the most significant (sign) bit of T. */
tree_to_shwi (const_tree t)
{
gcc_assert (tree_fits_shwi_p (t));
- return TREE_INT_CST_ELT (t, 0);
+ return TREE_INT_CST_LOW (t);
}
extern inline __attribute__ ((__gnu_inline__)) unsigned HOST_WIDE_INT
tree_to_uhwi (const_tree t)
{
gcc_assert (tree_fits_uhwi_p (t));
- return TREE_INT_CST_ELT (t, 0);
+ return TREE_INT_CST_LOW (t);
}
#endif
extern int tree_int_cst_sgn (const_tree);