comparison gcc/rtl.def @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* This file contains the definitions and documentation for the 1 /* This file contains the definitions and documentation for the
2 Register Transfer Expressions (rtx's) that make up the 2 Register Transfer Expressions (rtx's) that make up the
3 Register Transfer Language (rtl) used in the Back End of the GNU compiler. 3 Register Transfer Language (rtl) used in the Back End of the GNU compiler.
4 Copyright (C) 1987, 1988, 1992, 1994, 1995, 1997, 1998, 1999, 2000, 2004, 4 Copyright (C) 1987-2017 Free Software Foundation, Inc.
5 2005, 2006, 2007, 2008, 2009, 2010
6 Free Software Foundation, Inc.
7 5
8 This file is part of GCC. 6 This file is part of GCC.
9 7
10 GCC is free software; you can redistribute it and/or modify it under 8 GCC is free software; you can redistribute it and/or modify it under
11 the terms of the GNU General Public License as published by the Free 9 the terms of the GNU General Public License as published by the Free
64 RTX_BIN_ARITH 62 RTX_BIN_ARITH
65 an rtx code for a non-commutative binary operation (e.g., MINUS, DIV) 63 an rtx code for a non-commutative binary operation (e.g., MINUS, DIV)
66 RTX_BITFIELD_OPS 64 RTX_BITFIELD_OPS
67 an rtx code for a bit-field operation (ZERO_EXTRACT, SIGN_EXTRACT) 65 an rtx code for a bit-field operation (ZERO_EXTRACT, SIGN_EXTRACT)
68 RTX_INSN 66 RTX_INSN
69 an rtx code for a machine insn (INSN, JUMP_INSN, CALL_INSN) 67 an rtx code for a machine insn (INSN, JUMP_INSN, CALL_INSN) or
68 data that will be output as assembly pseudo-ops (DEBUG_INSN)
70 RTX_MATCH 69 RTX_MATCH
71 an rtx code for something that matches in insns (e.g, MATCH_DUP) 70 an rtx code for something that matches in insns (e.g, MATCH_DUP)
72 RTX_AUTOINC 71 RTX_AUTOINC
73 an rtx code for autoincrement addressing modes (e.g. POST_DEC) 72 an rtx code for autoincrement addressing modes (e.g. POST_DEC)
74 RTX_EXTRA 73 RTX_EXTRA
81 value zero. */ 80 value zero. */
82 DEF_RTL_EXPR(UNKNOWN, "UnKnown", "*", RTX_EXTRA) 81 DEF_RTL_EXPR(UNKNOWN, "UnKnown", "*", RTX_EXTRA)
83 82
84 /* Used in the cselib routines to describe a value. Objects of this 83 /* Used in the cselib routines to describe a value. Objects of this
85 kind are only allocated in cselib.c, in an alloc pool instead of in 84 kind are only allocated in cselib.c, in an alloc pool instead of in
86 GC memory. The only operand of a VALUE is a cselib_val_struct. 85 GC memory. The only operand of a VALUE is a cselib_val.
87 var-tracking requires this to have a distinct integral value from 86 var-tracking requires this to have a distinct integral value from
88 DECL codes in trees. */ 87 DECL codes in trees. */
89 DEF_RTL_EXPR(VALUE, "value", "0", RTX_OBJ) 88 DEF_RTL_EXPR(VALUE, "value", "0", RTX_OBJ)
90 89
91 /* The RTL generated for a DEBUG_EXPR_DECL. It links back to the 90 /* The RTL generated for a DEBUG_EXPR_DECL. It links back to the
94 93
95 /* --------------------------------------------------------------------- 94 /* ---------------------------------------------------------------------
96 Expressions used in constructing lists. 95 Expressions used in constructing lists.
97 --------------------------------------------------------------------- */ 96 --------------------------------------------------------------------- */
98 97
99 /* a linked list of expressions */ 98 /* A linked list of expressions. */
100 DEF_RTL_EXPR(EXPR_LIST, "expr_list", "ee", RTX_EXTRA) 99 DEF_RTL_EXPR(EXPR_LIST, "expr_list", "ee", RTX_EXTRA)
101 100
102 /* a linked list of instructions. 101 /* A linked list of instructions.
103 The insns are represented in print by their uids. */ 102 The insns are represented in print by their uids. */
104 DEF_RTL_EXPR(INSN_LIST, "insn_list", "ue", RTX_EXTRA) 103 DEF_RTL_EXPR(INSN_LIST, "insn_list", "ue", RTX_EXTRA)
105 104
106 /* SEQUENCE appears in the result of a `gen_...' function 105 /* A linked list of integers. */
107 for a DEFINE_EXPAND that wants to make several insns. 106 DEF_RTL_EXPR(INT_LIST, "int_list", "ie", RTX_EXTRA)
108 Its elements are the bodies of the insns that should be made. 107
109 `emit_insn' takes the SEQUENCE apart and makes separate insns. */ 108 /* SEQUENCE is used in late passes of the compiler to group insns for
109 one reason or another.
110
111 For example, after delay slot filling, branch instructions with filled
112 delay slots are represented as a SEQUENCE of length 1 + n_delay_slots,
113 with the branch instruction in XEXPVEC(seq, 0, 0) and the instructions
114 occupying the delay slots in the remaining XEXPVEC slots.
115
116 Another place where a SEQUENCE may appear, is in REG_FRAME_RELATED_EXPR
117 notes, to express complex operations that are not obvious from the insn
118 to which the REG_FRAME_RELATED_EXPR note is attached. In this usage of
119 SEQUENCE, the sequence vector slots do not hold real instructions but
120 only pseudo-instructions that can be translated to DWARF CFA expressions.
121
122 Some back ends also use SEQUENCE to group insns in bundles.
123
124 Much of the compiler infrastructure is not prepared to handle SEQUENCE
125 objects. Only passes after pass_free_cfg are expected to handle them. */
110 DEF_RTL_EXPR(SEQUENCE, "sequence", "E", RTX_EXTRA) 126 DEF_RTL_EXPR(SEQUENCE, "sequence", "E", RTX_EXTRA)
111 127
112 /* Refers to the address of its argument. This is only used in alias.c. */ 128 /* Represents a non-global base address. This is only used in alias.c. */
113 DEF_RTL_EXPR(ADDRESS, "address", "e", RTX_MATCH) 129 DEF_RTL_EXPR(ADDRESS, "address", "i", RTX_EXTRA)
114 130
115 /* ---------------------------------------------------------------------- 131 /* ----------------------------------------------------------------------
116 Expression types used for things in the instruction chain. 132 Expression types used for things in the instruction chain.
117 133
118 All formats must start with "iuu" to handle the chain. 134 All formats must start with "uu" to handle the chain.
119 Each insn expression holds an rtl instruction and its semantics 135 Each insn expression holds an rtl instruction and its semantics
120 during back-end processing. 136 during back-end processing.
121 See macros's in "rtl.h" for the meaning of each rtx->u.fld[]. 137 See macros in "rtl.h" for the meaning of each rtx->u.fld[].
122 138
123 ---------------------------------------------------------------------- */ 139 ---------------------------------------------------------------------- */
124 140
125 /* An annotation for variable assignment tracking. */ 141 /* An annotation for variable assignment tracking. */
126 DEF_RTL_EXPR(DEBUG_INSN, "debug_insn", "iuuBeiie", RTX_INSN) 142 DEF_RTL_EXPR(DEBUG_INSN, "debug_insn", "uuBeiie", RTX_INSN)
127 143
128 /* An instruction that cannot jump. */ 144 /* An instruction that cannot jump. */
129 DEF_RTL_EXPR(INSN, "insn", "iuuBeiie", RTX_INSN) 145 DEF_RTL_EXPR(INSN, "insn", "uuBeiie", RTX_INSN)
130 146
131 /* An instruction that can possibly jump. 147 /* An instruction that can possibly jump.
132 Fields ( rtx->u.fld[] ) have exact same meaning as INSN's. */ 148 Fields ( rtx->u.fld[] ) have exact same meaning as INSN's. */
133 DEF_RTL_EXPR(JUMP_INSN, "jump_insn", "iuuBeiie0", RTX_INSN) 149 DEF_RTL_EXPR(JUMP_INSN, "jump_insn", "uuBeiie0", RTX_INSN)
134 150
135 /* An instruction that can possibly call a subroutine 151 /* An instruction that can possibly call a subroutine
136 but which will not change which instruction comes next 152 but which will not change which instruction comes next
137 in the current function. 153 in the current function.
138 Field ( rtx->u.fld[8] ) is CALL_INSN_FUNCTION_USAGE. 154 Field ( rtx->u.fld[8] ) is CALL_INSN_FUNCTION_USAGE.
139 All other fields ( rtx->u.fld[] ) have exact same meaning as INSN's. */ 155 All other fields ( rtx->u.fld[] ) have exact same meaning as INSN's. */
140 DEF_RTL_EXPR(CALL_INSN, "call_insn", "iuuBeiiee", RTX_INSN) 156 DEF_RTL_EXPR(CALL_INSN, "call_insn", "uuBeiiee", RTX_INSN)
157
158 /* Placeholder for tablejump JUMP_INSNs. The pattern of this kind
159 of rtx is always either an ADDR_VEC or an ADDR_DIFF_VEC. These
160 placeholders do not appear as real instructions inside a basic
161 block, but are considered active_insn_p instructions for historical
162 reasons, when jump table data was represented with JUMP_INSNs. */
163 DEF_RTL_EXPR(JUMP_TABLE_DATA, "jump_table_data", "uuBe0000", RTX_INSN)
141 164
142 /* A marker that indicates that control will not flow through. */ 165 /* A marker that indicates that control will not flow through. */
143 DEF_RTL_EXPR(BARRIER, "barrier", "iuu00000", RTX_EXTRA) 166 DEF_RTL_EXPR(BARRIER, "barrier", "uu00000", RTX_EXTRA)
144 167
145 /* Holds a label that is followed by instructions. 168 /* Holds a label that is followed by instructions.
146 Operand: 169 Operand:
147 4: is used in jump.c for the use-count of the label. 170 3: is used in jump.c for the use-count of the label.
148 5: is used in the sh backend. 171 4: is used in the sh backend.
149 6: is a number that is unique in the entire compilation. 172 5: is a number that is unique in the entire compilation.
150 7: is the user-given name of the label, if any. */ 173 6: is the user-given name of the label, if any. */
151 DEF_RTL_EXPR(CODE_LABEL, "code_label", "iuuB00is", RTX_EXTRA) 174 DEF_RTL_EXPR(CODE_LABEL, "code_label", "uuB00is", RTX_EXTRA)
152 175
153 /* Say where in the code a source line starts, for symbol table's sake. 176 /* Say where in the code a source line starts, for symbol table's sake.
154 Operand: 177 Operand:
155 4: note-specific data 178 3: note-specific data
156 5: enum insn_note 179 4: enum insn_note
157 6: unique number if insn_note == note_insn_deleted_label. */ 180 5: unique number if insn_note == note_insn_deleted_label. */
158 DEF_RTL_EXPR(NOTE, "note", "iuuB0ni", RTX_EXTRA) 181 DEF_RTL_EXPR(NOTE, "note", "uuB0ni", RTX_EXTRA)
159 182
160 /* ---------------------------------------------------------------------- 183 /* ----------------------------------------------------------------------
161 Top level constituents of INSN, JUMP_INSN and CALL_INSN. 184 Top level constituents of INSN, JUMP_INSN and CALL_INSN.
162 ---------------------------------------------------------------------- */ 185 ---------------------------------------------------------------------- */
163 186
214 DEF_RTL_EXPR(UNSPEC, "unspec", "Ei", RTX_EXTRA) 237 DEF_RTL_EXPR(UNSPEC, "unspec", "Ei", RTX_EXTRA)
215 238
216 /* Similar, but a volatile operation and one which may trap. */ 239 /* Similar, but a volatile operation and one which may trap. */
217 DEF_RTL_EXPR(UNSPEC_VOLATILE, "unspec_volatile", "Ei", RTX_EXTRA) 240 DEF_RTL_EXPR(UNSPEC_VOLATILE, "unspec_volatile", "Ei", RTX_EXTRA)
218 241
219 /* Vector of addresses, stored as full words. */ 242 /* ----------------------------------------------------------------------
220 /* Each element is a LABEL_REF to a CODE_LABEL whose address we want. */ 243 Table jump addresses.
244 ---------------------------------------------------------------------- */
245
246 /* Vector of addresses, stored as full words.
247 Each element is a LABEL_REF to a CODE_LABEL whose address we want. */
221 DEF_RTL_EXPR(ADDR_VEC, "addr_vec", "E", RTX_EXTRA) 248 DEF_RTL_EXPR(ADDR_VEC, "addr_vec", "E", RTX_EXTRA)
222 249
223 /* Vector of address differences X0 - BASE, X1 - BASE, ... 250 /* Vector of address differences X0 - BASE, X1 - BASE, ...
224 First operand is BASE; the vector contains the X's. 251 First operand is BASE; the vector contains the X's.
225 The machine mode of this rtx says how much space to leave 252 The machine mode of this rtx says how much space to leave
239 offset_unsigned: true iff offsets have to be treated as unsigned. 266 offset_unsigned: true iff offsets have to be treated as unsigned.
240 scale: scaling that is necessary to make offsets fit into the mode. 267 scale: scaling that is necessary to make offsets fit into the mode.
241 268
242 The third, fourth and fifth operands are only valid when 269 The third, fourth and fifth operands are only valid when
243 CASE_VECTOR_SHORTEN_MODE is defined, and only in an optimizing 270 CASE_VECTOR_SHORTEN_MODE is defined, and only in an optimizing
244 compilations. */ 271 compilation. */
245
246 DEF_RTL_EXPR(ADDR_DIFF_VEC, "addr_diff_vec", "eEee0", RTX_EXTRA) 272 DEF_RTL_EXPR(ADDR_DIFF_VEC, "addr_diff_vec", "eEee0", RTX_EXTRA)
247 273
248 /* Memory prefetch, with attributes supported on some targets. 274 /* Memory prefetch, with attributes supported on some targets.
249 Operand 1 is the address of the memory to fetch. 275 Operand 1 is the address of the memory to fetch.
250 Operand 2 is 1 for a write access, 0 otherwise. 276 Operand 2 is 1 for a write access, 0 otherwise.
294 320
295 /* Return from a subroutine. */ 321 /* Return from a subroutine. */
296 322
297 DEF_RTL_EXPR(RETURN, "return", "", RTX_EXTRA) 323 DEF_RTL_EXPR(RETURN, "return", "", RTX_EXTRA)
298 324
325 /* Like RETURN, but truly represents only a function return, while
326 RETURN may represent an insn that also performs other functions
327 of the function epilogue. Like RETURN, this may also occur in
328 conditional jumps. */
329 DEF_RTL_EXPR(SIMPLE_RETURN, "simple_return", "", RTX_EXTRA)
330
299 /* Special for EH return from subroutine. */ 331 /* Special for EH return from subroutine. */
300 332
301 DEF_RTL_EXPR(EH_RETURN, "eh_return", "", RTX_EXTRA) 333 DEF_RTL_EXPR(EH_RETURN, "eh_return", "", RTX_EXTRA)
302 334
303 /* Conditional trap. 335 /* Conditional trap.
311 ---------------------------------------------------------------------- */ 343 ---------------------------------------------------------------------- */
312 344
313 /* numeric integer constant */ 345 /* numeric integer constant */
314 DEF_RTL_EXPR(CONST_INT, "const_int", "w", RTX_CONST_OBJ) 346 DEF_RTL_EXPR(CONST_INT, "const_int", "w", RTX_CONST_OBJ)
315 347
348 /* numeric integer constant */
349 DEF_RTL_EXPR(CONST_WIDE_INT, "const_wide_int", "", RTX_CONST_OBJ)
350
316 /* fixed-point constant */ 351 /* fixed-point constant */
317 DEF_RTL_EXPR(CONST_FIXED, "const_fixed", "www", RTX_CONST_OBJ) 352 DEF_RTL_EXPR(CONST_FIXED, "const_fixed", "www", RTX_CONST_OBJ)
318 353
319 /* numeric floating point constant. 354 /* numeric floating point or integer constant. If the mode is
320 Operands hold the value. They are all 'w' and there may be from 2 to 6; 355 VOIDmode it is an int otherwise it has a floating point mode and a
321 see real.h. */ 356 floating point value. Operands hold the value. They are all 'w'
357 and there may be from 2 to 6; see real.h. */
322 DEF_RTL_EXPR(CONST_DOUBLE, "const_double", CONST_DOUBLE_FORMAT, RTX_CONST_OBJ) 358 DEF_RTL_EXPR(CONST_DOUBLE, "const_double", CONST_DOUBLE_FORMAT, RTX_CONST_OBJ)
323 359
324 /* Describes a vector constant. */ 360 /* Describes a vector constant. */
325 DEF_RTL_EXPR(CONST_VECTOR, "const_vector", "E", RTX_CONST_OBJ) 361 DEF_RTL_EXPR(CONST_VECTOR, "const_vector", "E", RTX_CONST_OBJ)
326 362
340 DEF_RTL_EXPR(PC, "pc", "", RTX_OBJ) 376 DEF_RTL_EXPR(PC, "pc", "", RTX_OBJ)
341 377
342 /* A register. The "operand" is the register number, accessed with 378 /* A register. The "operand" is the register number, accessed with
343 the REGNO macro. If this number is less than FIRST_PSEUDO_REGISTER 379 the REGNO macro. If this number is less than FIRST_PSEUDO_REGISTER
344 than a hardware register is being referred to. The second operand 380 than a hardware register is being referred to. The second operand
345 holds the original register number - this will be different for a 381 points to a reg_attrs structure.
346 pseudo register that got turned into a hard register. The third
347 operand points to a reg_attrs structure.
348 This rtx needs to have as many (or more) fields as a MEM, since we 382 This rtx needs to have as many (or more) fields as a MEM, since we
349 can change REG rtx's into MEMs during reload. */ 383 can change REG rtx's into MEMs during reload. */
350 DEF_RTL_EXPR(REG, "reg", "i00", RTX_OBJ) 384 DEF_RTL_EXPR(REG, "reg", "r", RTX_OBJ)
351 385
352 /* A scratch register. This represents a register used only within a 386 /* A scratch register. This represents a register used only within a
353 single insn. It will be turned into a REG during register allocation 387 single insn. It will be replaced by a REG during register allocation
354 or reload unless the constraint indicates that the register won't be 388 or reload unless the constraint indicates that the register won't be
355 needed, in which case it can remain a SCRATCH. This code is 389 needed, in which case it can remain a SCRATCH. */
356 marked as having one operand so it can be turned into a REG. */ 390 DEF_RTL_EXPR(SCRATCH, "scratch", "", RTX_OBJ)
357 DEF_RTL_EXPR(SCRATCH, "scratch", "0", RTX_OBJ)
358 391
359 /* A reference to a part of another value. The first operand is the 392 /* A reference to a part of another value. The first operand is the
360 complete value and the second is the byte offset of the selected part. */ 393 complete value and the second is the byte offset of the selected part. */
361 DEF_RTL_EXPR(SUBREG, "subreg", "ei", RTX_EXTRA) 394 DEF_RTL_EXPR(SUBREG, "subreg", "ei", RTX_EXTRA)
362 395
394 The operand is a CODE_LABEL found in the insn chain. */ 427 The operand is a CODE_LABEL found in the insn chain. */
395 DEF_RTL_EXPR(LABEL_REF, "label_ref", "u", RTX_CONST_OBJ) 428 DEF_RTL_EXPR(LABEL_REF, "label_ref", "u", RTX_CONST_OBJ)
396 429
397 /* Reference to a named label: 430 /* Reference to a named label:
398 Operand 0: label name 431 Operand 0: label name
399 Operand 1: flags (see SYMBOL_FLAG_* in rtl.h) 432 Operand 1: tree from which this symbol is derived, or null.
400 Operand 2: tree from which this symbol is derived, or null.
401 This is either a DECL node, or some kind of constant. */ 433 This is either a DECL node, or some kind of constant. */
402 DEF_RTL_EXPR(SYMBOL_REF, "symbol_ref", "s00", RTX_CONST_OBJ) 434 DEF_RTL_EXPR(SYMBOL_REF, "symbol_ref", "s0", RTX_CONST_OBJ)
403 435
404 /* The condition code register is represented, in our imagination, 436 /* The condition code register is represented, in our imagination,
405 as a register holding a value that can be compared to zero. 437 as a register holding a value that can be compared to zero.
406 In fact, the machine has already compared them and recorded the 438 In fact, the machine has already compared them and recorded the
407 results; but instructions that look at the condition code 439 results; but instructions that look at the condition code
611 /* Find first bit that is set. 643 /* Find first bit that is set.
612 Value is 1 + number of trailing zeros in the arg., 644 Value is 1 + number of trailing zeros in the arg.,
613 or 0 if arg is 0. */ 645 or 0 if arg is 0. */
614 DEF_RTL_EXPR(FFS, "ffs", "e", RTX_UNARY) 646 DEF_RTL_EXPR(FFS, "ffs", "e", RTX_UNARY)
615 647
648 /* Count number of leading redundant sign bits (number of leading
649 sign bits minus one). */
650 DEF_RTL_EXPR(CLRSB, "clrsb", "e", RTX_UNARY)
651
616 /* Count leading zeros. */ 652 /* Count leading zeros. */
617 DEF_RTL_EXPR(CLZ, "clz", "e", RTX_UNARY) 653 DEF_RTL_EXPR(CLZ, "clz", "e", RTX_UNARY)
618 654
619 /* Count trailing zeros. */ 655 /* Count trailing zeros. */
620 DEF_RTL_EXPR(CTZ, "ctz", "e", RTX_UNARY) 656 DEF_RTL_EXPR(CTZ, "ctz", "e", RTX_UNARY)
708 744
709 /* Floating point multiply/add combined instruction. */ 745 /* Floating point multiply/add combined instruction. */
710 DEF_RTL_EXPR(FMA, "fma", "eee", RTX_TERNARY) 746 DEF_RTL_EXPR(FMA, "fma", "eee", RTX_TERNARY)
711 747
712 /* Information about the variable and its location. */ 748 /* Information about the variable and its location. */
713 /* Changed 'te' to 'tei'; the 'i' field is for recording 749 DEF_RTL_EXPR(VAR_LOCATION, "var_location", "te", RTX_EXTRA)
714 initialization status of variables. */
715 DEF_RTL_EXPR(VAR_LOCATION, "var_location", "tei", RTX_EXTRA)
716 750
717 /* Used in VAR_LOCATION for a pointer to a decl that is no longer 751 /* Used in VAR_LOCATION for a pointer to a decl that is no longer
718 addressable. */ 752 addressable. */
719 DEF_RTL_EXPR(DEBUG_IMPLICIT_PTR, "debug_implicit_ptr", "t", RTX_OBJ) 753 DEF_RTL_EXPR(DEBUG_IMPLICIT_PTR, "debug_implicit_ptr", "t", RTX_OBJ)
754
755 /* Represents value that argument had on function entry. The
756 single argument is the DECL_INCOMING_RTL of the corresponding
757 parameter. */
758 DEF_RTL_EXPR(ENTRY_VALUE, "entry_value", "0", RTX_OBJ)
759
760 /* Used in VAR_LOCATION for a reference to a parameter that has
761 been optimized away completely. */
762 DEF_RTL_EXPR(DEBUG_PARAMETER_REF, "debug_parameter_ref", "t", RTX_OBJ)
720 763
721 /* All expressions from this point forward appear only in machine 764 /* All expressions from this point forward appear only in machine
722 descriptions. */ 765 descriptions. */
723 #ifdef GENERATOR_FILE 766 #ifdef GENERATOR_FILE
724 767
798 same syntax as genextract/genrecog's location strings: 0-9 for 841 same syntax as genextract/genrecog's location strings: 0-9 for
799 XEXP (op, n), a-z for XVECEXP (op, 0, n); each character applies to 842 XEXP (op, n), a-z for XVECEXP (op, 0, n); each character applies to
800 the result of the one before it. */ 843 the result of the one before it. */
801 DEF_RTL_EXPR(MATCH_CODE, "match_code", "ss", RTX_MATCH) 844 DEF_RTL_EXPR(MATCH_CODE, "match_code", "ss", RTX_MATCH)
802 845
803 /* Appears only in define_predicate/define_special_predicate 846 /* Used to inject a C conditional expression into an .md file. It can
804 expressions. The argument is a C expression to be injected at this 847 appear in a predicate definition or an attribute expression. */
805 point in the predicate formula. */
806 DEF_RTL_EXPR(MATCH_TEST, "match_test", "s", RTX_MATCH) 848 DEF_RTL_EXPR(MATCH_TEST, "match_test", "s", RTX_MATCH)
807 849
808 /* Insn (and related) definitions. */ 850 /* Insn (and related) definitions. */
809 851
810 /* Definition of the pattern for one kind of instruction. 852 /* Definition of the pattern for one kind of instruction.
885 This may not test any operands. 927 This may not test any operands.
886 4th operand: Extra C code to execute before generating the insns. 928 4th operand: Extra C code to execute before generating the insns.
887 This might, for example, create some RTX's and store them in 929 This might, for example, create some RTX's and store them in
888 elements of `recog_data.operand' for use by the vector of 930 elements of `recog_data.operand' for use by the vector of
889 insn-patterns. 931 insn-patterns.
890 (`operands' is an alias here for `recog_data.operand'). */ 932 (`operands' is an alias here for `recog_data.operand').
891 DEF_RTL_EXPR(DEFINE_EXPAND, "define_expand", "sEss", RTX_EXTRA) 933 5th: optionally, a vector of attributes for this expand. */
934 DEF_RTL_EXPR(DEFINE_EXPAND, "define_expand", "sEssV", RTX_EXTRA)
892 935
893 /* Define a requirement for delay slots. 936 /* Define a requirement for delay slots.
894 1st operand: Condition involving insn attributes that, if true, 937 1st operand: Condition involving insn attributes that, if true,
895 indicates that the insn requires the number of delay slots 938 indicates that the insn requires the number of delay slots
896 shown. 939 shown.
917 Operand: 960 Operand:
918 0: The predicate pattern. The top-level form should match a 961 0: The predicate pattern. The top-level form should match a
919 relational operator. Operands should have only one alternative. 962 relational operator. Operands should have only one alternative.
920 1: A C expression giving an additional condition for recognizing 963 1: A C expression giving an additional condition for recognizing
921 the generated pattern. 964 the generated pattern.
922 2: A template or C code to produce assembler output. */ 965 2: A template or C code to produce assembler output.
923 DEF_RTL_EXPR(DEFINE_COND_EXEC, "define_cond_exec", "Ess", RTX_EXTRA) 966 3: A vector of attributes to append to the resulting cond_exec insn. */
967 DEF_RTL_EXPR(DEFINE_COND_EXEC, "define_cond_exec", "EssV", RTX_EXTRA)
924 968
925 /* Definition of an operand predicate. The difference between 969 /* Definition of an operand predicate. The difference between
926 DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE is that genrecog will 970 DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE is that genrecog will
927 not warn about a match_operand with no mode if it has a predicate 971 not warn about a match_operand with no mode if it has a predicate
928 defined with DEFINE_SPECIAL_PREDICATE. 972 defined with DEFINE_SPECIAL_PREDICATE.
989 CONST_DOUBLE. 1033 CONST_DOUBLE.
990 Do not use ival/hval/lval/rval if op is not the appropriate kind of 1034 Do not use ival/hval/lval/rval if op is not the appropriate kind of
991 RTL object. */ 1035 RTL object. */
992 DEF_RTL_EXPR(DEFINE_CONSTRAINT, "define_constraint", "sse", RTX_EXTRA) 1036 DEF_RTL_EXPR(DEFINE_CONSTRAINT, "define_constraint", "sse", RTX_EXTRA)
993 DEF_RTL_EXPR(DEFINE_MEMORY_CONSTRAINT, "define_memory_constraint", "sse", RTX_EXTRA) 1037 DEF_RTL_EXPR(DEFINE_MEMORY_CONSTRAINT, "define_memory_constraint", "sse", RTX_EXTRA)
1038 DEF_RTL_EXPR(DEFINE_SPECIAL_MEMORY_CONSTRAINT, "define_special_memory_constraint", "sse", RTX_EXTRA)
994 DEF_RTL_EXPR(DEFINE_ADDRESS_CONSTRAINT, "define_address_constraint", "sse", RTX_EXTRA) 1039 DEF_RTL_EXPR(DEFINE_ADDRESS_CONSTRAINT, "define_address_constraint", "sse", RTX_EXTRA)
995 1040
996 1041
997 /* Constructions for CPU pipeline description described by NDFAs. */ 1042 /* Constructions for CPU pipeline description described by NDFAs. */
998 1043
1248 1293
1249 /* A conditional expression which is true if the specified flag is 1294 /* A conditional expression which is true if the specified flag is
1250 true for the insn being scheduled in reorg. 1295 true for the insn being scheduled in reorg.
1251 1296
1252 genattr.c defines the following flags which can be tested by 1297 genattr.c defines the following flags which can be tested by
1253 (attr_flag "foo") expressions in eligible_for_delay. 1298 (attr_flag "foo") expressions in eligible_for_delay: forward, backward. */
1254
1255 forward, backward, very_likely, likely, very_unlikely, and unlikely. */
1256 1299
1257 DEF_RTL_EXPR (ATTR_FLAG, "attr_flag", "s", RTX_EXTRA) 1300 DEF_RTL_EXPR (ATTR_FLAG, "attr_flag", "s", RTX_EXTRA)
1258 1301
1259 /* General conditional. The first operand is a vector composed of pairs of 1302 /* General conditional. The first operand is a vector composed of pairs of
1260 expressions. The first element of each pair is evaluated, in turn. 1303 expressions. The first element of each pair is evaluated, in turn.
1261 The value of the conditional is the second expression of the first pair 1304 The value of the conditional is the second expression of the first pair
1262 whose first expression evaluates nonzero. If none of the expressions is 1305 whose first expression evaluates nonzero. If none of the expressions is
1263 true, the second operand will be used as the value of the conditional. */ 1306 true, the second operand will be used as the value of the conditional. */
1264 DEF_RTL_EXPR(COND, "cond", "Ee", RTX_EXTRA) 1307 DEF_RTL_EXPR(COND, "cond", "Ee", RTX_EXTRA)
1265 1308
1309 /* Definition of a pattern substitution meta operation on a DEFINE_EXPAND
1310 or a DEFINE_INSN. Automatically generates new instances of DEFINE_INSNs
1311 that match the substitution pattern.
1312
1313 Operand:
1314 0: The name of the substitition template.
1315 1: Input template to match to see if a substitution is applicable.
1316 2: A C expression giving an additional condition for the generated
1317 new define_expand or define_insn.
1318 3: Output tempalate to generate via substitution.
1319
1320 Within a DEFINE_SUBST template, the meaning of some RTL expressions is
1321 different from their usual interpretation: a MATCH_OPERAND matches any
1322 expression tree with matching machine mode or with VOIDmode. Likewise,
1323 MATCH_OP_DUP and MATCH_DUP match more liberally in a DEFINE_SUBST than
1324 in other RTL expressions. MATCH_OPERATOR matches all common operators
1325 but also UNSPEC, UNSPEC_VOLATILE, and MATCH_OPERATORS from the input
1326 DEFINE_EXPAND or DEFINE_INSN. */
1327 DEF_RTL_EXPR(DEFINE_SUBST, "define_subst", "sEsE", RTX_EXTRA)
1328
1329 /* Substitution attribute to apply a DEFINE_SUBST to a pattern.
1330
1331 Operand:
1332 0: The name of the subst-attribute.
1333 1: The name of the DEFINE_SUBST to be applied for this attribute.
1334 2: String to substitute for the subst-attribute name in the pattern
1335 name, for the case that the DEFINE_SUBST is not applied (i.e. the
1336 unmodified version of the pattern).
1337 3: String to substitute for the subst-attribute name in the pattern
1338 name, for the case that the DEFINE_SUBST is applied to the patten.
1339
1340 The use of DEFINE_SUBST and DEFINE_SUBST_ATTR is explained in the
1341 GCC internals manual, under "RTL Templates Transformations". */
1342 DEF_RTL_EXPR(DEFINE_SUBST_ATTR, "define_subst_attr", "ssss", RTX_EXTRA)
1343
1266 #endif /* GENERATOR_FILE */ 1344 #endif /* GENERATOR_FILE */
1267 1345
1268 /* 1346 /*
1269 Local variables: 1347 Local variables:
1270 mode:c 1348 mode:c