const char *position;
struct decision_head *last;
{
- register struct decision *new
+ struct decision *new
= (struct decision *) xmalloc (sizeof (struct decision));
memset (new, 0, sizeof (*new));
struct decision_test *test;
struct decision_test **place;
char *subpos;
- register size_t i;
- register const char *fmt;
+ size_t i;
+ const char *fmt;
int depth = strlen (position);
int len;
enum machine_mode mode;
case 'E':
{
- register int j;
+ int j;
for (j = 0; j < XVECLEN (pattern, i); j++)
{
subpos[depth] = 'a' + j;
/* Hunt for the last [A-Z] in both strings. */
for (old_has_insn = odepth - 1; old_has_insn >= 0; --old_has_insn)
- if (oldpos[old_has_insn] >= 'A' && oldpos[old_has_insn] <= 'Z')
+ if (ISUPPER (oldpos[old_has_insn]))
break;
for (new_has_insn = ndepth - 1; new_has_insn >= 0; --new_has_insn)
- if (newpos[new_has_insn] >= 'A' && newpos[new_has_insn] <= 'Z')
+ if (ISUPPER (newpos[new_has_insn]))
break;
/* Go down to desired level. */
while (depth < ndepth)
{
/* It's a different insn from the first one. */
- if (newpos[depth] >= 'A' && newpos[depth] <= 'Z')
+ if (ISUPPER (newpos[depth]))
{
/* We can only fail if we're moving down the tree. */
if (old_has_insn >= 0 && oldpos[old_has_insn] >= newpos[depth])
}
printf ("%sx%d = PATTERN (tem);\n", indent, depth + 1);
}
- else if (newpos[depth] >= 'a' && newpos[depth] <= 'z')
+ else if (ISLOWER (newpos[depth]))
printf ("%sx%d = XVECEXP (x%d, 0, %d);\n",
indent, depth + 1, depth, newpos[depth] - 'a');
else
print_code (code)
enum rtx_code code;
{
- register const char *p;
+ const char *p;
for (p = GET_RTX_NAME (code); *p; p++)
putchar (TOUPPER (*p));
}
|| type == DT_elt_one_int
|| type == DT_elt_zero_wide_safe)
{
+ const char *indent = "";
/* Pmode may not be a compile-time constant. */
if (type == DT_mode && p->tests->u.mode == Pmode)
return p;
- printf (" switch (");
+ /* We cast switch parameter to integer, so we must ensure that the value
+ fits. */
+ if (type == DT_elt_zero_wide_safe)
+ {
+ indent = " ";
+ printf(" if ((int) XWINT (x%d, 0) == XWINT (x%d, 0))\n", depth, depth);
+ }
+ printf ("%s switch (", indent);
switch (type)
{
case DT_mode:
default:
abort ();
}
- printf (")\n {\n");
+ printf (")\n%s {\n", indent);
do
{
if (p != start && p->need_label && needs_label == NULL)
needs_label = p;
- printf (" case ");
+ printf ("%s case ", indent);
switch (type)
{
case DT_mode:
default:
abort ();
}
- printf (":\n goto L%d;\n", p->success.first->number);
+ printf (":\n%s goto L%d;\n", indent, p->success.first->number);
p->success.first->need_label = 1;
p = p->next;
while (p && p->tests->type == type && !p->tests->next);
case_done:
- printf (" default:\n break;\n }\n");
+ printf ("%s default:\n%s break;\n%s }\n",
+ indent, indent, indent);
return needs_label != NULL ? needs_label : p;
}
int match_len = 0, i;
for (i = strlen (p->position) - 1; i >= 0; --i)
- if (p->position[i] >= 'A' && p->position[i] <= 'Z')
+ if (ISUPPER (p->position[i]))
{
match_len = p->position[i] - 'A';
break;
enum routine_type type;
int initial;
{
- register struct decision *p = head->first;
+ struct decision *p = head->first;
putchar ('\n');
if (p->need_label)
printf ("%sint recog%s PARAMS ((rtx, rtx, int *));\n", s_or_e, extension);
printf ("%sint\n\
recog%s (x0, insn, pnum_clobbers)\n\
- register rtx x0;\n\
+ rtx x0 ATTRIBUTE_UNUSED;\n\
rtx insn ATTRIBUTE_UNUSED;\n\
int *pnum_clobbers ATTRIBUTE_UNUSED;\n", s_or_e, extension);
break;
printf ("%srtx split%s PARAMS ((rtx, rtx));\n", s_or_e, extension);
printf ("%srtx\n\
split%s (x0, insn)\n\
- register rtx x0;\n\
+ rtx x0 ATTRIBUTE_UNUSED;\n\
rtx insn ATTRIBUTE_UNUSED;\n", s_or_e, extension);
break;
case PEEPHOLE2:
s_or_e, extension);
printf ("%srtx\n\
peephole2%s (x0, insn, _pmatch_len)\n\
- register rtx x0;\n\
+ rtx x0 ATTRIBUTE_UNUSED;\n\
rtx insn ATTRIBUTE_UNUSED;\n\
int *_pmatch_len ATTRIBUTE_UNUSED;\n", s_or_e, extension);
break;
}
- printf ("{\n register rtx * const operands ATTRIBUTE_UNUSED = &recog_data.operand[0];\n");
+ printf ("{\n rtx * const operands ATTRIBUTE_UNUSED = &recog_data.operand[0];\n");
for (i = 1; i <= max_depth; i++)
- printf (" register rtx x%d ATTRIBUTE_UNUSED;\n", i);
+ printf (" rtx x%d ATTRIBUTE_UNUSED;\n", i);
printf (" %s tem ATTRIBUTE_UNUSED;\n", IS_SPLIT (type) ? "rtx" : "int");