+2015-06-08 Jakub Jelinek <jakub@redhat.com>
+
+ * genattrtab.c (insn_alternatives): Change type from int *
+ to uint64_t *.
+ (check_attr_test): Shift ((uint64_t) 1) instead of 1 up.
+ (get_attr_value): Change type of num_alt to uint64_t.
+ (compute_alternative_mask): Change return type from
+ int to uint64_t, shift ((uint64_t) 1) instead of 1 up.
+ (make_alternative_compare, mk_attr_alt): Change argument type
+ from int to uint64_t.
+ (simplify_test_exp): Change type of i from int to uint64_t.
+ Shift ((uint64_t) 1) instead of 1 up.
+ (main): Adjust oballocvec first argument from int to uint64_t.
+ Shift ((uint64_t) 1) instead of 1 up.
+
2015-06-08 Jan Kratochvil <jan.kratochvil@redhat.com>
PR other/65366
/* Stores, for each insn code, a bitmap that has bits on for each possible
alternative. */
-static int *insn_alternatives;
+static uint64_t *insn_alternatives;
/* Used to simplify expressions. */
ATTRIBUTE_PRINTF_2;
static rtx make_numeric_value (int);
static struct attr_desc *find_attr (const char **, int);
-static rtx mk_attr_alt (int);
+static rtx mk_attr_alt (uint64_t);
static char *next_comma_elt (const char **);
static rtx insert_right_side (enum rtx_code, rtx, rtx, int, int);
static rtx copy_boolean (rtx);
if (attr == NULL)
{
if (! strcmp (XSTR (exp, 0), "alternative"))
- return mk_attr_alt (1 << atoi (XSTR (exp, 1)));
+ return mk_attr_alt (((uint64_t) 1) << atoi (XSTR (exp, 1)));
else
fatal ("unknown attribute `%s' in EQ_ATTR", XSTR (exp, 0));
}
name_ptr = XSTR (exp, 1);
while ((p = next_comma_elt (&name_ptr)) != NULL)
- set |= 1 << atoi (p);
+ set |= ((uint64_t) 1) << atoi (p);
return mk_attr_alt (set);
}
get_attr_value (rtx value, struct attr_desc *attr, int insn_code)
{
struct attr_value *av;
- int num_alt = 0;
+ uint64_t num_alt = 0;
value = make_canonical (attr, value);
if (compares_alternatives_p (value))
This routine is passed an expression and either AND or IOR. It returns a
bitmask indicating which alternatives are mentioned within EXP. */
-static int
+static uint64_t
compute_alternative_mask (rtx exp, enum rtx_code code)
{
const char *string;
return 0;
if (string[1] == 0)
- return 1 << (string[0] - '0');
- return 1 << atoi (string);
+ return ((uint64_t) 1) << (string[0] - '0');
+ return ((uint64_t) 1) << atoi (string);
}
/* Given I, a single-bit mask, return RTX to compare the `alternative'
attribute with the value represented by that bit. */
static rtx
-make_alternative_compare (int mask)
+make_alternative_compare (uint64_t mask)
{
return mk_attr_alt (mask);
}
in E. */
static rtx
-mk_attr_alt (int e)
+mk_attr_alt (uint64_t e)
{
rtx result = rtx_alloc (EQ_ATTR_ALT);
struct attr_value *av;
struct insn_ent *ie;
struct attr_value_list *iv;
- int i;
+ uint64_t i;
rtx newexp = exp;
bool left_alt, right_alt;
case EQ_ATTR:
if (XSTR (exp, 0) == alternative_name)
{
- newexp = mk_attr_alt (1 << atoi (XSTR (exp, 1)));
+ newexp = mk_attr_alt (((uint64_t) 1) << atoi (XSTR (exp, 1)));
break;
}
expand_delays ();
/* Make `insn_alternatives'. */
- insn_alternatives = oballocvec (int, insn_code_number);
+ insn_alternatives = oballocvec (uint64_t, insn_code_number);
for (id = defs; id; id = id->next)
if (id->insn_code >= 0)
- insn_alternatives[id->insn_code] = (1 << id->num_alternatives) - 1;
+ insn_alternatives[id->insn_code]
+ = (((uint64_t) 1) << id->num_alternatives) - 1;
/* Make `insn_n_alternatives'. */
insn_n_alternatives = oballocvec (int, insn_code_number);