Commit 66c277f1 by Jakub Jelinek Committed by Jakub Jelinek

genattrtab.c (insn_alternatives): Change type from int * to uint64_t *.

	* 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.

From-SVN: r224227
parent 74103219
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> 2015-06-08 Jan Kratochvil <jan.kratochvil@redhat.com>
PR other/65366 PR other/65366
......
...@@ -230,7 +230,7 @@ static int *insn_n_alternatives; ...@@ -230,7 +230,7 @@ static int *insn_n_alternatives;
/* Stores, for each insn code, a bitmap that has bits on for each possible /* Stores, for each insn code, a bitmap that has bits on for each possible
alternative. */ alternative. */
static int *insn_alternatives; static uint64_t *insn_alternatives;
/* Used to simplify expressions. */ /* Used to simplify expressions. */
...@@ -258,7 +258,7 @@ static char *attr_printf (unsigned int, const char *, ...) ...@@ -258,7 +258,7 @@ static char *attr_printf (unsigned int, const char *, ...)
ATTRIBUTE_PRINTF_2; ATTRIBUTE_PRINTF_2;
static rtx make_numeric_value (int); static rtx make_numeric_value (int);
static struct attr_desc *find_attr (const char **, 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 char *next_comma_elt (const char **);
static rtx insert_right_side (enum rtx_code, rtx, rtx, int, int); static rtx insert_right_side (enum rtx_code, rtx, rtx, int, int);
static rtx copy_boolean (rtx); static rtx copy_boolean (rtx);
...@@ -769,7 +769,7 @@ check_attr_test (rtx exp, int is_const, int lineno) ...@@ -769,7 +769,7 @@ check_attr_test (rtx exp, int is_const, int lineno)
if (attr == NULL) if (attr == NULL)
{ {
if (! strcmp (XSTR (exp, 0), "alternative")) 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 else
fatal ("unknown attribute `%s' in EQ_ATTR", XSTR (exp, 0)); fatal ("unknown attribute `%s' in EQ_ATTR", XSTR (exp, 0));
} }
...@@ -815,7 +815,7 @@ check_attr_test (rtx exp, int is_const, int lineno) ...@@ -815,7 +815,7 @@ check_attr_test (rtx exp, int is_const, int lineno)
name_ptr = XSTR (exp, 1); name_ptr = XSTR (exp, 1);
while ((p = next_comma_elt (&name_ptr)) != NULL) while ((p = next_comma_elt (&name_ptr)) != NULL)
set |= 1 << atoi (p); set |= ((uint64_t) 1) << atoi (p);
return mk_attr_alt (set); return mk_attr_alt (set);
} }
...@@ -1292,7 +1292,7 @@ static struct attr_value * ...@@ -1292,7 +1292,7 @@ static struct attr_value *
get_attr_value (rtx value, struct attr_desc *attr, int insn_code) get_attr_value (rtx value, struct attr_desc *attr, int insn_code)
{ {
struct attr_value *av; struct attr_value *av;
int num_alt = 0; uint64_t num_alt = 0;
value = make_canonical (attr, value); value = make_canonical (attr, value);
if (compares_alternatives_p (value)) if (compares_alternatives_p (value))
...@@ -1934,7 +1934,7 @@ insert_right_side (enum rtx_code code, rtx exp, rtx term, int insn_code, int ins ...@@ -1934,7 +1934,7 @@ insert_right_side (enum rtx_code code, rtx exp, rtx term, int insn_code, int ins
This routine is passed an expression and either AND or IOR. It returns a This routine is passed an expression and either AND or IOR. It returns a
bitmask indicating which alternatives are mentioned within EXP. */ bitmask indicating which alternatives are mentioned within EXP. */
static int static uint64_t
compute_alternative_mask (rtx exp, enum rtx_code code) compute_alternative_mask (rtx exp, enum rtx_code code)
{ {
const char *string; const char *string;
...@@ -1965,15 +1965,15 @@ compute_alternative_mask (rtx exp, enum rtx_code code) ...@@ -1965,15 +1965,15 @@ compute_alternative_mask (rtx exp, enum rtx_code code)
return 0; return 0;
if (string[1] == 0) if (string[1] == 0)
return 1 << (string[0] - '0'); return ((uint64_t) 1) << (string[0] - '0');
return 1 << atoi (string); return ((uint64_t) 1) << atoi (string);
} }
/* Given I, a single-bit mask, return RTX to compare the `alternative' /* Given I, a single-bit mask, return RTX to compare the `alternative'
attribute with the value represented by that bit. */ attribute with the value represented by that bit. */
static rtx static rtx
make_alternative_compare (int mask) make_alternative_compare (uint64_t mask)
{ {
return mk_attr_alt (mask); return mk_attr_alt (mask);
} }
...@@ -2472,7 +2472,7 @@ attr_alt_complement (rtx s) ...@@ -2472,7 +2472,7 @@ attr_alt_complement (rtx s)
in E. */ in E. */
static rtx static rtx
mk_attr_alt (int e) mk_attr_alt (uint64_t e)
{ {
rtx result = rtx_alloc (EQ_ATTR_ALT); rtx result = rtx_alloc (EQ_ATTR_ALT);
...@@ -2499,7 +2499,7 @@ simplify_test_exp (rtx exp, int insn_code, int insn_index) ...@@ -2499,7 +2499,7 @@ simplify_test_exp (rtx exp, int insn_code, int insn_index)
struct attr_value *av; struct attr_value *av;
struct insn_ent *ie; struct insn_ent *ie;
struct attr_value_list *iv; struct attr_value_list *iv;
int i; uint64_t i;
rtx newexp = exp; rtx newexp = exp;
bool left_alt, right_alt; bool left_alt, right_alt;
...@@ -2779,7 +2779,7 @@ simplify_test_exp (rtx exp, int insn_code, int insn_index) ...@@ -2779,7 +2779,7 @@ simplify_test_exp (rtx exp, int insn_code, int insn_index)
case EQ_ATTR: case EQ_ATTR:
if (XSTR (exp, 0) == alternative_name) 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; break;
} }
...@@ -5263,10 +5263,11 @@ main (int argc, char **argv) ...@@ -5263,10 +5263,11 @@ main (int argc, char **argv)
expand_delays (); expand_delays ();
/* Make `insn_alternatives'. */ /* 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) for (id = defs; id; id = id->next)
if (id->insn_code >= 0) 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'. */ /* Make `insn_n_alternatives'. */
insn_n_alternatives = oballocvec (int, insn_code_number); insn_n_alternatives = oballocvec (int, insn_code_number);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment