tree.def
来自「GCC编译器源代码」· DEF 代码 · 共 747 行 · 第 1/3 页
DEF
747 行
is that of the object and selects which object to use from a chain of references (see below). When we wish to evaluate a size or offset, we check it is contains a placeholder. If it does, we construct a WITH_RECORD_EXPR that contains both the expression we wish to evaluate and an expression within which the object may be found. The latter expression is the object itself in the simple case of an Ada record with discriminant, but it can be the array in the case of an unconstrained array. In the latter case, we need the fat pointer, because the bounds of the array can only be accessed from it. However, we rely here on the fact that the expression for the array contains the dereference of the fat pointer that obtained the array pointer. Accordingly, when looking for the object to substitute in place of a PLACEHOLDER_EXPR, we look down the first operand of the expression passed as the second operand to WITH_RECORD_EXPR until we find something of the desired type or reach a constant. *//* Denotes a record to later be supplied with a WITH_RECORD_EXPR when evaluating this expression. The type of this expression is used to find the record to replace it. */DEFTREECODE (PLACEHOLDER_EXPR, "placeholder_expr", "x", 0)/* Provide an expression that references a record to be used in place of a PLACEHOLDER_EXPR. The record to be used is the record within operand 1 that has the same type as the PLACEHOLDER_EXPR in operand 0. */DEFTREECODE (WITH_RECORD_EXPR, "with_record_expr", "e", 2)/* Simple arithmetic. */DEFTREECODE (PLUS_EXPR, "plus_expr", "2", 2)DEFTREECODE (MINUS_EXPR, "minus_expr", "2", 2)DEFTREECODE (MULT_EXPR, "mult_expr", "2", 2)/* Division for integer result that rounds the quotient toward zero. */DEFTREECODE (TRUNC_DIV_EXPR, "trunc_div_expr", "2", 2)/* Division for integer result that rounds the quotient toward infinity. */DEFTREECODE (CEIL_DIV_EXPR, "ceil_div_expr", "2", 2)/* Division for integer result that rounds toward minus infinity. */DEFTREECODE (FLOOR_DIV_EXPR, "floor_div_expr", "2", 2)/* Division for integer result that rounds toward nearest integer. */DEFTREECODE (ROUND_DIV_EXPR, "round_div_expr", "2", 2)/* Four kinds of remainder that go with the four kinds of division. */DEFTREECODE (TRUNC_MOD_EXPR, "trunc_mod_expr", "2", 2)DEFTREECODE (CEIL_MOD_EXPR, "ceil_mod_expr", "2", 2)DEFTREECODE (FLOOR_MOD_EXPR, "floor_mod_expr", "2", 2)DEFTREECODE (ROUND_MOD_EXPR, "round_mod_expr", "2", 2)/* Division for real result. */DEFTREECODE (RDIV_EXPR, "rdiv_expr", "2", 2)/* Division which is not supposed to need rounding. Used for pointer subtraction in C. */DEFTREECODE (EXACT_DIV_EXPR, "exact_div_expr", "2", 2)/* Conversion of real to fixed point: four ways to round, like the four ways to divide. CONVERT_EXPR can also be used to convert a real to an integer, and that is what is used in languages that do not have ways of specifying which of these is wanted. Maybe these are not needed. */DEFTREECODE (FIX_TRUNC_EXPR, "fix_trunc_expr", "1", 1)DEFTREECODE (FIX_CEIL_EXPR, "fix_ceil_expr", "1", 1)DEFTREECODE (FIX_FLOOR_EXPR, "fix_floor_expr", "1", 1)DEFTREECODE (FIX_ROUND_EXPR, "fix_round_expr", "1", 1)/* Conversion of an integer to a real. */DEFTREECODE (FLOAT_EXPR, "float_expr", "1", 1)/* Exponentiation. Operands may have any types; constraints on value type are not known yet. */DEFTREECODE (EXPON_EXPR, "expon_expr", "2", 2)/* Unary negation. */DEFTREECODE (NEGATE_EXPR, "negate_expr", "1", 1)DEFTREECODE (MIN_EXPR, "min_expr", "2", 2)DEFTREECODE (MAX_EXPR, "max_expr", "2", 2)DEFTREECODE (ABS_EXPR, "abs_expr", "1", 1)DEFTREECODE (FFS_EXPR, "ffs_expr", "1", 1)/* Shift operations for shift and rotate. Shift is supposed to mean logical shift if done on an unsigned type, arithmetic shift on a signed type. The second operand is the number of bits to shift by; it need not be the same type as the first operand and result. */DEFTREECODE (LSHIFT_EXPR, "lshift_expr", "2", 2)DEFTREECODE (RSHIFT_EXPR, "rshift_expr", "2", 2)DEFTREECODE (LROTATE_EXPR, "lrotate_expr", "2", 2)DEFTREECODE (RROTATE_EXPR, "rrotate_expr", "2", 2)/* Bitwise operations. Operands have same mode as result. */DEFTREECODE (BIT_IOR_EXPR, "bit_ior_expr", "2", 2)DEFTREECODE (BIT_XOR_EXPR, "bit_xor_expr", "2", 2)DEFTREECODE (BIT_AND_EXPR, "bit_and_expr", "2", 2)DEFTREECODE (BIT_ANDTC_EXPR, "bit_andtc_expr", "2", 2)DEFTREECODE (BIT_NOT_EXPR, "bit_not_expr", "1", 1)/* Combination of boolean values or of integers considered only as zero or nonzero. ANDIF and ORIF allow the second operand not to be computed if the value of the expression is determined from the first operand. AND, OR, and XOR always compute the second operand whether its value is needed or not (for side effects). */DEFTREECODE (TRUTH_ANDIF_EXPR, "truth_andif_expr", "e", 2)DEFTREECODE (TRUTH_ORIF_EXPR, "truth_orif_expr", "e", 2)DEFTREECODE (TRUTH_AND_EXPR, "truth_and_expr", "e", 2)DEFTREECODE (TRUTH_OR_EXPR, "truth_or_expr", "e", 2)DEFTREECODE (TRUTH_XOR_EXPR, "truth_xor_expr", "e", 2)DEFTREECODE (TRUTH_NOT_EXPR, "truth_not_expr", "e", 1)/* Relational operators. `EQ_EXPR' and `NE_EXPR' are allowed for any types. The others are allowed only for integer (or pointer or enumeral) or real types. In all cases the operands will have the same type, and the value is always the type used by the language for booleans. */DEFTREECODE (LT_EXPR, "lt_expr", "<", 2)DEFTREECODE (LE_EXPR, "le_expr", "<", 2)DEFTREECODE (GT_EXPR, "gt_expr", "<", 2)DEFTREECODE (GE_EXPR, "ge_expr", "<", 2)DEFTREECODE (EQ_EXPR, "eq_expr", "<", 2)DEFTREECODE (NE_EXPR, "ne_expr", "<", 2)/* Operations for Pascal sets. Not used now. */DEFTREECODE (IN_EXPR, "in_expr", "2", 2)DEFTREECODE (SET_LE_EXPR, "set_le_expr", "<", 2)DEFTREECODE (CARD_EXPR, "card_expr", "1", 1)DEFTREECODE (RANGE_EXPR, "range_expr", "2", 2)/* Represents a conversion of type of a value. All conversions, including implicit ones, must be represented by CONVERT_EXPR or NOP_EXPR nodes. */DEFTREECODE (CONVERT_EXPR, "convert_expr", "1", 1)/* Represents a conversion expected to require no code to be generated. */DEFTREECODE (NOP_EXPR, "nop_expr", "1", 1)/* Value is same as argument, but guaranteed not an lvalue. */DEFTREECODE (NON_LVALUE_EXPR, "non_lvalue_expr", "1", 1)/* Represents something we computed once and will use multiple times. First operand is that expression. Second is the function decl in which the SAVE_EXPR was created. The third operand is the RTL, nonzero only after the expression has been computed. */DEFTREECODE (SAVE_EXPR, "save_expr", "e", 3)/* For a UNSAVE_EXPR, operand 0 is the value to unsave. By unsave, we mean that all _EXPRs such as TARGET_EXPRs, SAVE_EXPRs, CALL_EXPRs and RTL_EXPRs, that are protected from being evaluated more than once should be reset so that a new expand_expr call of this expr will cause those to be re-evaluated. This is useful when we want to reuse a tree in different places, but where we must re-expand. */DEFTREECODE (UNSAVE_EXPR, "unsave_expr", "e", 1)/* Represents something whose RTL has already been expanded as a sequence which should be emitted when this expression is expanded. The first operand is the RTL to emit. It is the first of a chain of insns. The second is the RTL expression for the result. */DEFTREECODE (RTL_EXPR, "rtl_expr", "e", 2)/* & in C. Value is the address at which the operand's value resides. Operand may have any mode. Result mode is Pmode. */DEFTREECODE (ADDR_EXPR, "addr_expr", "e", 1)/* Non-lvalue reference or pointer to an object. */DEFTREECODE (REFERENCE_EXPR, "reference_expr", "e", 1)/* Operand is a function constant; result is a function variable value of typeEPmode. Used only for languages that need static chains. */DEFTREECODE (ENTRY_VALUE_EXPR, "entry_value_expr", "e", 1)/* Given two real or integer operands of the same type, returns a complex value of the corresponding complex type. */DEFTREECODE (COMPLEX_EXPR, "complex_expr", "2", 2)/* Complex conjugate of operand. Used only on complex types. */DEFTREECODE (CONJ_EXPR, "conj_expr", "1", 1)/* Used only on an operand of complex type, these return a value of the corresponding component type. */DEFTREECODE (REALPART_EXPR, "realpart_expr", "1", 1)DEFTREECODE (IMAGPART_EXPR, "imagpart_expr", "1", 1)/* Nodes for ++ and -- in C. The second arg is how much to increment or decrement by. For a pointer, it would be the size of the object pointed to. */DEFTREECODE (PREDECREMENT_EXPR, "predecrement_expr", "e", 2)DEFTREECODE (PREINCREMENT_EXPR, "preincrement_expr", "e", 2)DEFTREECODE (POSTDECREMENT_EXPR, "postdecrement_expr", "e", 2)DEFTREECODE (POSTINCREMENT_EXPR, "postincrement_expr", "e", 2)/* Evaluate operand 1. If and only if an exception is thrown during the evaluation of operand 1, evaluate operand 2. This differs from WITH_CLEANUP_EXPR, in that operand 2 is never evaluated unless an exception is throw. */DEFTREECODE (TRY_CATCH_EXPR, "try_catch_expr", "e", 2)/* Pop the top element off the dynamic handler chain. Used in conjunction with setjmp/longjmp based exception handling, see except.c for more details. This is meant to be used only by the exception handling backend, expand_dhc_cleanup specifically. */DEFTREECODE (POPDHC_EXPR, "popdhc_expr", "s", 0)/* Pop the top element off the dynamic cleanup chain. Used in conjunction with the exception handling. This is meant to be used only by the exception handling backend. */DEFTREECODE (POPDCC_EXPR, "popdcc_expr", "s", 0)/* These types of expressions have no useful value, and always have side effects. *//* A label definition, encapsulated as a statement. Operand 0 is the LABEL_DECL node for the label that appears here. The type should be void and the value should be ignored. */DEFTREECODE (LABEL_EXPR, "label_expr", "s", 1)/* GOTO. Operand 0 is a LABEL_DECL node. The type should be void and the value should be ignored. */DEFTREECODE (GOTO_EXPR, "goto_expr", "s", 1)/* RETURN. Evaluates operand 0, then returns from the current function. Presumably that operand is an assignment that stores into the RESULT_DECL that hold the value to be returned. The operand may be null. The type should be void and the value should be ignored. */DEFTREECODE (RETURN_EXPR, "return_expr", "s", 1)/* Exit the inner most loop conditionally. Operand 0 is the condition. The type should be void and the value should be ignored. */DEFTREECODE (EXIT_EXPR, "exit_expr", "s", 1)/* A loop. Operand 0 is the body of the loop. It must contain an EXIT_EXPR or is an infinite loop. The type should be void and the value should be ignored. */DEFTREECODE (LOOP_EXPR, "loop_expr", "s", 1)/*Local variables:mode:cEnd:*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?