📄 ip2k.h
字号:
FUNTYPE is a C variable whose value is a tree node that describes the function in question. Normally it is a node of type `FUNCTION_TYPE' that describes the data type of the function. From this it is possible to obtain the data types of the value and arguments (if known). When a call to a library function is being considered, FUNDECL will contain an identifier node for the library function. Thus, if you need to distinguish among various library functions, you can do so by their names. Note that "library function" in this context means a function used to perform arithmetic, whose name is known specially in the compiler and was not mentioned in the C code being compiled. STACK-SIZE is the number of bytes of arguments passed on the stack. If a variable number of bytes is passed, it is zero, and argument popping will always be the responsibility of the calling function. On the VAX, all functions always pop their arguments, so the definition of this macro is STACK-SIZE. On the 68000, using the standard calling convention, no functions pop their arguments, so the value of the macro is always 0 in this case. But an alternative calling convention is available in which functions that take a fixed number of arguments pop them but other functions (such as `printf') pop nothing (the caller pops all). When this convention is in use, FUNTYPE is examined to determine whether a function takes a fixed number of arguments. */#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) 0/* A C expression that controls whether a function argument is passed in a register, and which register. The arguments are CUM, which summarizes all the previous arguments; MODE, the machine mode of the argument; TYPE, the data type of the argument as a tree node or 0 if that is not known (which happens for C support library functions); and NAMED, which is 1 for an ordinary argument and 0 for nameless arguments that correspond to `...' in the called function's prototype. The value of the expression is usually either a `reg' RTX for the hard register in which to pass the argument, or zero to pass the argument on the stack. For machines like the VAX and 68000, where normally all arguments are pushed, zero suffices as a definition. The value of the expression can also be a `parallel' RTX. This is used when an argument is passed in multiple locations. The mode of the of the `parallel' should be the mode of the entire argument. The `parallel' holds any number of `expr_list' pairs; each one describes where part of the argument is passed. In each `expr_list', the first operand can be either a `reg' RTX for the hard register in which to pass this part of the argument, or zero to pass the argument on the stack. If this operand is a `reg', then the mode indicates how large this part of the argument is. The second operand of the `expr_list' is a `const_int' which gives the offset in bytes into the entire argument where this part starts. The usual way to make the ANSI library `stdarg.h' work on a machine where some arguments are usually passed in registers, is to cause nameless arguments to be passed on the stack instead. This is done by making `FUNCTION_ARG' return 0 whenever NAMED is 0. You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of this macro to determine if this argument is of a type that must be passed in the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG' returns nonzero for such an argument, the compiler will abort. If `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the stack and then loaded into a register. */#define CUMULATIVE_ARGS int/* A C type for declaring a variable that is used as the first argument of `FUNCTION_ARG' and other related values. For some target machines, the type `int' suffices and can hold the number of bytes of argument so far. There is no need to record in `CUMULATIVE_ARGS' anything about the arguments that have been passed on the stack. The compiler has other variables to keep track of that. For target machines on which all arguments are passed on the stack, there is no need to store anything in `CUMULATIVE_ARGS'; however, the data structure must exist and should not be empty, so use `int'. */#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \ ((CUM) = 0)/* A C statement (sans semicolon) for initializing the variable CUM for the state at the beginning of the argument list. The variable has type `CUMULATIVE_ARGS'. The value of FNTYPE is the tree node for the data type of the function which will receive the args, or 0 if the args are to a compiler support library function. The value of INDIRECT is nonzero when processing an indirect call, for example a call through a function pointer. The value of INDIRECT is zero for a call to an explicitly named function, a library function call, or when `INIT_CUMULATIVE_ARGS' is used to find arguments for the function being compiled. When processing a call to a compiler support library function, LIBNAME identifies which one. It is a `symbol_ref' rtx which contains the name of the function, as a string. LIBNAME is 0 when an ordinary C function call is being processed. Thus, each time this macro is called, either LIBNAME or FNTYPE is nonzero, but never both of them at once. */#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)/* All arguments are passed on stack - do nothing here. *//* A C statement (sans semicolon) to update the summarizer variable CUM to advance past an argument in the argument list. The values MODE, TYPE and NAMED describe that argument. Once this is done, the variable CUM is suitable for analyzing the *following* argument with `FUNCTION_ARG', etc. This macro need not do anything if the argument in question was passed on the stack. The compiler knows how to track the amount of stack space used for arguments without any special help. */#define FUNCTION_ARG_REGNO_P(R) 0/* A C expression that is nonzero if REGNO is the number of a hard register in which function arguments are sometimes passed. This does *not* include implicit arguments such as the static chain and the structure-value address. On many machines, no registers can be used for this purpose since all function arguments are pushed on the stack. */#define FUNCTION_VALUE(VALTYPE, FUNC) \ ((TYPE_MODE (VALTYPE) == QImode) \ ? gen_rtx_REG (TYPE_MODE (VALTYPE), REG_RESULT + 1) \ : gen_rtx_REG (TYPE_MODE (VALTYPE), REG_RESULT))/* Because functions returning 'char' actually widen to 'int', we have to use $81 as the return location if we think we only have a 'char'. *//* A C expression to create an RTX representing the place where a function returns a value of data type VALTYPE. VALTYPE is a tree node representing a data type. Write `TYPE_MODE (VALTYPE)' to get the machine mode used to represent that type. On many machines, only the mode is relevant. (Actually, on most machines, scalar values are returned in the same place regardless of mode). The value of the expression is usually a `reg' RTX for the hard register where the return value is stored. The value can also be a `parallel' RTX, if the return value is in multiple places. See `FUNCTION_ARG' for an explanation of the `parallel' form. If `PROMOTE_FUNCTION_RETURN' is defined, you must apply the same promotion rules specified in `PROMOTE_MODE' if VALTYPE is a scalar type. If the precise function being called is known, FUNC is a tree node (`FUNCTION_DECL') for it; otherwise, FUNC is a null pointer. This makes it possible to use a different value-returning convention for specific functions when all their calls are known. `FUNCTION_VALUE' is not used for return vales with aggregate data types, because these are returned in another way. See `STRUCT_VALUE_REGNUM' and related macros, below. */#define LIBCALL_VALUE(MODE) gen_rtx_REG ((MODE), REG_RESULT)/* A C expression to create an RTX representing the place where a library function returns a value of mode MODE. If the precise function being called is known, FUNC is a tree node (`FUNCTION_DECL') for it; otherwise, FUNC is a null pointer. This makes it possible to use a different value-returning convention for specific functions when all their calls are known. Note that "library function" in this context means a compiler support routine, used to perform arithmetic, whose name is known specially by the compiler and was not mentioned in the C code being compiled. The definition of `LIBRARY_VALUE' need not be concerned aggregate data types, because none of the library functions returns such types. */#define FUNCTION_VALUE_REGNO_P(N) ((N) == REG_RESULT)/* A C expression that is nonzero if REGNO is the number of a hard register in which the values of called function may come back. A register whose use for returning values is limited to serving as the second of a pair (for a value of type `double', say) need not be recognized by this macro. So for most machines, this definition suffices: #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0) If the machine has register windows, so that the caller and the called function use different registers for the return value, this macro should recognize only the caller's register numbers. */#define RETURN_IN_MEMORY(TYPE) \ ((TYPE_MODE (TYPE) == BLKmode) ? int_size_in_bytes (TYPE) > 8 : 0)/* A C expression which can inhibit the returning of certain function values in registers, based on the type of value. A nonzero value says to return the function value in memory, just as large structures are always returned. Here TYPE will be a C expression of type `tree', representing the data type of the value. Note that values of mode `BLKmode' must be explicitly handled by this macro. Also, the option `-fpcc-struct-return' takes effect regardless of this macro. On most systems, it is possible to leave the macro undefined; this causes a default definition to be used, whose value is the constant 1 for `BLKmode' values, and 0 otherwise. Do not use this macro to indicate that structures and unions should always be returned in memory. You should instead use `DEFAULT_PCC_STRUCT_RETURN' to indicate this. *//* Indicate that large structures are passed by reference. */#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM,MODE,TYPE,NAMED) 0#define DEFAULT_PCC_STRUCT_RETURN 0/* Define this macro to be 1 if all structure and union return values must be in memory. Since this results in slower code, this should be defined only if needed for compatibility with other compilers or with an ABI. If you define this macro to be 0, then the conventions used for structure and union return values are decided by the `RETURN_IN_MEMORY' macro. If not defined, this defaults to the value 1. */#define STRUCT_VALUE 0/* If the structure value address is not passed in a register, define `STRUCT_VALUE' as an expression returning an RTX for the place where the address is passed. If it returns 0, the address is passed as an "invisible" first argument. */#define STRUCT_VALUE_INCOMING 0/* If the incoming location is not a register, then you should define `STRUCT_VALUE_INCOMING' as an expression for an RTX for where the called function should find the value. If it should find the value on the stack, define this to create a `mem' which refers to the frame pointer. A definition of 0 means that the address is passed as an "invisible" first argument. */#define EPILOGUE_USES(REGNO) 0/* Define this macro as a C expression that is nonzero for registers are used by the epilogue or the `return' pattern. The stack and frame pointer registers are already be assumed to be used as needed. */#define SETUP_INCOMING_VARARGS(ARGS_SO_FAR,MODE,TYPE, \ PRETEND_ARGS_SIZE,SECOND_TIME) \ ((PRETEND_ARGS_SIZE) = (0))/* Hmmm. We don't actually like constants as addresses - they always need to be loaded to a register, except for function calls which take an address by immediate value. But changing this to zero had negative effects, causing the compiler to get very confused.... */#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)/* A C expression that is 1 if the RTX X is a constant which is a valid address. On most machines, this can be defined as `CONSTANT_P (X)', but a few machines are more restrictive in which constant addresses are supported. `CONSTANT_P' accepts integer-values expressions whose values are not explicitly known, such as `symbol_ref', `label_ref', and `high' expressions and `const' arithmetic expressions, in addition to `const_int' and `const_double' expressions. */#define MAX_REGS_PER_ADDRESS 1/* A number, the maximum number of registers that can appear in a valid memory address. Note that it is up to you to specify a value equal to the maximum number that `GO_IF_LEGITIMATE_ADDRESS' would ever accept. */#ifdef REG_OK_STRICT# define GO_IF_LEGITIMATE_ADDRESS(MODE, OPERAND, ADDR) \{ \ if (legitimate_address_p ((MODE), (OPERAND), 1)) \ goto ADDR; \}#else# define GO_IF_LEGITIMATE_ADDRESS(MODE, OPERAND, ADDR) \{ \ if (legitimate_address_p ((MODE), (OPERAND), 0)) \ goto ADDR; \}#endif/* A C compound statement with a conditional `goto LABEL;' executed if X (an RTX) is a legitimate memory address on the target machine for a memory operand of mode MODE. It usually pays to define several simpler macros to serve as subroutines for this one. Otherwise it may be too complicated to understand. This macro must exist in two variants: a strict variant and a non-strict one. The strict variant is used in the reload pass. It must be defined so that any pseudo-register that has not been allocated a hard register is considered a memory reference. I
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -