📄 ia64.h
字号:
#define FIRST_PARM_OFFSET(FUNDECL) 0/* A C expression whose value is RTL representing the value of the return address for the frame COUNT steps up from the current frame, after the prologue. *//* ??? Frames other than zero would likely require interpreting the frame unwind info, so we don't try to support them. We would also need to define DYNAMIC_CHAIN_ADDRESS and SETUP_FRAME_ADDRESS (for the reg stack flush). */#define RETURN_ADDR_RTX(COUNT, FRAME) \ ia64_return_addr_rtx (COUNT, FRAME)/* 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. This enables DWARF2 unwind info for C++ EH. */#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (VOIDmode, BR_REG (0))/* ??? This is not defined because of three problems. 1) dwarf2out.c assumes that DWARF_FRAME_RETURN_COLUMN fits in one byte. The default value is FIRST_PSEUDO_REGISTER which doesn't. This can be worked around by setting PC_REGNUM to FR_REG (0) which is an otherwise unused register number. 2) dwarf2out_frame_debug core dumps while processing prologue insns. We need to refine which insns have RTX_FRAME_RELATED_P set and which don't. 3) It isn't possible to turn off EH frame info by defining DWARF2_UNIND_INFO to zero, despite what the documentation implies, because it is tested in a few places with #ifdef instead of #if. */#undef INCOMING_RETURN_ADDR_RTX/* A C expression whose value is an integer giving the offset, in bytes, from the value of the stack pointer register to the top of the stack frame at the beginning of any function, before the prologue. The top of the frame is defined to be the value of the stack pointer in the previous frame, just before the call instruction. *//* The CFA is past the red zone, not at the entry-point stack pointer. */#define INCOMING_FRAME_SP_OFFSET STACK_POINTER_OFFSET/* 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 12/* 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 328/* Base register for access to local variables of the function. */#define HARD_FRAME_POINTER_REGNUM LOC_REG (79)/* The register number of the arg pointer register, which is used to access the function's argument list. *//* r0 won't otherwise be used, so put the always eliminated argument pointer in it. */#define ARG_POINTER_REGNUM R_GR(0)/* Due to the way varargs and argument spilling happens, the argument pointer is not 16-byte aligned like the stack pointer. */#define INIT_EXPANDERS \ do { \ if (cfun && cfun->emit->regno_pointer_align) \ REGNO_POINTER_ALIGN (ARG_POINTER_REGNUM) = 64; \ } while (0)/* Register numbers used for passing a function's static chain pointer. *//* ??? The ABI sez the static chain should be passed as a normal parameter. */#define STATIC_CHAIN_REGNUM 15/* 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. */#define FRAME_POINTER_REQUIRED 0/* Show we can debug even without a frame pointer. */#define CAN_DEBUG_WITHOUT_FP/* If defined, this macro specifies a table of register pairs used to eliminate unneeded registers that point into the stack frame. */#define ELIMINABLE_REGS \{ \ {ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ {ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \ {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ {FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \}/* A C expression that returns nonzero if the compiler is allowed to try to replace register number FROM with register number TO. The frame pointer is automatically handled. */#define CAN_ELIMINATE(FROM, TO) \ (TO == BR_REG (0) ? current_function_is_leaf : 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) \ ((OFFSET) = ia64_initial_elimination_offset ((FROM), (TO)))/* Passing Function Arguments on the Stack *//* If defined, the maximum amount of space required for outgoing arguments will be computed and placed into the variable `current_function_outgoing_args_size'. */#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. */#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0/* Function Arguments in Registers */#define MAX_ARGUMENT_SLOTS 8#define MAX_INT_RETURN_SLOTS 4#define GR_ARG_FIRST IN_REG (0)#define GR_RET_FIRST GR_REG (8)#define GR_RET_LAST GR_REG (11)#define FR_ARG_FIRST FR_REG (8)#define FR_RET_FIRST FR_REG (8)#define FR_RET_LAST FR_REG (15)#define AR_ARG_FIRST OUT_REG (0)/* A C expression that controls whether a function argument is passed in a register, and which register. */#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ia64_function_arg (&CUM, MODE, TYPE, NAMED, 0)/* Define this macro if the target machine has "register windows", so that the register in which a function sees an arguments is not necessarily the same as the one in which the caller passed the argument. */#define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \ ia64_function_arg (&CUM, MODE, TYPE, NAMED, 1)/* 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. */typedef struct ia64_args{ int words; /* # words of arguments so far */ int int_regs; /* # GR registers used so far */ int fp_regs; /* # FR registers used so far */ int prototype; /* whether function prototyped */} CUMULATIVE_ARGS;/* A C statement (sans semicolon) for initializing the variable CUM for the state at the beginning of the argument list. */#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \do { \ (CUM).words = 0; \ (CUM).int_regs = 0; \ (CUM).fp_regs = 0; \ (CUM).prototype = ((FNTYPE) && TYPE_ARG_TYPES (FNTYPE)) || (LIBNAME); \} while (0)/* Like `INIT_CUMULATIVE_ARGS' but overrides it for the purposes of finding the arguments for the function being compiled. If this macro is undefined, `INIT_CUMULATIVE_ARGS' is used instead. *//* We set prototype to true so that we never try to return a PARALLEL from function_arg. */#define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \do { \ (CUM).words = 0; \ (CUM).int_regs = 0; \ (CUM).fp_regs = 0; \ (CUM).prototype = 1; \} while (0)/* 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'. */#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ia64_function_arg_advance (&CUM, MODE, TYPE, NAMED)/* If defined, a C expression that gives the alignment boundary, in bits, of an argument with the specified mode and type. *//* Return the alignment boundary in bits for an argument with a specified mode and type. */#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ ia64_function_arg_boundary (MODE, TYPE)/* 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_ARG_REGNO_P(REGNO) \(((REGNO) >= AR_ARG_FIRST && (REGNO) < (AR_ARG_FIRST + MAX_ARGUMENT_SLOTS)) \ || ((REGNO) >= FR_ARG_FIRST && (REGNO) < (FR_ARG_FIRST + MAX_ARGUMENT_SLOTS)))/* How Scalar Function Values are Returned *//* A C expression to create an RTX representing the place where a function returns a value of data type VALTYPE. */#define FUNCTION_VALUE(VALTYPE, FUNC) \ ia64_function_value (VALTYPE, FUNC)/* A C expression to create an RTX representing the place where a library function returns a value of mode MODE. */#define LIBCALL_VALUE(MODE) \ gen_rtx_REG (MODE, \ (((GET_MODE_CLASS (MODE) == MODE_FLOAT \ || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT) && \ (MODE) != TFmode) \ ? FR_RET_FIRST : GR_RET_FIRST))/* 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. */#define FUNCTION_VALUE_REGNO_P(REGNO) \ (((REGNO) >= GR_RET_FIRST && (REGNO) <= GR_RET_LAST) \ || ((REGNO) >= FR_RET_FIRST && (REGNO) <= FR_RET_LAST))/* How Large Values are Returned */#define DEFAULT_PCC_STRUCT_RETURN 0/* Caller-Saves Register Allocation *//* A C expression to determine whether it is worthwhile to consider placing a pseudo-register in a call-clobbered hard register and saving and restoring it around each function call. The expression should be 1 when this is worth doing, and 0 otherwise. If you don't define this macro, a default is used which is good on most machines: `4 * CALLS < REFS'. *//* ??? Investigate. *//* #define CALLER_SAVE_PROFITABLE(REFS, CALLS) *//* Function Entry and Exit *//* Define this macro as a C expression that is nonzero if the return instruction or the function epilogue ignores the value of the stack pointer; in other words, if it is safe to delete an instruction to adjust the stack pointer before a return from the function. */#define EXIT_IGNORE_STACK 1/* Define this macro as a C expression that is nonzero for registers used by the epilogue or the `return' pattern. */#define EPILOGUE_USES(REGNO) ia64_epilogue_uses (REGNO)/* Nonzero for registers used by the exception handling mechanism. */#define EH_USES(REGNO) ia64_eh_uses (REGNO)/* Output part N of a function descriptor for DECL. For ia64, both words are emitted with a single relocation, so ignore N > 0. */#define ASM_OUTPUT_FDESC(FILE, DECL, PART) \do { \ if ((PART) == 0) \ { \ if (TARGET_ILP32) \ fputs ("\tdata8.ua @iplt(", FILE); \ else \ fputs ("\tdata16.ua @iplt(", FILE); \ mark_decl_referenced (DECL); \ assemble_name (FILE, XSTR (XEXP (DECL_RTL (DECL), 0), 0)); \ fputs (")\n", FILE); \ if (TARGET_ILP32) \ fputs ("\tdata8.ua 0\n", FILE); \ } \} while (0)/* Generating Code for Profiling. *//* A C statement or compound statement to output to FILE some assembler code to call the profiling subroutine `mcount'. */#undef FUNCTION_PROFILER#define FUNCTION_PROFILER(FILE, LABELNO) \ ia64_output_function_profiler(FILE, LABELNO)/* Neither hpux nor linux use profile counters. */#define NO_PROFILE_COUNTERS 1/* Trampolines for Nested Functions. *//* We need 32 bytes, so we can save the sp, ar.rnat, ar.bsp, and ar.pfs of the function containing a non-local goto target. */#define STACK_SAVEAREA_MODE(LEVEL) \ ((LEVEL) == SAVE_NONLOCAL ? OImode : Pmode)/* Output assembler code for a block containing the constant parts of a trampoline, leaving space for the variable parts. The trampoline should set the static chain pointer to value placed into the trampoline and should branch to the specified routine. To make the normal indirect-subroutine calling convention work, the trampoline must look like a function descriptor; the first word being the target address and the second being the target's global pointer. We abuse the concept of a global pointer by arranging for it
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -