📄 fr30.h
字号:
REGNO. In general there is more than one such class; choose a class which is "minimal", meaning that no smaller class also contains the register. */#define REGNO_REG_CLASS(REGNO) \ ( (REGNO) < 8 ? LOW_REGS \ : (REGNO) < CONDITION_CODE_REGNUM ? HIGH_REGS \ : (REGNO) == MD_LOW_REGNUM ? MULTIPLY_32_REG \ : (REGNO) == MD_HIGH_REGNUM ? MULTIPLY_64_REG \ : ALL_REGS)/* A macro whose definition is the name of the class to which a valid base register must belong. A base register is one used in an address which is the register value plus a displacement. */#define BASE_REG_CLASS REAL_REGS/* A macro whose definition is the name of the class to which a valid index register must belong. An index register is one used in an address where its value is either multiplied by a scale factor or added to another register (as well as added to a displacement). */#define INDEX_REG_CLASS REAL_REGS/* A C expression which defines the machine-dependent operand constraint letters for register classes. If CHAR is such a letter, the value should be the register class corresponding to it. Otherwise, the value should be `NO_REGS'. The register letter `r', corresponding to class `GENERAL_REGS', will not be passed to this macro; you do not need to handle it. The following letters are unavailable, due to being used as constraints: '0'..'9' '<', '>' 'E', 'F', 'G', 'H' 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P' 'Q', 'R', 'S', 'T', 'U' 'V', 'X' 'g', 'i', 'm', 'n', 'o', 'p', 'r', 's' */#define REG_CLASS_FROM_LETTER(CHAR) \ ( (CHAR) == 'd' ? MULTIPLY_64_REG \ : (CHAR) == 'e' ? MULTIPLY_32_REG \ : (CHAR) == 'h' ? HIGH_REGS \ : (CHAR) == 'l' ? LOW_REGS \ : (CHAR) == 'a' ? ALL_REGS \ : NO_REGS)/* A C expression which is nonzero if register number NUM is suitable for use as a base register in operand addresses. It may be either a suitable hard register or a pseudo register that has been allocated such a hard register. */#define REGNO_OK_FOR_BASE_P(NUM) 1/* A C expression which is nonzero if register number NUM is suitable for use as an index register in operand addresses. It may be either a suitable hard register or a pseudo register that has been allocated such a hard register. The difference between an index register and a base register is that the index register may be scaled. If an address involves the sum of two registers, neither one of them scaled, then either one may be labeled the "base" and the other the "index"; but whichever labeling is used must fit the machine's constraints of which registers may serve in each capacity. The compiler will try both labelings, looking for one that is valid, and will reload one or both registers only if neither labeling works. */#define REGNO_OK_FOR_INDEX_P(NUM) 1/* A C expression that places additional restrictions on the register class to use when it is necessary to copy value X into a register in class CLASS. The value is a register class; perhaps CLASS, or perhaps another, smaller class. On many machines, the following definition is safe: #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS Sometimes returning a more restrictive class makes better code. For example, on the 68000, when X is an integer constant that is in range for a `moveq' instruction, the value of this macro is always `DATA_REGS' as long as CLASS includes the data registers. Requiring a data register guarantees that a `moveq' will be used. If X is a `const_double', by returning `NO_REGS' you can force X into a memory constant. This is useful on certain machines where immediate floating values cannot be loaded into certain kinds of registers. */#define PREFERRED_RELOAD_CLASS(X, CLASS) CLASS/* A C expression for the maximum number of consecutive registers of class CLASS needed to hold a value of mode MODE. This is closely related to the macro `HARD_REGNO_NREGS'. In fact, the value of the macro `CLASS_MAX_NREGS (CLASS, MODE)' should be the maximum value of `HARD_REGNO_NREGS (REGNO, MODE)' for all REGNO values in the class CLASS. This macro helps control the handling of multiple-word values in the reload pass. */#define CLASS_MAX_NREGS(CLASS, MODE) HARD_REGNO_NREGS (0, MODE)/*}}}*/ /*{{{ CONSTANTS. */ /* A C expression that defines the machine-dependent operand constraint letters (`I', `J', `K', .. 'P') that specify particular ranges of integer values. If C is one of those letters, the expression should check that VALUE, an integer, is in the appropriate range and return 1 if so, 0 otherwise. If C is not one of those letters, the value should be 0 regardless of VALUE. */#define CONST_OK_FOR_LETTER_P(VALUE, C) \ ( (C) == 'I' ? IN_RANGE (VALUE, 0, 15) \ : (C) == 'J' ? IN_RANGE (VALUE, -16, -1) \ : (C) == 'K' ? IN_RANGE (VALUE, 16, 31) \ : (C) == 'L' ? IN_RANGE (VALUE, 0, (1 << 8) - 1) \ : (C) == 'M' ? IN_RANGE (VALUE, 0, (1 << 20) - 1) \ : (C) == 'P' ? IN_RANGE (VALUE, -(1 << 8), (1 << 8) - 1) \ : 0) /* A C expression that defines the machine-dependent operand constraint letters (`G', `H') that specify particular ranges of `const_double' values. If C is one of those letters, the expression should check that VALUE, an RTX of code `const_double', is in the appropriate range and return 1 if so, 0 otherwise. If C is not one of those letters, the value should be 0 regardless of VALUE. `const_double' is used for all floating-point constants and for `DImode' fixed-point constants. A given letter can accept either or both kinds of values. It can use `GET_MODE' to distinguish between these kinds. */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0/* A C expression that defines the optional machine-dependent constraint letters (`Q', `R', `S', `T', `U') that can be used to segregate specific types of operands, usually memory references, for the target machine. Normally this macro will not be defined. If it is required for a particular target machine, it should return 1 if VALUE corresponds to the operand type represented by the constraint letter C. If C is not defined as an extra constraint, the value returned should be 0 regardless of VALUE. For example, on the ROMP, load instructions cannot have their output in r0 if the memory reference contains a symbolic address. Constraint letter `Q' is defined as representing a memory address that does *not* contain a symbolic address. An alternative is specified with a `Q' constraint on the input and `r' on the output. The next alternative specifies `m' on the input and a register class that does not include r0 on the output. */#define EXTRA_CONSTRAINT(VALUE, C) \ ((C) == 'Q' ? (GET_CODE (VALUE) == MEM && GET_CODE (XEXP (VALUE, 0)) == SYMBOL_REF) : 0)/*}}}*/ /*{{{ Basic Stack Layout. */ /* Define this macro if pushing a word onto the stack moves the stack pointer to a smaller address. */#define STACK_GROWS_DOWNWARD 1/* Define this macro if the addresses of local variable slots are at negative offsets from the frame pointer. */#define FRAME_GROWS_DOWNWARD 1/* Offset from the frame pointer to the first local variable slot to be allocated. If `FRAME_GROWS_DOWNWARD', find the next slot's offset by subtracting the first slot's length from `STARTING_FRAME_OFFSET'. Otherwise, it is found by adding the length of the first slot to the value `STARTING_FRAME_OFFSET'. *//* #define STARTING_FRAME_OFFSET -4 */#define STARTING_FRAME_OFFSET 0/* Offset from the stack pointer register to the first location at which outgoing arguments are placed. If not specified, the default value of zero is used. This is the proper value for most machines. If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first location at which outgoing arguments are placed. */#define STACK_POINTER_OFFSET 0/* Offset from the argument pointer register to the first argument's address. On some machines it may depend on the data type of the function. If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first argument's address. */#define FIRST_PARM_OFFSET(FUNDECL) 0/* A C expression whose value is RTL representing the location of the incoming return address at the beginning of any function, before the prologue. This RTL is either a `REG', indicating that the return value is saved in `REG', or a `MEM' representing a location in the stack. You only need to define this macro if you want to support call frame debugging information like that provided by DWARF 2. */#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (SImode, RETURN_POINTER_REGNUM)/*}}}*/ /*{{{ Register That Address the Stack Frame. */ /* The register number of the arg pointer register, which is used to access the function's argument list. On some machines, this is the same as the frame pointer register. On some machines, the hardware determines which register this is. On other machines, you can choose any register you wish for this purpose. If this is not the same register as the frame pointer register, then you must mark it as a fixed register according to `FIXED_REGISTERS', or arrange to be able to eliminate it. */#define ARG_POINTER_REGNUM 20/*}}}*/ /*{{{ Eliminating the Frame Pointer and the Arg Pointer. */ /* A C expression which is nonzero if a function must have and use a frame pointer. This expression is evaluated in the reload pass. If its value is nonzero the function will have a frame pointer. The expression can in principle examine the current function and decide according to the facts, but on most machines the constant 0 or the constant 1 suffices. Use 0 when the machine allows code to be generated with no frame pointer, and doing so saves some time or space. Use 1 when there is no possible advantage to avoiding a frame pointer. In certain cases, the compiler does not know how to produce valid code without a frame pointer. The compiler recognizes those cases and automatically gives the function a frame pointer regardless of what `FRAME_POINTER_REQUIRED' says. You don't need to worry about them. In a function that does not require a frame pointer, the frame pointer register can be allocated for ordinary usage, unless you mark it as a fixed register. See `FIXED_REGISTERS' for more information. *//* #define FRAME_POINTER_REQUIRED 0 */#define FRAME_POINTER_REQUIRED \ (flag_omit_frame_pointer == 0 || current_function_pretend_args_size > 0)/* If defined, this macro specifies a table of register pairs used to eliminate unneeded registers that point into the stack frame. If it is not defined, the only elimination attempted by the compiler is to replace references to the frame pointer with references to the stack pointer. The definition of this macro is a list of structure initializations, each of which specifies an original and replacement register. On some machines, the position of the argument pointer is not known until the compilation is completed. In such a case, a separate hard register must be used for the argument pointer. This register can be eliminated by replacing it with either the frame pointer or the argument pointer, depending on whether or not the frame pointer has been eliminated. In this case, you might specify: #define ELIMINABLE_REGS \ {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}} Note that the elimination of the argument pointer with the stack pointer is specified first since that is the preferred elimination. */#define ELIMINABLE_REGS \{ \ {ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \}/* A C expression that returns nonzero if the compiler is allowed to try to replace register number FROM with register number TO. This macro need only be defined if `ELIMINABLE_REGS' is defined, and will usually be the constant 1, since most of the cases preventing register elimination are things that the compiler already knows about. */#define CAN_ELIMINATE(FROM, TO) \ ((TO) == FRAME_POINTER_REGNUM || ! frame_pointer_needed)/* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'. It specifies the initial difference between the specified pair of registers. This macro must be defined if `ELIMINABLE_REGS' is defined. */#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ (OFFSET) = fr30_compute_frame_size (FROM, TO)/*}}}*/ /*{{{ Passing Function Arguments on the Stack. */ /* Define this macro if an argument declared in a prototype as an integral type smaller than `int' should actually be passed as an `int'. In addition to avoiding errors in certain cases of mismatch, it also makes for better code on certain machines. */#define PROMOTE_PROTOTYPES 1/* If defined, the maximum amount of space required for outgoing arguments will be computed and placed into the variable `current_function_outgoing_args_size'. No space will be pushed onto the stack for each call; instead, the function prologue should increase the stack frame size by this amount. Defining both `PUSH_ROUNDING' and `ACCUMULATE_OUTGOING_ARGS' is not proper. */#define ACCUMULATE_OUTGOING_ARGS 1/* A C expression that should indicate the number of bytes of its own arguments that a function pops on returning, or 0 if the function pops no arguments and the caller must therefore pop them all after the function returns. FUNDECL is a C variable whose value is a tree node that describes the function in question. Normally it is a node of type `FUNCTION_DECL' that describes the declaration of the function. From this it is possible to obtain the DECL_ATTRIBUTES of the function. 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, FUNTYPE 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 RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0/* Implement `va_arg'. */#define EXPAND_BUILTIN_VA_ARG(valist, type) \ fr30_va_arg (valist, type)/*}}}*/ /*{{{ Function Arguments in Registers. */ /* Nonzero if we do not know how to pass TYPE solely in registers. We cannot do so in the following cases: - if the type has variable size - if the type is marked as addressable (it is required to be constructed into the stack) - if the type is a structure or union. */#define MUST_PASS_IN_STACK(MODE, TYPE) \ (((MODE) == BLKmode) \ || ((TYPE) != NULL \ && TYPE_SIZE (TYPE) != NULL \
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -