Compare enums (preds.

Compare enums (preds. codes, mem_mode)
explicitly to 0 in conditionals to work-around a VAXC bug that
disallows enum as arguments to && and || operators.

From-SVN: r1916
This commit is contained in:
Richard Stallman 1992-08-20 19:35:52 +00:00
parent 106d7d7de8
commit a23b64d548
2 changed files with 5 additions and 5 deletions

View File

@ -588,7 +588,7 @@ not_both_true (d1, d2, toplevel)
for D1's predicate. */
if (d2->code != UNKNOWN)
{
for (i = 0; i < NUM_RTX_CODE && preds[d1->pred].codes[i]; i++)
for (i = 0; i < NUM_RTX_CODE && preds[d1->pred].codes[i] != 0; i++)
if (preds[d1->pred].codes[i] == d2->code)
break;
@ -600,7 +600,7 @@ not_both_true (d1, d2, toplevel)
else if (d2->pred >= 0)
{
for (i = 0; i < NUM_RTX_CODE && preds[d1->pred].codes[i]; i++)
for (i = 0; i < NUM_RTX_CODE && preds[d1->pred].codes[i] != 0; i++)
{
for (j = 0; j < NUM_RTX_CODE; j++)
if (preds[d2->pred].codes[j] == 0
@ -1117,7 +1117,7 @@ write_tree_1 (tree, prevpos, afterward, type)
if (p->pred >= 0)
{
for (i = 0; i < NUM_RTX_CODE && preds[p->pred].codes[i]; i++)
for (i = 0; i < NUM_RTX_CODE && preds[p->pred].codes[i] != 0; i++)
if (codemap[(int) preds[p->pred].codes[i]])
break;
@ -1140,7 +1140,7 @@ write_tree_1 (tree, prevpos, afterward, type)
if (code == MATCH_OPERAND)
{
for (i = 0; i < NUM_RTX_CODE && preds[p->pred].codes[i]; i++)
for (i = 0; i < NUM_RTX_CODE && preds[p->pred].codes[i] != 0; i++)
{
printf ("%scase ", indents[indent - 2]);
print_code (preds[p->pred].codes[i]);

View File

@ -2496,7 +2496,7 @@ eliminate_regs (x, mem_mode, insn)
We special-case the commonest situation in
eliminate_regs_in_insn, so just replace a PLUS with a
PLUS here, unless inside a MEM. */
if (mem_mode && GET_CODE (XEXP (x, 1)) == CONST_INT
if (mem_mode != 0 && GET_CODE (XEXP (x, 1)) == CONST_INT
&& INTVAL (XEXP (x, 1)) == - ep->previous_offset)
return ep->to_rtx;
else