OSDN Git Service

2006-01-26 Paolo Bonzini <bonzini@gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / rtl.def
index 4c678db..8710f54 100644 (file)
@@ -1,7 +1,8 @@
 /* This file contains the definitions and documentation for the
    Register Transfer Expressions (rtx's) that make up the
    Register Transfer Language (rtl) used in the Back End of the GNU compiler.
-   Copyright (C) 1987, 1988, 1992, 1994, 1995, 1997, 1998, 1999, 2000, 2004
+   Copyright (C) 1987, 1988, 1992, 1994, 1995, 1997, 1998, 1999, 2000, 2004,
+   2005
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -18,8 +19,8 @@ for more details.
 
 You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.  */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA.  */
 
 
 /* Expression definitions and descriptions for all targets are in this file.
@@ -314,7 +315,7 @@ DEF_RTL_EXPR(CONST_INT, "const_int", "w", RTX_CONST_OBJ)
 DEF_RTL_EXPR(CONST_DOUBLE, "const_double", CONST_DOUBLE_FORMAT, RTX_CONST_OBJ)
 
 /* Describes a vector constant.  */
-DEF_RTL_EXPR(CONST_VECTOR, "const_vector", "E", RTX_EXTRA)
+DEF_RTL_EXPR(CONST_VECTOR, "const_vector", "E", RTX_CONST_OBJ)
 
 /* String constant.  Used for attributes in machine descriptions and
    for special cases in DWARF2 debug output.  NOT used for source-
@@ -331,14 +332,17 @@ DEF_RTL_EXPR(CONST, "const", "e", RTX_CONST_OBJ)
    by a SET whose first operand is (PC).  */
 DEF_RTL_EXPR(PC, "pc", "", RTX_OBJ)
 
-/* Used in the cselib routines to describe a value.  */
+/* Used in the cselib routines to describe a value.  Objects of this
+   kind are only allocated in cselib.c, in an alloc pool instead of
+   in GC memory.  The only operand of a VALUE is a cselib_val_struct.  */
 DEF_RTL_EXPR(VALUE, "value", "0", RTX_OBJ)
 
 /* A register.  The "operand" is the register number, accessed with
    the REGNO macro.  If this number is less than FIRST_PSEUDO_REGISTER
    than a hardware register is being referred to.  The second operand
    holds the original register number - this will be different for a
-   pseudo register that got turned into a hard register.
+   pseudo register that got turned into a hard register.  The third
+   operand points to a reg_attrs structure.
    This rtx needs to have as many (or more) fields as a MEM, since we
    can change REG rtx's into MEMs during reload.  */
 DEF_RTL_EXPR(REG, "reg", "i00", RTX_OBJ)
@@ -386,9 +390,8 @@ DEF_RTL_EXPR(MEM, "mem", "e0", RTX_OBJ)
 
 /* Reference to an assembler label in the code for this function.
    The operand is a CODE_LABEL found in the insn chain.
-   The unprinted fields 1 and 2 are used in flow.c for the
-   LABEL_NEXTREF and CONTAINING_INSN.  */
-DEF_RTL_EXPR(LABEL_REF, "label_ref", "u00", RTX_CONST_OBJ)
+   The unprinted field 1 is used in flow.c for the LABEL_NEXTREF.  */
+DEF_RTL_EXPR(LABEL_REF, "label_ref", "u0", RTX_CONST_OBJ)
 
 /* Reference to a named label: 
    Operand 0: label name
@@ -441,11 +444,8 @@ DEF_RTL_EXPR(UMOD, "umod", "ee", RTX_BIN_ARITH)
 
 /* Bitwise operations.  */
 DEF_RTL_EXPR(AND, "and", "ee", RTX_COMM_ARITH)
-
 DEF_RTL_EXPR(IOR, "ior", "ee", RTX_COMM_ARITH)
-
 DEF_RTL_EXPR(XOR, "xor", "ee", RTX_COMM_ARITH)
-
 DEF_RTL_EXPR(NOT, "not", "e", RTX_UNARY)
 
 /* Operand:
@@ -459,7 +459,10 @@ DEF_RTL_EXPR(ROTATERT, "rotatert", "ee", RTX_BIN_ARITH) /* rotate right */
 
 /* Minimum and maximum values of two operands.  We need both signed and
    unsigned forms.  (We cannot use MIN for SMIN because it conflicts
-   with a macro of the same name.) */
+   with a macro of the same name.)   The signed variants should be used
+   with floating point.  Further, if both operands are zeros, or if either
+   operand is NaN, then it is unspecified which of the two operands is
+   returned as the result.  */
 
 DEF_RTL_EXPR(SMIN, "smin", "ee", RTX_COMM_ARITH)
 DEF_RTL_EXPR(SMAX, "smax", "ee", RTX_COMM_ARITH)
@@ -585,10 +588,12 @@ DEF_RTL_EXPR(PARITY, "parity", "e", RTX_UNARY)
    If BITS_BIG_ENDIAN is defined, the first bit is the msb and
    operand 2 counts from the msb of the memory unit.
    Otherwise, the first bit is the lsb and operand 2 counts from
-   the lsb of the memory unit.  */
+   the lsb of the memory unit.
+   This kind of expression can not appear as an lvalue in RTL.  */
 DEF_RTL_EXPR(SIGN_EXTRACT, "sign_extract", "eee", RTX_BITFIELD_OPS)
 
-/* Similar for unsigned bit-field.  */
+/* Similar for unsigned bit-field.
+   But note!  This kind of expression _can_ appear as an lvalue.  */
 DEF_RTL_EXPR(ZERO_EXTRACT, "zero_extract", "eee", RTX_BITFIELD_OPS)
 
 /* For RISC machines.  These save memory when splitting insns.  */
@@ -722,8 +727,13 @@ DEF_RTL_EXPR(MATCH_PAR_DUP, "match_par_dup", "iE", RTX_MATCH)
 
 /* Appears only in define_predicate/define_special_predicate
    expressions.  Evaluates true only if the operand has an RTX code
-   from the set given by the argument (a comma-separated list).  */
-DEF_RTL_EXPR(MATCH_CODE, "match_code", "s", RTX_MATCH)
+   from the set given by the argument (a comma-separated list).  If the
+   second argument is present and nonempty, it is a sequence of digits
+   and/or letters which indicates the subexpression to test, using the
+   same syntax as genextract/genrecog's location strings: 0-9 for
+   XEXP (op, n), a-z for XVECEXP (op, 0, n); each character applies to
+   the result of the one before it.  */
+DEF_RTL_EXPR(MATCH_CODE, "match_code", "ss", RTX_MATCH)
 
 /* Appears only in define_predicate/define_special_predicate
     expressions.  The argument is a C expression to be injected at this