📄 ia64.h
字号:
(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) \do { \ char buf[20]; \ ASM_GENERATE_INTERNAL_LABEL (buf, "LP", LABELNO); \ fputs ("\talloc out0 = ar.pfs, 8, 0, 4, 0\n", FILE); \ if (TARGET_AUTO_PIC) \ fputs ("\tmovl out3 = @gprel(", FILE); \ else \ fputs ("\taddl out3 = @ltoff(", FILE); \ assemble_name (FILE, buf); \ if (TARGET_AUTO_PIC) \ fputs (");;\n", FILE); \ else \ fputs ("), r1;;\n", FILE); \ fputs ("\tmov out1 = r1\n", FILE); \ fputs ("\tmov out2 = b0\n", FILE); \ fputs ("\tbr.call.sptk.many b0 = _mcount;;\n", FILE); \} while (0)/* 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 to point to the data we need to load. The complete trampoline has the following form: +-------------------+ \ TRAMP: | __ia64_trampoline | | +-------------------+ > fake function descriptor | TRAMP+16 | | +-------------------+ / | target descriptor | +-------------------+ | static link | +-------------------+*//* A C expression for the size in bytes of the trampoline, as an integer. */#define TRAMPOLINE_SIZE 32/* Alignment required for trampolines, in bits. */#define TRAMPOLINE_ALIGNMENT 64/* A C statement to initialize the variable parts of a trampoline. */#define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) \ ia64_initialize_trampoline((ADDR), (FNADDR), (STATIC_CHAIN))/* Addressing Modes *//* Define this macro if the machine supports post-increment addressing. */#define HAVE_POST_INCREMENT 1#define HAVE_POST_DECREMENT 1#define HAVE_POST_MODIFY_DISP 1#define HAVE_POST_MODIFY_REG 1/* A C expression that is 1 if the RTX X is a constant which is a valid address. */#define CONSTANT_ADDRESS_P(X) 0/* The max number of registers that can appear in a valid memory address. */#define MAX_REGS_PER_ADDRESS 2/* 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. */#define LEGITIMATE_ADDRESS_REG(X) \ ((GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \ || (GET_CODE (X) == SUBREG && GET_CODE (XEXP (X, 0)) == REG \ && REG_OK_FOR_BASE_P (XEXP (X, 0))))#define LEGITIMATE_ADDRESS_DISP(R, X) \ (GET_CODE (X) == PLUS \ && rtx_equal_p (R, XEXP (X, 0)) \ && (LEGITIMATE_ADDRESS_REG (XEXP (X, 1)) \ || (GET_CODE (XEXP (X, 1)) == CONST_INT \ && INTVAL (XEXP (X, 1)) >= -256 \ && INTVAL (XEXP (X, 1)) < 256)))#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \do { \ if (LEGITIMATE_ADDRESS_REG (X)) \ goto LABEL; \ else if ((GET_CODE (X) == POST_INC || GET_CODE (X) == POST_DEC) \ && LEGITIMATE_ADDRESS_REG (XEXP (X, 0)) \ && XEXP (X, 0) != arg_pointer_rtx) \ goto LABEL; \ else if (GET_CODE (X) == POST_MODIFY \ && LEGITIMATE_ADDRESS_REG (XEXP (X, 0)) \ && XEXP (X, 0) != arg_pointer_rtx \ && LEGITIMATE_ADDRESS_DISP (XEXP (X, 0), XEXP (X, 1))) \ goto LABEL; \} while (0)/* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for use as a base register. */#ifdef REG_OK_STRICT#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))#else#define REG_OK_FOR_BASE_P(X) \ (GENERAL_REGNO_P (REGNO (X)) || (REGNO (X) >= FIRST_PSEUDO_REGISTER))#endif/* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for use as an index register. This is needed for POST_MODIFY. */#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X)/* A C statement or compound statement with a conditional `goto LABEL;' executed if memory address X (an RTX) can have different meanings depending on the machine mode of the memory reference it is used for or if the address is valid for some modes but not others. */#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \ if (GET_CODE (ADDR) == POST_DEC || GET_CODE (ADDR) == POST_INC) \ goto LABEL;/* A C expression that is nonzero if X is a legitimate constant for an immediate operand on the target machine. */#define LEGITIMATE_CONSTANT_P(X) ia64_legitimate_constant_p (X)/* Condition Code Status *//* One some machines not all possible comparisons are defined, but you can convert an invalid comparison into a valid one. *//* ??? Investigate. See the alpha definition. *//* #define CANONICALIZE_COMPARISON(CODE, OP0, OP1) *//* Describing Relative Costs of Operations *//* A C expression for the cost of moving data from a register in class FROM to one in class TO, using MODE. */#define REGISTER_MOVE_COST ia64_register_move_cost/* A C expression for the cost of moving data of mode M between a register and memory. */#define MEMORY_MOVE_COST(MODE,CLASS,IN) \ ((CLASS) == GENERAL_REGS || (CLASS) == FR_REGS \ || (CLASS) == GR_AND_FR_REGS ? 4 : 10)/* A C expression for the cost of a branch instruction. A value of 1 is the default; other values are interpreted relative to that. Used by the if-conversion code as max instruction count. *//* ??? This requires investigation. The primary effect might be how many additional insn groups we run into, vs how good the dynamic branch predictor is. */#define BRANCH_COST 6/* Define this macro as a C expression which is nonzero if accessing less than a word of memory (i.e. a `char' or a `short') is no faster than accessing a word of memory. */#define SLOW_BYTE_ACCESS 1/* Define this macro if it is as good or better to call a constant function address than to call an address kept in a register. Indirect function calls are more expensive that direct function calls, so don't cse function addresses. */#define NO_FUNCTION_CSE/* Dividing the output into sections. *//* A C expression whose value i
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -