📄 d30v.h
字号:
languages where such a recovery is supported. The default value of 75 words should be adequate for most machines. *//* #define STACK_CHECK_PROTECT *//* The maximum size of a stack frame, in bytes. GNU CC will generate probe instructions in non-leaf functions to ensure at least this many bytes of stack are available. If a stack frame is larger than this size, stack checking will not be reliable and GNU CC will issue a warning. The default is chosen so that GNU CC only generates one instruction on most systems. You should normally not change the default value of this macro. *//* #define STACK_CHECK_MAX_FRAME_SIZE *//* GNU CC uses this value to generate the above warning message. It represents the amount of fixed frame used by a function, not including space for any callee-saved registers, temporaries and user variables. You need only specify an upper bound for this amount and will normally use the default of four words. *//* #define STACK_CHECK_FIXED_FRAME_SIZE *//* The maximum size, in bytes, of an object that GNU CC will place in the fixed area of the stack frame when the user specifies `-fstack-check'. GNU CC computed the default from the values of the above macros and you will normally not need to override that default. *//* #define STACK_CHECK_MAX_VAR_SIZE *//* Register That Address the Stack Frame. *//* The register number of the stack pointer register, which must also be a fixed register according to `FIXED_REGISTERS'. On most machines, the hardware determines which register this is. */#define STACK_POINTER_REGNUM GPR_SP/* The register number of the frame pointer register, which is used to access automatic variables in the stack frame. On some machines, the hardware determines which register this is. On other machines, you can choose any register you wish for this purpose. */#define FRAME_POINTER_REGNUM GPR_FP/* On some machines the offset between the frame pointer and starting offset of the automatic variables is not known until after register allocation has been done (for example, because the saved registers are between these two locations). On those machines, define `FRAME_POINTER_REGNUM' the number of a special, fixed register to be used internally until the offset is known, and define `HARD_FRAME_POINTER_REGNUM' to be actual the hard register number used for the frame pointer. You should define this macro only in the very rare circumstances when it is not possible to calculate the offset between the frame pointer and the automatic variables until after register allocation has been completed. When this macro is defined, you must also indicate in your definition of `ELIMINABLE_REGS' how to eliminate `FRAME_POINTER_REGNUM' into either `HARD_FRAME_POINTER_REGNUM' or `STACK_POINTER_REGNUM'. Do not define this macro if it would be the same as `FRAME_POINTER_REGNUM'. *//* #define HARD_FRAME_POINTER_REGNUM *//* 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 (*note Elimination::.). *//* #define ARG_POINTER_REGNUM *//* The register number of the return address pointer register, which is used to access the current function's return address from the stack. On some machines, the return address is not at a fixed offset from the frame pointer or stack pointer or argument pointer. This register can be defined to point to the return address on the stack, and then be converted by `ELIMINABLE_REGS' into either the frame pointer or stack pointer. Do not define this macro unless there is no other way to get the return address from the stack. *//* #define RETURN_ADDRESS_POINTER_REGNUM *//* Register numbers used for passing a function's static chain pointer. If register windows are used, the register number as seen by the called function is `STATIC_CHAIN_INCOMING_REGNUM', while the register number as seen by the calling function is `STATIC_CHAIN_REGNUM'. If these registers are the same, `STATIC_CHAIN_INCOMING_REGNUM' need not be defined. The static chain register need not be a fixed register. If the static chain is passed in memory, these macros should not be defined; instead, the next two macros should be defined. */#define STATIC_CHAIN_REGNUM (GPR_FIRST + 18)/* #define STATIC_CHAIN_INCOMING_REGNUM *//* If the static chain is passed in memory, these macros provide rtx giving `mem' expressions that denote where they are stored. `STATIC_CHAIN' and `STATIC_CHAIN_INCOMING' give the locations as seen by the calling and called functions, respectively. Often the former will be at an offset from the stack pointer and the latter at an offset from the frame pointer. The variables `stack_pointer_rtx', `frame_pointer_rtx', and `arg_pointer_rtx' will have been initialized prior to the use of these macros and should be used to refer to those items. If the static chain is passed in a register, the two previous macros should be defined instead. *//* #define STATIC_CHAIN *//* #define STATIC_CHAIN_INCOMING *//* 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/* A C statement to store in the variable DEPTH-VAR the difference between the frame pointer and the stack pointer values immediately after the function prologue. The value would be computed from information such as the result of `get_frame_size ()' and the tables of registers `regs_ever_live' and `call_used_regs'. If `ELIMINABLE_REGS' is defined, this macro will be not be used and need not be defined. Otherwise, it must be defined even if `FRAME_POINTER_REQUIRED' is defined to always be true; in that case, you may set DEPTH-VAR to anything. *//* #define INITIAL_FRAME_POINTER_OFFSET(DEPTH_VAR) *//* 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-REG with register number TO-REG. 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) \ ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM \ ? ! frame_pointer_needed \ : 1)/* 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) \{ \ d30v_stack_t *info = d30v_stack_info (); \ \ if ((FROM) == FRAME_POINTER_REGNUM) \ (OFFSET) = 0; \ else if ((FROM) == ARG_POINTER_REGNUM) \ (OFFSET) = info->total_size - current_function_pretend_args_size; \ else \ abort (); \}/* 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 *//* A C expression that is the number of bytes actually pushed onto the stack when an instruction attempts to push NPUSHED bytes. If the target machine does not have a push instruction, do not define this macro. That directs GNU CC to use an alternate strategy: to allocate the entire argument block and then store the arguments into it. On some machines, the definition #define PUSH_ROUNDING(BYTES) (BYTES) will suffice. But on other machines, instructions that appear to push one byte actually push two bytes in an attempt to maintain alignment. Then the definition should be #define PUSH_ROUNDING(BYTES) (((BYTES) + 1) & ~1) *//* #define PUSH_ROUNDING(NPUSHED) *//* 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/* Define this macro if functions should assume that stack space has been allocated for arguments even when their values are passed in registers. The value of this macro is the size, in bytes, of the area reserved for arguments passed in registers for the function represented by FNDECL. This space can be allocated by the caller, or be a part of the machine-dependent stack frame: `OUTGOING_REG_PARM_STACK_SPACE' says which. *//* #define REG_PARM_STACK_SPACE(FNDECL) *//* Define these macros in addition to the one above if functions might allocate stack space for arguments even when their values are passed in registers. These should be used when the stack space allocated for arguments in registers is not a simple constant independent of the function declaration. The value of the first macro is the size, in bytes, of the area that we should initially assume would be reserved for arguments passed in registers. The value of the second macro is the actual size, in bytes, of the area that will be reserved for arguments passed in registers. This takes two arguments: an integer representing the number of bytes of fixed sized arguments on the stack, and a tree representing the number of bytes of variable sized arguments on the stack. When these macros are defined, `REG_PARM_STACK_SPACE' will only be called for libcall functions, the current function, or for a function being called when it is known that such stack space must be allocated. In each case this value can be easily computed. When deciding whether a called function needs such stack space, and how much space to reserve, GNU CC uses these two macros instead of `REG_PARM_STACK_SPACE'. *//* #define MAYBE_REG_PARM_STACK_SPACE *//* #define FINAL_REG_PARM_STACK_SPACE(CONST_SIZE, VAR_SIZE) *//* Define this if it is the responsibility of the caller to allocate the area reserved for arguments passed in registers. If `ACCUMULATE_OUTGOING_ARGS' is defined, this macro controls whether the space for these arguments counts in the value of `current_function_outgoing_args_size'. *//* #define OUTGOING_REG_PARM_STACK_SPACE *//* Define this macro if `REG_PARM_STACK_SPACE' is defined, but the stack parameters don't skip the area specified by it. Normally, when a parameter is not passed in registers, it is placed on the stack beyond the `REG_PARM_STACK_SPACE' area. Defining this macro suppresses this behavior and causes the parameter to be passed on the stack in its natural location. *//* #define STACK_PARMS_IN_REG_PARM_AREA *//* 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 th
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -