Commit db77171d by Kazu Hirata Committed by Kazu Hirata

genattrtab.c (attr_desc): Remove negative_ok and unsigned_p.

	* genattrtab.c (attr_desc): Remove negative_ok and unsigned_p.
	(check_attr_value, write_attr_get, write_expr_attr_cache,
	find_attr, make_internal_attr): Don't reference negative_ok or
	unsigned_p.
	* genattrtab.h (ATTR_NEGATIVE_OK, ATTR_UNSIGNED,
	ATTR_FUNC_UNITS, ATTR_BLOCKAGE): Remove.
	(ATTR_STATIC): Adjust the value.

From-SVN: r97841
parent 54c1f920
...@@ -14,6 +14,14 @@ ...@@ -14,6 +14,14 @@
* tree.h (STRIP_MAIN_TYPE_NOPS): Remove. * tree.h (STRIP_MAIN_TYPE_NOPS): Remove.
* genattrtab.c (attr_desc): Remove negative_ok and unsigned_p.
(check_attr_value, write_attr_get, write_expr_attr_cache,
find_attr, make_internal_attr): Don't reference negative_ok or
unsigned_p.
* genattrtab.h (ATTR_NEGATIVE_OK, ATTR_UNSIGNED,
ATTR_FUNC_UNITS, ATTR_BLOCKAGE): Remove.
(ATTR_STATIC): Adjust the value.
2005-04-08 Ulrich Weigand <uweigand@de.ibm.com> 2005-04-08 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/tpf.h (ASM_SPEC): Define. * config/s390/tpf.h (ASM_SPEC): Define.
......
...@@ -184,8 +184,6 @@ struct attr_desc ...@@ -184,8 +184,6 @@ struct attr_desc
struct attr_value *default_val; /* Default value for this attribute. */ struct attr_value *default_val; /* Default value for this attribute. */
int lineno : 24; /* Line number. */ int lineno : 24; /* Line number. */
unsigned is_numeric : 1; /* Values of this attribute are numeric. */ unsigned is_numeric : 1; /* Values of this attribute are numeric. */
unsigned negative_ok : 1; /* Allow negative numeric values. */
unsigned unsigned_p : 1; /* Make the output function unsigned int. */
unsigned is_const : 1; /* Attribute value constant for each run. */ unsigned is_const : 1; /* Attribute value constant for each run. */
unsigned is_special : 1; /* Don't call `write_attr_set'. */ unsigned is_special : 1; /* Don't call `write_attr_set'. */
unsigned static_p : 1; /* Make the output function static. */ unsigned static_p : 1; /* Make the output function static. */
...@@ -967,7 +965,7 @@ check_attr_value (rtx exp, struct attr_desc *attr) ...@@ -967,7 +965,7 @@ check_attr_value (rtx exp, struct attr_desc *attr)
break; break;
} }
if (INTVAL (exp) < 0 && ! attr->negative_ok) if (INTVAL (exp) < 0)
{ {
message_with_line (attr->lineno, message_with_line (attr->lineno,
"negative numeric value specified for attribute %s", "negative numeric value specified for attribute %s",
...@@ -984,8 +982,6 @@ check_attr_value (rtx exp, struct attr_desc *attr) ...@@ -984,8 +982,6 @@ check_attr_value (rtx exp, struct attr_desc *attr)
if (attr == 0 || attr->is_numeric) if (attr == 0 || attr->is_numeric)
{ {
p = XSTR (exp, 0); p = XSTR (exp, 0);
if (attr && attr->negative_ok && *p == '-')
p++;
for (; *p; p++) for (; *p; p++)
if (! ISDIGIT (*p)) if (! ISDIGIT (*p))
{ {
...@@ -1088,8 +1084,7 @@ check_attr_value (rtx exp, struct attr_desc *attr) ...@@ -1088,8 +1084,7 @@ check_attr_value (rtx exp, struct attr_desc *attr)
have_error = 1; have_error = 1;
} }
else if (attr else if (attr
&& (attr->is_numeric != attr2->is_numeric && attr->is_numeric != attr2->is_numeric)
|| (! attr->negative_ok && attr2->negative_ok)))
{ {
message_with_line (attr->lineno, message_with_line (attr->lineno,
"numeric attribute mismatch calling `%s' from `%s'", "numeric attribute mismatch calling `%s' from `%s'",
...@@ -3716,8 +3711,6 @@ write_attr_get (struct attr_desc *attr) ...@@ -3716,8 +3711,6 @@ write_attr_get (struct attr_desc *attr)
printf ("static "); printf ("static ");
if (!attr->is_numeric) if (!attr->is_numeric)
printf ("enum attr_%s\n", attr->name); printf ("enum attr_%s\n", attr->name);
else if (attr->unsigned_p)
printf ("unsigned int\n");
else else
printf ("int\n"); printf ("int\n");
...@@ -3965,8 +3958,6 @@ write_expr_attr_cache (rtx p, struct attr_desc *attr) ...@@ -3965,8 +3958,6 @@ write_expr_attr_cache (rtx p, struct attr_desc *attr)
if (!attr->is_numeric) if (!attr->is_numeric)
printf (" enum attr_%s ", attr->name); printf (" enum attr_%s ", attr->name);
else if (attr->unsigned_p)
printf (" unsigned int ");
else else
printf (" int "); printf (" int ");
...@@ -4278,8 +4269,8 @@ find_attr (const char **name_p, int create) ...@@ -4278,8 +4269,8 @@ find_attr (const char **name_p, int create)
attr = oballoc (sizeof (struct attr_desc)); attr = oballoc (sizeof (struct attr_desc));
attr->name = DEF_ATTR_STRING (name); attr->name = DEF_ATTR_STRING (name);
attr->first_value = attr->default_val = NULL; attr->first_value = attr->default_val = NULL;
attr->is_numeric = attr->negative_ok = attr->is_const = attr->is_special = 0; attr->is_numeric = attr->is_const = attr->is_special = 0;
attr->unsigned_p = attr->static_p = 0; attr->static_p = 0;
attr->next = attrs[index]; attr->next = attrs[index];
attrs[index] = attr; attrs[index] = attr;
...@@ -4301,8 +4292,6 @@ make_internal_attr (const char *name, rtx value, int special) ...@@ -4301,8 +4292,6 @@ make_internal_attr (const char *name, rtx value, int special)
attr->is_numeric = 1; attr->is_numeric = 1;
attr->is_const = 0; attr->is_const = 0;
attr->is_special = (special & ATTR_SPECIAL) != 0; attr->is_special = (special & ATTR_SPECIAL) != 0;
attr->negative_ok = (special & ATTR_NEGATIVE_OK) != 0;
attr->unsigned_p = (special & ATTR_UNSIGNED) != 0;
attr->static_p = (special & ATTR_STATIC) != 0; attr->static_p = (special & ATTR_STATIC) != 0;
attr->default_val = get_attr_value (value, attr, -2); attr->default_val = get_attr_value (value, attr, -2);
} }
......
...@@ -51,8 +51,4 @@ extern void write_automata (void); ...@@ -51,8 +51,4 @@ extern void write_automata (void);
/* Flags for make_internal_attr's `special' parameter. */ /* Flags for make_internal_attr's `special' parameter. */
#define ATTR_NONE 0 #define ATTR_NONE 0
#define ATTR_SPECIAL (1 << 0) #define ATTR_SPECIAL (1 << 0)
#define ATTR_NEGATIVE_OK (1 << 1) #define ATTR_STATIC (1 << 1)
#define ATTR_UNSIGNED (1 << 2)
#define ATTR_FUNC_UNITS (1 << 3)
#define ATTR_BLOCKAGE (1 << 4)
#define ATTR_STATIC (1 << 5)
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