convex.h
来自「gcc3.2.1源代码」· C头文件 代码 · 共 1,365 行 · 第 1/4 页
H
1,365 行
#define LD_D_P(X) (const_double_low_int (X) == 0)#define LD_L_P(X) (const_double_low_int (X) >= 0 \ ? const_double_high_int (X) == 0 \ : const_double_high_int (X) == -1)/* Optional extra constraints for this machine. For Convex, 'Q' means that OP is a volatile MEM. For volatile scalars, we use instructions that bypass the data cache. */#define EXTRA_CONSTRAINT(OP, C) \ ((C) == 'Q' ? (GET_CODE (OP) == MEM && MEM_VOLATILE_P (OP) \ && ! TARGET_C1 && TARGET_VOLATILE_NOCACHE) \ : 0)/* Given an rtx X being reloaded into a reg required to be in class CLASS, return the class of reg to actually use. In general this is just CLASS; but on some machines in some cases it is preferable to use a more restrictive class. *//* Put 2-word constants that can't be immediate operands into memory. */#define PREFERRED_RELOAD_CLASS(X,CLASS) \ ((GET_CODE (X) != CONST_DOUBLE \ || GET_MODE (X) == SFmode \ || LD_L_P (X) || LD_D_P (X)) ? (CLASS) : NO_REGS)/* Return the maximum number of consecutive registers needed to represent mode MODE in a register of class CLASS. */#define CLASS_MAX_NREGS(CLASS, MODE) ((GET_MODE_SIZE (MODE) + 7) / 8)/* Stack layout; function entry, exit and calling. *//* Define this if pushing a word on the stack makes the stack pointer a smaller address. */#define STACK_GROWS_DOWNWARD/* Define this if the nominal address of the stack frame is at the high-address end of the local variables; that is, each additional local variable allocated goes at a more negative offset in the frame. */#define FRAME_GROWS_DOWNWARD/* Define this if should default to -fcaller-saves. */#define DEFAULT_CALLER_SAVES/* Offset within stack frame to start allocating local variables at. If FRAME_GROWS_DOWNWARD, this is the offset to the END of the first local allocated. Otherwise, it is the offset to the BEGINNING of the first local allocated. */#define STARTING_FRAME_OFFSET 0/* If we generate an insn to push BYTES bytes, this says how many the stack pointer really advances by. */#define PUSH_ROUNDING(BYTES) (((BYTES) + 3) & ~3)/* Offset of first parameter from the argument pointer register value. */#define FIRST_PARM_OFFSET(FNDECL) 0/* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. FUNDECL is the declaration node of the function (as a tree), FUNTYPE is the data type of the function (as a tree), or for a library call it is an identifier node for the subroutine name. SIZE is the number of bytes of arguments passed on the stack. */#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) (SIZE)/* Define how to find the value returned by a function. VALTYPE is the data type of the value (as a tree). If the precise function being called is known, FUNC is its FUNCTION_DECL; otherwise, FUNC is 0. */#define FUNCTION_VALUE(VALTYPE, FUNC) \ gen_rtx (REG, TYPE_MODE (VALTYPE), S0_REGNUM)/* Define how to find the value returned by a library function assuming the value has mode MODE. */#define LIBCALL_VALUE(MODE) gen_rtx (REG, MODE, S0_REGNUM)/* Define this if PCC uses the nonreentrant convention for returning structure and union values. */#define PCC_STATIC_STRUCT_RETURN/* 1 if N is a possible register number for a function value. On the Convex, S0 is the only register thus used. */#define FUNCTION_VALUE_REGNO_P(N) ((N) == S0_REGNUM)/* 1 if N is a possible register number for function argument passing. */#define FUNCTION_ARG_REGNO_P(N) 0/* Define a data type for recording info about an argument list during the scan of that argument list. This data type should hold all necessary information about the function itself and about the args processed so far, enough to enable macros such as FUNCTION_ARG to determine where the next arg should go. *//* On convex, simply count the arguments in case TARGET_ARGCOUNT is set. */#define CUMULATIVE_ARGS int/* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a function whose data type is FNTYPE. For a library call, FNTYPE is 0. */#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \ ((CUM) = 0)/* Update the data in CUM to advance over an argument of mode MODE and data type TYPE. (TYPE is null for libcalls where that information may not be available.) */#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ((CUM) += 1)/* Define where to put the arguments to a function. Value is zero to push the argument on the stack, or a hard register in which to store the argument. MODE is the argument's machine mode. TYPE is the data type of the argument (as a tree). This is null for libcalls where that information may not be available. CUM is a variable of type CUMULATIVE_ARGS which gives info about the preceding args and about the function being called. NAMED is nonzero if this argument is a named parameter (otherwise it is an extra parameter matching an ellipsis). Convex: all args go on the stack. But return the arg count as the "next arg register" to be passed to gen_call. */#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ((MODE) == VOIDmode ? GEN_INT ((CUM)) : 0)/* Output assembler code for a block containing the constant parts of a trampoline, leaving space for the variable parts. *//* On convex, the code for a trampoline is ld.w #<link>,s0 jmp <func> */#define TRAMPOLINE_TEMPLATE(FILE) \{ \ fprintf (FILE, "\tld.w #69696969,s0\n"); \ fprintf (FILE, "\tjmp 52525252\n"); \}/* Length in units of the trampoline for entering a nested function. */#define TRAMPOLINE_SIZE 12/* Emit RTL insns to initialize the variable parts of a trampoline. FNADDR is an RTX for the address of the function's pure code. CXT is an RTX for the static chain value for the function. */#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \{ \ emit_move_insn (gen_rtx (MEM, Pmode, plus_constant (TRAMP, 2)), CXT); \ emit_move_insn (gen_rtx (MEM, Pmode, plus_constant (TRAMP, 8)), FNADDR); \ emit_call_insn (gen_call_pop (gen_rtx (MEM, QImode, \ gen_rtx (SYMBOL_REF, Pmode, \ "__enable_execute_stack")), \ const0_rtx, const0_rtx, const0_rtx)); \}/* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */#define FUNCTION_PROFILER(FILE, LABELNO) \ fprintf (FILE, "\tldea LP%d,a1\n\tcallq mcount\n", (LABELNO));/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, the stack pointer does not matter. The value is tested only in functions that have frame pointers. No definition is equivalent to always zero. */#define EXIT_IGNORE_STACK 1/* Store in the variable DEPTH the initial difference between the frame pointer reg contents and the stack pointer reg contents, as of the start of the function body. This depends on the layout of the fixed parts of the stack frame and on how registers are saved. */#define INITIAL_FRAME_POINTER_OFFSET(DEPTH) \{ (DEPTH) = (get_frame_size () + 7) & -8; }/* Addressing modes, and classification of registers for them. *//* #define HAVE_POST_INCREMENT 0 *//* #define HAVE_POST_DECREMENT 0 *//* #define HAVE_PRE_DECREMENT 0 *//* #define HAVE_PRE_INCREMENT 0 *//* Macros to check register numbers against specific register classes. *//* These assume that REGNO is a hard or pseudo reg number. They give nonzero only if REGNO is a hard reg of the suitable class or a pseudo reg currently allocated to a suitable hard reg. Since they use reg_renumber, they are safe only once reg_renumber has been allocated, which happens in local-alloc.c. */#define REGNO_OK_FOR_INDEX_P(regno) \ ((regno) <= LAST_VIRTUAL_REGISTER \ ? regno_ok_for_index_p[regno] \ : regno_ok_for_index_p[reg_renumber[regno]])#define REGNO_OK_FOR_BASE_P(regno) REGNO_OK_FOR_INDEX_P (regno)/* Maximum number of registers that can appear in a valid memory address. */#define MAX_REGS_PER_ADDRESS 1/* 1 if X is an rtx for a constant that is a valid address. */#define CONSTANT_ADDRESS_P(X) \ (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \ || GET_CODE (X) == HIGH)/* Nonzero if the constant value X is a legitimate general operand. It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. *//* For convex, bounce 2-word constants that can't be immediate operands. */#define LEGITIMATE_CONSTANT_P(X) \ (GET_CODE (X) != CONST_DOUBLE \ || GET_MODE (X) == SFmode \ || LD_L_P (X) || LD_D_P (X))/* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its validity for a certain class. We have two alternate definitions for each of them. The usual definition accepts all pseudo regs; the other rejects them unless they have been allocated suitable hard regs. The symbol REG_OK_STRICT causes the latter definition to be used. Most source files want to accept pseudo regs in the hope that they will get allocated to the class that the insn wants them to be in. Source files for reload pass need to be strict. After reload, it makes no difference, since pseudo regs have been eliminated by then. */#ifndef REG_OK_STRICT/* Nonzero if X is a hard reg that can be used as an index or if it is a pseudo reg. */#define REG_OK_FOR_INDEX_P(X) \ (REGNO (X) > LAST_VIRTUAL_REGISTER || regno_ok_for_index_p[REGNO (X)])/* Nonzero if X is a hard reg that can be used as a base reg or if it is a pseudo reg. */#define REG_OK_FOR_BASE_P(X) REG_OK_FOR_INDEX_P (X)#else/* Nonzero if X is a hard reg that can be used as an index. */#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X))/* Nonzero if X is a hard reg that can be used as a base reg. */#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))#endif/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression that is a valid memory address for an instruction. The MODE argument is the machine mode for the MEM expression that wants to use this address. For Convex, valid addresses are indirectable or (MEM indirectable) where indirectable is const, reg, (PLUS reg const) We don't use indirection since with insn scheduling, load + indexing is better. *//* 1 if X is an address that we could indirect through. */#define INDIRECTABLE_ADDRESS_P(X) \ (CONSTANT_ADDRESS_P (X) \ || (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \ || (GET_CODE (X) == PLUS \ && GET_CODE (XEXP (X, 0)) == REG \ && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ && CONSTANT_ADDRESS_P (XEXP (X, 1))) \ || (GET_CODE (X) == PLUS \ && GET_CODE (XEXP (X, 1)) == REG \ && REG_OK_FOR_BASE_P (XEXP (X, 1)) \ && CONSTANT_ADDRESS_P (XEXP (X, 0))))/* Go to ADDR if X is a valid address. */#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \{ register rtx xfoob = (X); \ if (INDIRECTABLE_ADDRESS_P (xfoob)) \ goto ADDR; \ if (GET_CODE (xfoob) == PRE_DEC && XEXP (xfoob, 0) == stack_pointer_rtx) \ goto ADDR; \}/* Try machine-dependent ways of modifying an illegitimate address to be legitimate. If we find one, return the new, valid address. This macro is used in only one place: `memory_address' in explow.c. OLDX is the address as it was before break_out_memory_refs was called. In some cases it is useful to look at this to decide what needs to be done. MODE and WIN are passed so that this macro can use GO_IF_LEGITIMATE_ADDRESS. It is always safe for this macro to do nothing. It exists to recognize opportunities to optimize the output. For Convex, nothing needs to be done. */#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {}/* Go to LABEL if ADDR (a legitimate address expression) has an effect that depends on the machine mode it is used for. */#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) {}/* Specify the machine mode that this machine uses for the index in the tablejump instruction. */#define CASE_VECTOR_MODE SImode/* Define as C expression which evaluates to nonzero if the tablejump instruction expects the table to contain offsets from the address of the table. Do not define this if the table should contain absolute addresses. *//* #define CASE_VECTOR_PC_RELATIVE 1 *//* Define this if the case instruction drops through after the table when the index is out of range. Don't define it if the case insn jumps to the default label instead. *//* #define CASE_DROPS_THROUGH *//* Define this as 1 if `char' should by default be signed; else as 0. */#define DEFAULT_SIGNED_CHAR 1/* This flag, if defined, says the same insns that convert to a signed fixnum
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?