/* Generate code from machine description to compute values of attributes.
Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GCC.
independent of the insn code.
`in_struct' (ATTR_CURR_SIMPLIFIED_P): This rtx is fully simplified
for the insn code currently being processed (see optimize_attrs).
- `integrated' (ATTR_PERMANENT_P): This rtx is permanent and unique
+ `return_val' (ATTR_PERMANENT_P): This rtx is permanent and unique
(see attr_rtx).
`volatil' (ATTR_EQ_ATTR_P): During simplify_by_exploding the value of an
EQ_ATTR rtx is true if !volatil and false if volatil. */
#define ATTR_IND_SIMPLIFIED_P(RTX) (RTX_FLAG((RTX), unchanging))
#define ATTR_CURR_SIMPLIFIED_P(RTX) (RTX_FLAG((RTX), in_struct))
-#define ATTR_PERMANENT_P(RTX) (RTX_FLAG((RTX), integrated))
+#define ATTR_PERMANENT_P(RTX) (RTX_FLAG((RTX), return_val))
#define ATTR_EQ_ATTR_P(RTX) (RTX_FLAG((RTX), volatil))
#if 0
In some cases we cannot uniquify; then we return an ordinary
impermanent rtx with ATTR_PERMANENT_P clear.
- Args are like gen_rtx, but without the mode:
+ Args are as follows:
rtx attr_rtx (code, [element1, ..., elementn]) */
Use that entry if one is found; otherwise create a new RTL and add it
to the table. */
- if (GET_RTX_CLASS (code) == '1')
+ if (GET_RTX_CLASS (code) == RTX_UNARY)
{
rtx arg0 = va_arg (p, rtx);
XEXP (rt_val, 0) = arg0;
}
}
- else if (GET_RTX_CLASS (code) == 'c'
- || GET_RTX_CLASS (code) == '2'
- || GET_RTX_CLASS (code) == '<')
+ else if (GET_RTX_CLASS (code) == RTX_BIN_ARITH
+ || GET_RTX_CLASS (code) == RTX_COMM_ARITH
+ || GET_RTX_CLASS (code) == RTX_COMPARE
+ || GET_RTX_CLASS (code) == RTX_COMM_COMPARE)
{
rtx arg0 = va_arg (p, rtx);
rtx arg1 = va_arg (p, rtx);
XEXP (exp, 0) = check_attr_test (XEXP (exp, 0), is_const, lineno);
break;
- case MATCH_INSN:
case MATCH_OPERAND:
if (is_const)
fatal ("RTL operator \"%s\" not valid in constant attribute test",
XSTR (exp, 1), XINT (exp, 0), GET_MODE_NAME (GET_MODE (exp)));
break;
- case MATCH_INSN:
- printf ("%s (insn)", XSTR (exp, 0));
- break;
-
/* Constant integer. */
case CONST_INT:
printf (HOST_WIDE_INT_PRINT_DEC, XWINT (exp, 0));