Commit 0b0316dc by Jeff Law

genattrtab.c (write_eligible_delay): Add new variable "flags" to the generated functions.

	* genattrtab.c (write_eligible_delay): Add new variable
	"flags" to the generated functions.  All callers changed.
	(check_attr_test): Handle ATTR_FLAG.
	(clear_struct_flag): Likewise.
	(count_sub_rtxs): Likewise.
	(write_test_expr): Likewise.

From-SVN: r3903
parent 417a6986
...@@ -994,6 +994,9 @@ check_attr_test (exp, is_const) ...@@ -994,6 +994,9 @@ check_attr_test (exp, is_const)
} }
break; break;
case ATTR_FLAG:
break;
case CONST_INT: case CONST_INT:
/* Either TRUE or FALSE. */ /* Either TRUE or FALSE. */
if (XWINT (exp, 0)) if (XWINT (exp, 0))
...@@ -3855,6 +3858,7 @@ clear_struct_flag (x) ...@@ -3855,6 +3858,7 @@ clear_struct_flag (x)
case PC: case PC:
case CC0: case CC0:
case EQ_ATTR: case EQ_ATTR:
case ATTR_FLAG:
return; return;
} }
...@@ -3905,6 +3909,7 @@ count_sub_rtxs (x, max) ...@@ -3905,6 +3909,7 @@ count_sub_rtxs (x, max)
case PC: case PC:
case CC0: case CC0:
case EQ_ATTR: case EQ_ATTR:
case ATTR_FLAG:
return 1; return 1;
} }
...@@ -4410,6 +4415,13 @@ write_test_expr (exp, in_comparison) ...@@ -4410,6 +4415,13 @@ write_test_expr (exp, in_comparison)
} }
break; break;
/* Comparison test of flags for define_delays. */
case ATTR_FLAG:
if (in_comparison)
fatal ("ATTR_FLAG not valid inside comparison");
printf ("(flags & ATTR_FLAG_%s) != 0", XSTR (exp, 0));
break;
/* See if an operand matches a predicate. */ /* See if an operand matches a predicate. */
case MATCH_OPERAND: case MATCH_OPERAND:
/* If only a mode is given, just ensure the mode matches the operand. /* If only a mode is given, just ensure the mode matches the operand.
...@@ -4551,6 +4563,9 @@ walk_attr_value (exp) ...@@ -4551,6 +4563,9 @@ walk_attr_value (exp)
case PC: case PC:
address_used = 1; address_used = 1;
return; return;
case ATTR_FLAG:
return;
} }
for (i = 0, fmt = GET_RTX_FORMAT (code); i < GET_RTX_LENGTH (code); i++) for (i = 0, fmt = GET_RTX_FORMAT (code); i < GET_RTX_LENGTH (code); i++)
...@@ -4919,10 +4934,12 @@ write_eligible_delay (kind) ...@@ -4919,10 +4934,12 @@ write_eligible_delay (kind)
/* Write function prelude. */ /* Write function prelude. */
printf ("int\n"); printf ("int\n");
printf ("eligible_for_%s (delay_insn, slot, candidate_insn)\n", kind); printf ("eligible_for_%s (delay_insn, slot, candidate_insn, flags)\n",
kind);
printf (" rtx delay_insn;\n"); printf (" rtx delay_insn;\n");
printf (" int slot;\n"); printf (" int slot;\n");
printf (" rtx candidate_insn;\n"); printf (" rtx candidate_insn;\n");
printf (" int flags;\n");
printf ("{\n"); printf ("{\n");
printf (" rtx insn;\n"); printf (" rtx insn;\n");
printf ("\n"); printf ("\n");
......
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