📄 ia64.h
字号:
Do not reload expressions into AR regs. */#define PREFERRED_RELOAD_CLASS(X, CLASS) \ (CLASS == FR_REGS && GET_CODE (X) == MEM && MEM_VOLATILE_P (X) ? NO_REGS \ : CLASS == FR_REGS && GET_CODE (X) == CONST_DOUBLE ? NO_REGS \ : GET_RTX_CLASS (GET_CODE (X)) != 'o' \ && (CLASS == AR_M_REGS || CLASS == AR_I_REGS) ? NO_REGS \ : CLASS)/* You should define this macro to indicate to the reload phase that it may need to allocate at least one register for a reload in addition to the register to contain the data. Specifically, if copying X to a register CLASS in MODE requires an intermediate register, you should define this to return the largest register class all of whose registers can be used as intermediate registers or scratch registers. */#define SECONDARY_RELOAD_CLASS(CLASS, MODE, X) \ ia64_secondary_reload_class (CLASS, MODE, X)/* Certain machines have the property that some registers cannot be copied to some other registers without using memory. Define this macro on those machines to be a C expression that is nonzero if objects of mode M in registers of CLASS1 can only be copied to registers of class CLASS2 by storing a register of CLASS1 into memory and loading that memory location into a register of CLASS2. */#if 0/* ??? May need this, but since we've disallowed TFmode in GR_REGS, I'm not quite sure how it could be invoked. The normal problems with unions should be solved with the addressof fiddling done by movtf and friends. */#define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \ ((MODE) == TFmode && (((CLASS1) == GR_REGS && (CLASS2) == FR_REGS) \ || ((CLASS1) == FR_REGS && (CLASS2) == GR_REGS)))#endif/* 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'. */#define CLASS_MAX_NREGS(CLASS, MODE) \ ((MODE) == BImode && (CLASS) == PR_REGS ? 2 \ : ((CLASS) == FR_REGS && (MODE) == TFmode) ? 1 \ : (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)/* In FP regs, we can't change FP values to integer values and vice versa, but we can change e.g. DImode to SImode. */#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ (GET_MODE_CLASS (FROM) != GET_MODE_CLASS (TO) \ ? reg_classes_intersect_p (CLASS, FR_REGS) : 0)/* A C expression that defines the machine-dependent operand constraint letters (`I', `J', `K', .. 'P') that specify particular ranges of integer values. *//* 14 bit signed immediate for arithmetic instructions. */#define CONST_OK_FOR_I(VALUE) \ ((unsigned HOST_WIDE_INT)(VALUE) + 0x2000 < 0x4000)/* 22 bit signed immediate for arith instructions with r0/r1/r2/r3 source. */#define CONST_OK_FOR_J(VALUE) \ ((unsigned HOST_WIDE_INT)(VALUE) + 0x200000 < 0x400000)/* 8 bit signed immediate for logical instructions. */#define CONST_OK_FOR_K(VALUE) ((unsigned HOST_WIDE_INT)(VALUE) + 0x80 < 0x100)/* 8 bit adjusted signed immediate for compare pseudo-ops. */#define CONST_OK_FOR_L(VALUE) ((unsigned HOST_WIDE_INT)(VALUE) + 0x7F < 0x100)/* 6 bit unsigned immediate for shift counts. */#define CONST_OK_FOR_M(VALUE) ((unsigned HOST_WIDE_INT)(VALUE) < 0x40)/* 9 bit signed immediate for load/store post-increments. */#define CONST_OK_FOR_N(VALUE) ((unsigned HOST_WIDE_INT)(VALUE) + 0x100 < 0x200)/* 0 for r0. Used by Linux kernel, do not change. */#define CONST_OK_FOR_O(VALUE) ((VALUE) == 0)/* 0 or -1 for dep instruction. */#define CONST_OK_FOR_P(VALUE) ((VALUE) == 0 || (VALUE) == -1)#define CONST_OK_FOR_LETTER_P(VALUE, C) \((C) == 'I' ? CONST_OK_FOR_I (VALUE) \ : (C) == 'J' ? CONST_OK_FOR_J (VALUE) \ : (C) == 'K' ? CONST_OK_FOR_K (VALUE) \ : (C) == 'L' ? CONST_OK_FOR_L (VALUE) \ : (C) == 'M' ? CONST_OK_FOR_M (VALUE) \ : (C) == 'N' ? CONST_OK_FOR_N (VALUE) \ : (C) == 'O' ? CONST_OK_FOR_O (VALUE) \ : (C) == 'P' ? CONST_OK_FOR_P (VALUE) \ : 0)/* A C expression that defines the machine-dependent operand constraint letters (`G', `H') that specify particular ranges of `const_double' values. *//* 0.0 and 1.0 for fr0 and fr1. */#define CONST_DOUBLE_OK_FOR_G(VALUE) \ ((VALUE) == CONST0_RTX (GET_MODE (VALUE)) \ || (VALUE) == CONST1_RTX (GET_MODE (VALUE)))#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'G' ? CONST_DOUBLE_OK_FOR_G (VALUE) : 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. *//* Non-volatile memory for FP_REG loads/stores. */#define CONSTRAINT_OK_FOR_Q(VALUE) \ (memory_operand((VALUE), VOIDmode) && ! MEM_VOLATILE_P (VALUE))/* 1..4 for shladd arguments. */#define CONSTRAINT_OK_FOR_R(VALUE) \ (GET_CODE (VALUE) == CONST_INT && INTVAL (VALUE) >= 1 && INTVAL (VALUE) <= 4)/* Non-post-inc memory for asms and other unsavory creatures. */#define CONSTRAINT_OK_FOR_S(VALUE) \ (GET_CODE (VALUE) == MEM \ && GET_RTX_CLASS (GET_CODE (XEXP ((VALUE), 0))) != 'a' \ && (reload_in_progress || memory_operand ((VALUE), VOIDmode)))#define EXTRA_CONSTRAINT(VALUE, C) \ ((C) == 'Q' ? CONSTRAINT_OK_FOR_Q (VALUE) \ : (C) == 'R' ? CONSTRAINT_OK_FOR_R (VALUE) \ : (C) == 'S' ? CONSTRAINT_OK_FOR_S (VALUE) \ : 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 *//* Offset from the frame pointer to the first local variable slot to be allocated. */#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. *//* IA64 has a 16 byte scratch area that is at the bottom of the stack. */#define STACK_POINTER_OFFSET 16/* 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. */#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. */#define INCOMING_FRAME_SP_OFFSET 0/* 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 *//* 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. *//* ??? Investigate. *//* #define PROMOTE_PROTOTYPES *//* 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 expression for the number of words, at the beginning of an argument, must be put in registers. The value must be zero for arguments that are passed entirely in registers or that are entirely pushed on the stack. */#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ ia64_function_arg_partial_nregs (&CUM, MODE, TYPE, NAMED)/* A C expression that indicates when an argument must be passed by reference. If nonzero for an argument, a copy of that argument is made in memory and a pointer to the argument is passed instead of the argument itself. The pointer is passed in whatever way is appropriate for passing a pointer to that type. */#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ ia64_function_arg_pass_by_reference (&CUM, MODE, TYPE, NAMED)/* Nonzero if we do not know how to pass TYPE solely in registers. */#define MUST_PASS_IN_STACK(MODE, TYPE) \ ((TYPE) != 0 \ && (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST \ || TREE_ADDRESSABLE (TYPE)))/* 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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -