-/* True if this is an address_operand or a symbolic operand. */
-
-int
-mmix_symbolic_or_address_operand (rtx op, enum machine_mode mode)
-{
- switch (GET_CODE (op))
- {
- case SYMBOL_REF:
- case LABEL_REF:
- return 1;
- case CONST:
- op = XEXP (op, 0);
- if ((GET_CODE (XEXP (op, 0)) == SYMBOL_REF
- || GET_CODE (XEXP (op, 0)) == LABEL_REF)
- && (GET_CODE (XEXP (op, 1)) == CONST_INT
- || (GET_CODE (XEXP (op, 1)) == CONST_DOUBLE
- && GET_MODE (XEXP (op, 1)) == VOIDmode)))
- return 1;
- /* Fall through. */
- default:
- return address_operand (op, mode);
- }
-}
-
-/* True if this is a register or CONST_INT (or CONST_DOUBLE for DImode).
- We could narrow the value down with a couple of predicated, but that
- doesn't seem to be worth it at the moment. */
-
-int
-mmix_reg_or_constant_operand (rtx op, enum machine_mode mode)
-{
- return register_operand (op, mode)
- || (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == VOIDmode)
- || GET_CODE (op) == CONST_INT;
-}
-
-/* True if this is a register with a condition-code mode. */
-
-int
-mmix_reg_cc_operand (rtx op, enum machine_mode mode)
-{
- if (mode == VOIDmode)
- mode = GET_MODE (op);
-
- return register_operand (op, mode)
- && (mode == CCmode || mode == CC_UNSmode || mode == CC_FPmode
- || mode == CC_FPEQmode || mode == CC_FUNmode);
-}
-
-/* True if this is a foldable comparison operator
- - one where a the result of (compare:CC (reg) (const_int 0)) can be
- replaced by (reg). */
-
-int
-mmix_foldable_comparison_operator (rtx op, enum machine_mode mode)
-{
- RTX_CODE code = GET_CODE (op);
-
- if (mode == VOIDmode)
- mode = GET_MODE (op);
-
- if (mode == VOIDmode && COMPARISON_P (op))
- mode = GET_MODE (XEXP (op, 0));
-
- return ((mode == CCmode || mode == DImode)
- && (code == NE || code == EQ || code == GE || code == GT
- || code == LE))
- /* FIXME: This may be a stupid trick. What happens when GCC wants to
- reverse the condition? Can it do that by itself? Maybe it can
- even reverse the condition to fit a foldable one in the first
- place? */
- || (mode == CC_UNSmode && (code == GTU || code == LEU));
-}
-
-/* Like comparison_operator, but only true if this comparison operator is
- applied to a valid mode. Needed to avoid jump.c generating invalid
- code with -ffast-math (gcc.dg/20001228-1.c). */
-
-int
-mmix_comparison_operator (rtx op, enum machine_mode mode)
-{
- RTX_CODE code = GET_CODE (op);
-
- /* Comparison operators usually don't have a mode, but let's try and get
- one anyway for the day that changes. */
- if (mode == VOIDmode)
- mode = GET_MODE (op);
-
- /* Get the mode from the first operand if we don't have one. */
- if (mode == VOIDmode && COMPARISON_P (op))
- mode = GET_MODE (XEXP (op, 0));
-
- /* FIXME: This needs to be kept in sync with the tables in
- mmix_output_condition. */
- return
- (mode == VOIDmode && COMPARISON_P (op))
- || (mode == CC_FUNmode
- && (code == ORDERED || code == UNORDERED))
- || (mode == CC_FPmode
- && (code == GT || code == LT))
- || (mode == CC_FPEQmode
- && (code == NE || code == EQ))
- || (mode == CC_UNSmode
- && (code == GEU || code == GTU || code == LEU || code == LTU))
- || (mode == CCmode
- && (code == NE || code == EQ || code == GE || code == GT
- || code == LE || code == LT))
- || (mode == DImode
- && (code == NE || code == EQ || code == GE || code == GT
- || code == LE || code == LT || code == LEU || code == GTU));
-}
-
-/* True if this is a register or 0 (int or float). */
-
-int
-mmix_reg_or_0_operand (rtx op, enum machine_mode mode)
-{
- /* FIXME: Is mode calculation necessary and correct? */
- return
- op == CONST0_RTX (mode == VOIDmode ? GET_MODE (op) : mode)
- || register_operand (op, mode);
-}
-
-/* True if this is a register or an int 0..255. */
-
-int
-mmix_reg_or_8bit_operand (rtx op, enum machine_mode mode)
-{
- return register_operand (op, mode)
- || (GET_CODE (op) == CONST_INT
- && CONST_OK_FOR_LETTER_P (INTVAL (op), 'I'));
-}
-