Commit 8270111e by Richard Stallman

(partial_ccmode_register_operand, even_relop)

(partial_ccmode_register_operand, even_relop)
(odd_relop): New functions, for support of CCEVENmode.
(print_operand, new case '!'): Revert following condition.

From-SVN: r6030
parent 803c85ca
...@@ -1341,6 +1341,16 @@ real_or_0_operand (op, mode) ...@@ -1341,6 +1341,16 @@ real_or_0_operand (op, mode)
&& op == CONST0_RTX (mode))); && op == CONST0_RTX (mode)));
} }
/* Return true if OP is valid to use in the context of logic aritmethic
on condition codes. */
int partial_ccmode_register_operand(op,mode)
rtx op;
enum machine_mode mode;
{
return (register_operand(op,CCmode) || register_operand(op,CCEVENmode));
}
/* Return true if OP is a relational operator. */ /* Return true if OP is a relational operator. */
int int
...@@ -1366,6 +1376,40 @@ relop (op, mode) ...@@ -1366,6 +1376,40 @@ relop (op, mode)
} }
} }
int even_relop(op,mode)
rtx op;
enum machine_mode mode;
{
switch (GET_CODE(op))
{
case EQ:
case LT:
case GT:
case LTU:
case GTU:
return 1;
default:
return 0;
}
}
int odd_relop(op,mode)
rtx op;
enum machine_mode mode;
{
switch (GET_CODE(op))
{
case NE:
case LE:
case GE:
case LEU:
case GEU:
return 1;
default:
return 0;
}
}
/* Return true if OP is a relational operator, and is not an unsigned /* Return true if OP is a relational operator, and is not an unsigned
relational operator. */ relational operator. */
...@@ -2803,6 +2847,10 @@ print_operand (file, x, code) ...@@ -2803,6 +2847,10 @@ print_operand (file, x, code)
? ".n\t" : "\t", file); ? ".n\t" : "\t", file);
return; return;
case '!': /* Reverse the following condition. */
sequencep++;
reversep=1;
return;
case 'R': /* reverse the condition of the next print_operand case 'R': /* reverse the condition of the next print_operand
if operand is a label_ref. */ if operand is a label_ref. */
sequencep++; sequencep++;
......
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