OSDN Git Service

* config/i386/i386.c (legitimate_constant_p): Handle UNSPEC_NTPOFF
[pf3gnuchains/gcc-fork.git] / gcc / rtl.def
index 720d605..1388b6f 100644 (file)
@@ -73,6 +73,11 @@ DEF_RTL_EXPR(UNKNOWN, "UnKnown", "*", 'x')
 
 DEF_RTL_EXPR(NIL, "nil", "*", 'x')
 
+
+/* include a file */
+
+DEF_RTL_EXPR(INCLUDE, "include", "s", 'x')
+
 /* ---------------------------------------------------------------------
    Expressions used in constructing lists.
    --------------------------------------------------------------------- */
@@ -200,8 +205,9 @@ DEF_RTL_EXPR(DEFINE_PEEPHOLE, "define_peephole", "EsTV", 'x')
    3rd operand: vector of insn patterns to place into a SEQUENCE
    4th operand: optionally, some C code to execute before generating the
        insns.  This might, for example, create some RTX's and store them in
-       elements of `recog_operand' for use by the vector of insn-patterns.
-       (`operands' is an alias here for `recog_operand').   */
+       elements of `recog_data.operand' for use by the vector of
+       insn-patterns.
+       (`operands' is an alias here for `recog_data.operand').  */
 DEF_RTL_EXPR(DEFINE_SPLIT, "define_split", "EsES", 'x')
 
 /* Definition of an insn and associated split.
@@ -226,8 +232,9 @@ DEF_RTL_EXPR(DEFINE_SPLIT, "define_split", "EsES", 'x')
    5: vector of insn patterns to place into a SEQUENCE
    6: optionally, some C code to execute before generating the
        insns.  This might, for example, create some RTX's and store them in
-       elements of `recog_operand' for use by the vector of insn-patterns.
-       (`operands' is an alias here for `recog_operand').  
+       elements of `recog_data.operand' for use by the vector of
+       insn-patterns.
+       (`operands' is an alias here for `recog_data.operand').  
    7: optionally, a vector of attributes for this insn.  */
 DEF_RTL_EXPR(DEFINE_INSN_AND_SPLIT, "define_insn_and_split", "sEsTsESV", 'x')
 
@@ -242,13 +249,14 @@ DEF_RTL_EXPR(DEFINE_COMBINE, "define_combine", "Ess", 'x')
 /* Define how to generate multiple insns for a standard insn name.
    1st operand: the insn name.
    2nd operand: vector of insn-patterns.
-       Use match_operand to substitute an element of `recog_operand'.
+       Use match_operand to substitute an element of `recog_data.operand'.
    3rd operand: C expression that must be true for this to be available.
        This may not test any operands.
    4th operand: Extra C code to execute before generating the insns.
        This might, for example, create some RTX's and store them in
-       elements of `recog_operand' for use by the vector of insn-patterns.
-       (`operands' is an alias here for `recog_operand').  */
+       elements of `recog_data.operand' for use by the vector of
+       insn-patterns.
+       (`operands' is an alias here for `recog_data.operand').  */
 DEF_RTL_EXPR(DEFINE_EXPAND, "define_expand", "sEss", 'x')
    
 /* Define a requirement for delay slots.
@@ -350,9 +358,8 @@ DEF_RTL_EXPR(ADDRESS, "address", "e", 'm')
 DEF_RTL_EXPR(DEFINE_CPU_UNIT, "define_cpu_unit", "sS", 'x')
 
 /* (define_query_cpu_unit string [string]) describes cpu functional
-   units analogously to define_cpu_unit.  If we use automaton without
-   minimization, the reservation of such units can be queried for
-   automaton state.  */
+   units analogously to define_cpu_unit.  The reservation of such
+   units can be queried for automaton state.  */
 DEF_RTL_EXPR(DEFINE_QUERY_CPU_UNIT, "define_query_cpu_unit", "sS", 'x')
 
 /* (exclusion_set string string) means that each CPU functional unit
@@ -361,26 +368,81 @@ DEF_RTL_EXPR(DEFINE_QUERY_CPU_UNIT, "define_query_cpu_unit", "sS", 'x')
    in the string are separated by commas.  For example, it is useful
    for description CPU with fully pipelined floating point functional
    unit which can execute simultaneously only single floating point
-   insns or only double floating point insns.  */
+   insns or only double floating point insns.  All CPU functional
+   units in a set should belong to the same automaton.  */
 DEF_RTL_EXPR(EXCLUSION_SET, "exclusion_set", "ss", 'x')
 
 /* (presence_set string string) means that each CPU functional unit in
-   the first string can not be reserved unless at least one of units
-   whose names are in the second string is reserved.  This is an
-   asymmetric relation.  CPU units in the string are separated by
-   commas.  For example, it is useful for description that slot1 is
-   reserved after slot0 reservation for VLIW processor.  */
+   the first string can not be reserved unless at least one of pattern
+   of units whose names are in the second string is reserved.  This is
+   an asymmetric relation.  CPU units or unit patterns in the strings
+   are separated by commas.  Pattern is one unit name or unit names
+   separated by white-spaces.
+   For example, it is useful for description that slot1 is reserved
+   after slot0 reservation for a VLIW processor.  We could describe it
+   by the following construction
+
+      (presence_set "slot1" "slot0")
+
+   Or slot1 is reserved only after slot0 and unit b0 reservation.  In
+   this case we could write
+
+      (presence_set "slot1" "slot0 b0")
+
+   All CPU functional units in a set should belong to the same
+   automaton.  */
 DEF_RTL_EXPR(PRESENCE_SET, "presence_set", "ss", 'x')
 
+/* (final_presence_set string string) is analogous to `presence_set'.
+   The difference between them is when checking is done.  When an
+   instruction is issued in given automaton state reflecting all
+   current and planned unit reservations, the automaton state is
+   changed.  The first state is a source state, the second one is a
+   result state.  Checking for `presence_set' is done on the source
+   state reservation, checking for `final_presence_set' is done on the
+   result reservation.  This construction is useful to describe a
+   reservation which is actually two subsequent reservations.  For
+   example, if we use 
+
+      (presence_set "slot1" "slot0")
+
+   the following insn will be never issued (because slot1 requires
+   slot0 which is absent in the source state).
+
+      (define_reservation "insn_and_nop" "slot0 + slot1")
+
+   but it can be issued if we use analogous `final_presence_set'.  */
+DEF_RTL_EXPR(FINAL_PRESENCE_SET, "final_presence_set", "ss", 'x')
+
 /* (absence_set string string) means that each CPU functional unit in
-   the first string can not be reserved only if each unit whose name
-   is in the second string is not reserved.  This is an asymmetric
-   relation (actually exclusion set is analogous to this one but it is
-   symmetric).  CPU units in the string are separated by commas.  For
-   example, it is useful for description that slot0 can not be
-   reserved after slot1 or slot2 reservation for VLIW processor.  */
+   the first string can be reserved only if each pattern of units
+   whose names are in the second string is not reserved.  This is an
+   asymmetric relation (actually exclusion set is analogous to this
+   one but it is symmetric).  CPU units or unit patterns in the string
+   are separated by commas.  Pattern is one unit name or unit names
+   separated by white-spaces.
+
+   For example, it is useful for description that slot0 can not be
+   reserved after slot1 or slot2 reservation for a VLIW processor.  We
+   could describe it by the following construction
+
+      (absence_set "slot2" "slot0, slot1")
+
+   Or slot2 can not be reserved if slot0 and unit b0 are reserved or
+   slot1 and unit b1 are reserved .  In this case we could write
+
+      (absence_set "slot2" "slot0 b0, slot1 b1")
+
+   All CPU functional units in a set should to belong the same
+   automaton.  */
 DEF_RTL_EXPR(ABSENCE_SET, "absence_set", "ss", 'x')
 
+/* (final_absence_set string string) is analogous to `absence_set' but
+   checking is done on the result (state) reservation.  See comments
+   for `final_presence_set'.  */
+DEF_RTL_EXPR(FINAL_ABSENCE_SET, "final_absence_set", "ss", 'x')
+
 /* (define_bypass number out_insn_names in_insn_names) names bypass
    with given latency (the first number) from insns given by the first
    string (see define_insn_reservation) into insns given by the second
@@ -405,11 +467,18 @@ DEF_RTL_EXPR(DEFINE_AUTOMATON, "define_automaton", "s", 'x')
    automata.  Currently there are the following options:
 
    o "no-minimization" which makes no minimization of automata.  This
-     is only worth to do when we are going to query CPU functional
-     unit reservations in an automaton state.
+     is only worth to do when we are debugging the description and
+     need to look more accurately at reservations of states.
 
-   o "w" which means generation of file describing the result
-     automaton.  The file can be used for the description verification.
+   o "time" which means printing additional time statistics about
+      generation of automata.
+  
+   o "v" which means generation of file describing the result
+     automata.  The file has suffix `.dfa' and can be used for the
+     description verification and debugging.
+
+   o "w" which means generation of warning instead of error for
+     non-critical errors.
 
    o "ndfa" which makes nondeterministic finite state automata.  */
 DEF_RTL_EXPR(AUTOMATA_OPTION, "automata_option", "s", 'x')
@@ -479,10 +548,10 @@ DEF_RTL_EXPR(DEFINE_INSN_RESERVATION, "define_insn_reservation", "sies", 'x')
 /* Definition of an insn attribute.
    1st operand: name of the attribute
    2nd operand: comma-separated list of possible attribute values
-   3rd operand: expression for the default value of the attribute. */
+   3rd operand: expression for the default value of the attribute.  */
 DEF_RTL_EXPR(DEFINE_ATTR, "define_attr", "sse", 'x')
 
-/* Marker for the name of an attribute. */
+/* Marker for the name of an attribute.  */
 DEF_RTL_EXPR(ATTR, "attr", "s", 'x')
 
 /* For use in the last (optional) operand of DEFINE_INSN or DEFINE_PEEPHOLE and
@@ -534,37 +603,38 @@ DEF_RTL_EXPR (ATTR_FLAG, "attr_flag", "s", 'x')
    ---------------------------------------------------------------------- */
 
 /* An instruction that cannot jump.  */
-DEF_RTL_EXPR(INSN, "insn", "iuueiee", 'i')
+DEF_RTL_EXPR(INSN, "insn", "iuuBieiee", 'i')
 
 /* An instruction that can possibly jump.
    Fields ( rtx->fld[] ) have exact same meaning as INSN's.  */
-DEF_RTL_EXPR(JUMP_INSN, "jump_insn", "iuueiee0", 'i')
+DEF_RTL_EXPR(JUMP_INSN, "jump_insn", "iuuBieiee0", 'i')
 
 /* An instruction that can possibly call a subroutine
    but which will not change which instruction comes next
    in the current function.
-   Field ( rtx->fld[7] ) is CALL_INSN_FUNCTION_USAGE.
+   Field ( rtx->fld[9] ) is CALL_INSN_FUNCTION_USAGE.
    All other fields ( rtx->fld[] ) have exact same meaning as INSN's.  */
-DEF_RTL_EXPR(CALL_INSN, "call_insn", "iuueieee", 'i')
+DEF_RTL_EXPR(CALL_INSN, "call_insn", "iuuBieieee", 'i')
 
 /* A marker that indicates that control will not flow through.  */
-DEF_RTL_EXPR(BARRIER, "barrier", "iuu", 'x')
+DEF_RTL_EXPR(BARRIER, "barrier", "iuu000000", 'x')
 
 /* Holds a label that is followed by instructions.
    Operand:
-   3: is used in jump.c for the use-count of the label.
-   4: is used in flow.c to point to the chain of label_ref's to this label.
-   5: is a number that is unique in the entire compilation.
-   6: is the user-given name of the label, if any.
-   7: is the alternate label name.  */
-DEF_RTL_EXPR(CODE_LABEL, "code_label", "iuu00iss", 'x')
-     
+   5: is used in jump.c for the use-count of the label.
+   6: is used in flow.c to point to the chain of label_ref's to this label.
+   7: is a number that is unique in the entire compilation.
+   8: is the user-given name of the label, if any.  */
+DEF_RTL_EXPR(CODE_LABEL, "code_label", "iuuB00is", 'x')
+
 /* Say where in the code a source line starts, for symbol table's sake.
    Operand:
-   3: filename, if line number > 0, note-specific data otherwise.
-   4: line number if > 0, enum note_insn otherwise.
-   5: unique number if line number == note_insn_deleted_label.  */
-DEF_RTL_EXPR(NOTE, "note", "iuu0ni", 'x')
+   5: filename, if line number > 0, note-specific data otherwise.
+   6: line number if > 0, enum note_insn otherwise.
+   7: unique number if line number == note_insn_deleted_label.
+   8-9: padding so that notes and insns are the same size, and thus
+         allocated from the same page ordering.  */
+DEF_RTL_EXPR(NOTE, "note", "iuuB0ni00", 'x')
 
 /* ----------------------------------------------------------------------
    Top level constituents of INSN, JUMP_INSN and CALL_INSN.
@@ -647,6 +717,17 @@ DEF_RTL_EXPR(ADDR_VEC, "addr_vec", "E", 'x')
      
 DEF_RTL_EXPR(ADDR_DIFF_VEC, "addr_diff_vec", "eEee0", 'x')
 
+/* Memory prefetch, with attributes supported on some targets.
+   Operand 1 is the address of the memory to fetch.
+   Operand 2 is 1 for a write access, 0 otherwise.
+   Operand 3 is the level of temporal locality; 0 means there is no
+   temporal locality and 1, 2, and 3 are for increasing levels of temporal
+   locality.
+
+   The attributes specified by operands 2 and 3 are ignored for targets
+   whose prefetch instructions do not support them.  */
+DEF_RTL_EXPR(PREFETCH, "prefetch", "eee", 'x')
+
 /* ----------------------------------------------------------------------
    At the top level of an instruction (perhaps under PARALLEL).
    ---------------------------------------------------------------------- */
@@ -698,15 +779,13 @@ DEF_RTL_EXPR(RESX, "resx", "i", 'x')
 DEF_RTL_EXPR(CONST_INT, "const_int", "w", 'o')
 
 /* numeric floating point constant.
-   Operand 0 ('e') is the MEM that stores this constant in memory, or
-   various other things (see comments at immed_double_const in
-   varasm.c).
-   Operand 1 ('0') is a chain of all CONST_DOUBLEs in use in the
-   current function.
-   Remaining operands hold the actual value.  They are all 'w' and
-   there may be from 1 to 4; see rtl.c.  */
+   Operands hold the value.  They are all 'w' and there may be from 2 to 6;
+   see real.h.  */
 DEF_RTL_EXPR(CONST_DOUBLE, "const_double", CONST_DOUBLE_FORMAT, 'o')
 
+/* Describes a vector constant.  */
+DEF_RTL_EXPR(CONST_VECTOR, "const_vector", "E", 'x')
+
 /* String constant.  Used only for attributes right now.  */
 DEF_RTL_EXPR(CONST_STRING, "const_string", "s", 'o')
 
@@ -730,7 +809,7 @@ DEF_RTL_EXPR(VALUE, "value", "0", 'o')
    pseudo register that got turned into a hard register.
    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", "i0", 'o')
+DEF_RTL_EXPR(REG, "reg", "i00", 'o')
 
 /* A scratch register.  This represents a register used only within a
    single insn.  It will be turned into a REG during register allocation
@@ -768,10 +847,9 @@ DEF_RTL_EXPR(STRICT_LOW_PART, "strict_low_part", "e", 'x')
    in DECL_RTLs and during RTL generation, but not in the insn chain.  */
 DEF_RTL_EXPR(CONCAT, "concat", "ee", 'o')
 
-/* A memory location; operand is the address.  Can be nested inside a
-   VOLATILE.  The second operand is the alias set to which this MEM
-   belongs.  We use `0' instead of `w' for this field so that the
-   field need not be specified in machine descriptions.  */
+/* A memory location; operand is the address.  The second operand is the
+   alias set to which this MEM belongs.  We use `0' instead of `w' for this
+   field so that the field need not be specified in machine descriptions.  */
 DEF_RTL_EXPR(MEM, "mem", "e0", 'o')
 
 /* Reference to an assembler label in the code for this function.
@@ -780,11 +858,12 @@ DEF_RTL_EXPR(MEM, "mem", "e0", 'o')
    LABEL_NEXTREF and CONTAINING_INSN.  */
 DEF_RTL_EXPR(LABEL_REF, "label_ref", "u00", 'o')
 
-/* Reference to a named label: the string that is the first operand,
-   with `_' added implicitly in front.
-   Exception: if the first character explicitly given is `*',
-   to give it to the assembler, remove the `*' and do not add `_'.  */
-DEF_RTL_EXPR(SYMBOL_REF, "symbol_ref", "s", 'o')
+/* Reference to a named label: 
+   Operand 0: label name
+   Operand 1: flags (see SYMBOL_FLAG_* in rtl.h)
+   Operand 2: tree from which this symbol is derived, or null.
+   This is either a DECL node, or some kind of constant.  */
+DEF_RTL_EXPR(SYMBOL_REF, "symbol_ref", "s00", 'o')
 
 /* The condition code register is represented, in our imagination,
    as a register holding a value that can be compared to zero.
@@ -835,7 +914,7 @@ DEF_RTL_EXPR(IF_THEN_ELSE, "if_then_else", "eee", '3')
 /* General conditional. The first operand is a vector composed of pairs of
    expressions.  The first element of each pair is evaluated, in turn.
    The value of the conditional is the second expression of the first pair
-   whose first expression evaluates non-zero.  If none of the expressions is
+   whose first expression evaluates nonzero.  If none of the expressions is
    true, the second operand will be used as the value of the conditional.
 
    This should be replaced with use of IF_THEN_ELSE.  */
@@ -931,11 +1010,11 @@ DEF_RTL_EXPR(GTU, "gtu", "ee", '<')
 DEF_RTL_EXPR(LEU, "leu", "ee", '<')
 DEF_RTL_EXPR(LTU, "ltu", "ee", '<')
 
-/* Additional floating point unordered comparision flavors.  */
+/* Additional floating point unordered comparison flavors.  */
 DEF_RTL_EXPR(UNORDERED, "unordered", "ee", '<')
 DEF_RTL_EXPR(ORDERED, "ordered", "ee", '<')
 
-/* These are equivalent to unordered or ... */
+/* These are equivalent to unordered or ...  */
 DEF_RTL_EXPR(UNEQ, "uneq", "ee", '<')
 DEF_RTL_EXPR(UNGE, "unge", "ee", '<')
 DEF_RTL_EXPR(UNGT, "ungt", "ee", '<')
@@ -990,6 +1069,18 @@ DEF_RTL_EXPR(SQRT, "sqrt", "e", '1')
    or 0 if arg is 0.  */
 DEF_RTL_EXPR(FFS, "ffs", "e", '1')
 
+/* Count leading zeros.  */
+DEF_RTL_EXPR(CLZ, "clz", "e", '1')
+
+/* Count trailing zeros.  */
+DEF_RTL_EXPR(CTZ, "ctz", "e", '1')
+
+/* Population count (number of 1 bits).  */
+DEF_RTL_EXPR(POPCOUNT, "popcount", "e", '1')
+
+/* Population parity (number of 1 bits modulo 2).  */
+DEF_RTL_EXPR(PARITY, "parity", "e", '1')
+
 /* Reference to a signed bit-field of specified size and position.
    Operand 0 is the memory unit (usually SImode or QImode) which
    contains the field's first bit.  Operand 1 is the width, in bits.
@@ -1038,7 +1129,7 @@ DEF_RTL_EXPR(RANGE_INFO, "range_info", "uuEiiiiiibbii", 'x')
    live length.  Operand 7 is the number of calls that this register is live
    across.  Operand 8 is the symbol node of the variable if the register is a
    user variable.  Operand 9 is the block node that the variable is declared
-   in if the register is a user variable. */
+   in if the register is a user variable.  */
 DEF_RTL_EXPR(RANGE_REG, "range_reg", "iiiiiiiitt", 'x')
 
 /* Information about a local variable's ranges.  Operand 0 is an EXPR_LIST of
@@ -1053,7 +1144,7 @@ DEF_RTL_EXPR(RANGE_LIVE, "range_live", "bi", 'x')
 
 /* A unary `__builtin_constant_p' expression.  These are only emitted
    during RTL generation, and then only if optimize > 0.  They are
-   eliminated by the first CSE pass. */
+   eliminated by the first CSE pass.  */
 DEF_RTL_EXPR(CONSTANT_P_RTX, "constant_p_rtx", "e", 'x')
 
 /* A placeholder for a CALL_INSN which may be turned into a normal call,
@@ -1082,28 +1173,24 @@ DEF_RTL_EXPR(CALL_PLACEHOLDER, "call_placeholder", "uuuu", 'x')
    that specifies where the parts of the result are taken from.  Set bits
    indicate operand 0, clear bits indicate operand 1.  The parts are defined
    by the mode of the vectors.  */
-DEF_RTL_EXPR(VEC_MERGE, "vec_merge", "eee", 'x')
+DEF_RTL_EXPR(VEC_MERGE, "vec_merge", "eee", '3')
 
 /* Describes an operation that selects parts of a vector.
    Operands 0 is the source vector, operand 1 is a PARALLEL that contains
    a CONST_INT for each of the subparts of the result vector, giving the
    number of the source subpart that should be stored into it.  */
-DEF_RTL_EXPR(VEC_SELECT, "vec_select", "ee", 'x')
+DEF_RTL_EXPR(VEC_SELECT, "vec_select", "ee", '2')
 
 /* Describes a vector concat operation.  Operands 0 and 1 are the source
    vectors, the result is a vector that is as long as operands 0 and 1
    combined and is the concatenation of the two source vectors.  */
-DEF_RTL_EXPR(VEC_CONCAT, "vec_concat", "ee", 'x')
-
-/* Describes a vector constant.  Each part of the PARALLEL that is operand 0
-   describes a constant for one of the subparts.  */
-DEF_RTL_EXPR(VEC_CONST, "vec_const", "e", 'x')
+DEF_RTL_EXPR(VEC_CONCAT, "vec_concat", "ee", '2')
 
 /* Describes an operation that converts a small vector into a larger one by
    duplicating the input values.  The output vector mode must have the same
    submodes as the input vector mode, and the number of output parts must be
    an integer multiple of the number of input parts.  */
-DEF_RTL_EXPR(VEC_DUPLICATE, "vec_duplicate", "e", 'x')
+DEF_RTL_EXPR(VEC_DUPLICATE, "vec_duplicate", "e", '1')
      
 /* Addition with signed saturation */
 DEF_RTL_EXPR(SS_PLUS, "ss_plus", "ee", 'c')