mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-14 11:19:56 +08:00
*** empty log message ***
From-SVN: r933
This commit is contained in:
parent
5ace4ac449
commit
b31a5831c2
@ -690,7 +690,7 @@ attr_string (str, len)
|
|||||||
return h->u.str; /* <-- return if found. */
|
return h->u.str; /* <-- return if found. */
|
||||||
|
|
||||||
/* Not found; create a permanent copy and add it to the hash table. */
|
/* Not found; create a permanent copy and add it to the hash table. */
|
||||||
new_str = (char *) xmalloc (len + 1);
|
new_str = (char *) obstack_alloc (hash_obstack, len + 1);
|
||||||
bcopy (str, new_str, len);
|
bcopy (str, new_str, len);
|
||||||
new_str[len] = '\0';
|
new_str[len] = '\0';
|
||||||
attr_hash_add_string (hashcode, new_str);
|
attr_hash_add_string (hashcode, new_str);
|
||||||
@ -838,6 +838,12 @@ check_attr_test (exp, is_const)
|
|||||||
so expressions using it can be permanent too. */
|
so expressions using it can be permanent too. */
|
||||||
exp = attr_eq (XSTR (exp, 0), XSTR (exp, 1));
|
exp = attr_eq (XSTR (exp, 0), XSTR (exp, 1));
|
||||||
|
|
||||||
|
/* It shouldn't be possible to simplfy the value given to a
|
||||||
|
constant attribute, so don't expand this until it's time to
|
||||||
|
write the test expression. */
|
||||||
|
if (attr->is_const)
|
||||||
|
RTX_UNCHANGING_P (exp) = 1;
|
||||||
|
|
||||||
if (attr->is_numeric)
|
if (attr->is_numeric)
|
||||||
{
|
{
|
||||||
for (p = XSTR (exp, 1); *p; p++)
|
for (p = XSTR (exp, 1); *p; p++)
|
||||||
@ -1698,6 +1704,11 @@ fill_attr (attr)
|
|||||||
int i;
|
int i;
|
||||||
rtx value;
|
rtx value;
|
||||||
|
|
||||||
|
/* Don't fill constant attributes. The value is independent of
|
||||||
|
any particular insn. */
|
||||||
|
if (attr->is_const)
|
||||||
|
return;
|
||||||
|
|
||||||
for (id = defs; id; id = id->next)
|
for (id = defs; id; id = id->next)
|
||||||
{
|
{
|
||||||
/* If no value is specified for this insn for this attribute, use the
|
/* If no value is specified for this insn for this attribute, use the
|
||||||
@ -2123,6 +2134,7 @@ compute_alternative_mask (exp, code)
|
|||||||
rtx exp;
|
rtx exp;
|
||||||
RTX_CODE code;
|
RTX_CODE code;
|
||||||
{
|
{
|
||||||
|
char *string;
|
||||||
if (GET_CODE (exp) == code)
|
if (GET_CODE (exp) == code)
|
||||||
return compute_alternative_mask (XEXP (exp, 0), code)
|
return compute_alternative_mask (XEXP (exp, 0), code)
|
||||||
| compute_alternative_mask (XEXP (exp, 1), code);
|
| compute_alternative_mask (XEXP (exp, 1), code);
|
||||||
@ -2130,14 +2142,18 @@ compute_alternative_mask (exp, code)
|
|||||||
else if (code == AND && GET_CODE (exp) == NOT
|
else if (code == AND && GET_CODE (exp) == NOT
|
||||||
&& GET_CODE (XEXP (exp, 0)) == EQ_ATTR
|
&& GET_CODE (XEXP (exp, 0)) == EQ_ATTR
|
||||||
&& XSTR (XEXP (exp, 0), 0) == alternative_name)
|
&& XSTR (XEXP (exp, 0), 0) == alternative_name)
|
||||||
return 1 << atoi (XSTR (XEXP (exp, 0), 1));
|
string = XSTR (XEXP (exp, 0), 1);
|
||||||
|
|
||||||
else if (code == IOR && GET_CODE (exp) == EQ_ATTR
|
else if (code == IOR && GET_CODE (exp) == EQ_ATTR
|
||||||
&& XSTR (exp, 0) == alternative_name)
|
&& XSTR (exp, 0) == alternative_name)
|
||||||
return 1 << atoi (XSTR (exp, 1));
|
string = XSTR (exp, 1);
|
||||||
|
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (string[1] == 0)
|
||||||
|
return 1 << (string[0] - '0');
|
||||||
|
return 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'
|
||||||
@ -3448,8 +3464,19 @@ write_test_expr (exp, in_comparison)
|
|||||||
|
|
||||||
attr = find_attr (XSTR (exp, 0), 0);
|
attr = find_attr (XSTR (exp, 0), 0);
|
||||||
if (! attr) abort ();
|
if (! attr) abort ();
|
||||||
printf ("get_attr_%s (insn) == ", attr->name);
|
|
||||||
write_attr_valueq (attr, XSTR (exp, 1));
|
/* Now is the time to expand the value of a constant attribute. */
|
||||||
|
if (attr->is_const)
|
||||||
|
{
|
||||||
|
write_test_expr (evaluate_eq_attr (exp, attr->default_val->value,
|
||||||
|
0, 0),
|
||||||
|
in_comparison);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf ("get_attr_%s (insn) == ", attr->name);
|
||||||
|
write_attr_valueq (attr, XSTR (exp, 1));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* See if an operand matches a predicate. */
|
/* See if an operand matches a predicate. */
|
||||||
|
Loading…
Reference in New Issue
Block a user