⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 i370.h

📁 linux下的gcc编译器
💻 H
📖 第 1 页 / 共 5 页
字号:
/* The same information, inverted:   Return the class number of the smallest class containing   reg number REGNO.  This could be a conditional expression   or could index an array.  */#define REGNO_REG_CLASS(REGNO) 						\  ((REGNO) >= 16 ? FP_REGS : (REGNO) != 0 ? ADDR_REGS : DATA_REGS)/* The class value for index registers, and the one for base regs.  */#define INDEX_REG_CLASS ADDR_REGS#define BASE_REG_CLASS ADDR_REGS/* Get reg_class from a letter such as appears in the machine description.  */#define REG_CLASS_FROM_LETTER(C)					\  ((C) == 'a' ? ADDR_REGS :						\  ((C) == 'd' ? DATA_REGS :						\  ((C) == 'f' ? FP_REGS   : NO_REGS)))/* The letters I, J, K, L and M in a register constraint string can be used   to stand for particular ranges of immediate operands.   This macro defines what the ranges are.   C is the letter, and VALUE is a constant value.   Return 1 if VALUE is in the range specified by C.  */#define CONST_OK_FOR_LETTER_P(VALUE, C)					\  ((C) == 'I' ? (unsigned) (VALUE) < 256 :				\   (C) == 'J' ? (unsigned) (VALUE) < 4096 :				\   (C) == 'K' ? (VALUE) >= -32768 && (VALUE) < 32768 : 0)/* Similar, but for floating constants, and defining letters G and H.   Here VALUE is the CONST_DOUBLE rtx itself.  */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)  1/* see recog.c for details */#define EXTRA_CONSTRAINT(OP,C)						\   ((C) == 'R' ? r_or_s_operand (OP, GET_MODE(OP)) :			\    (C) == 'S' ? s_operand (OP, GET_MODE(OP)) :	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.     XXX We reload CONST_INT's into ADDR not DATA regs because on certain    rare occasions when lots of egisters are spilled, reload() will try   to put a const int into r0 and then use r0 as an index register.*/#define PREFERRED_RELOAD_CLASS(X, CLASS)				\    (GET_CODE(X) == CONST_DOUBLE ? FP_REGS :				\     GET_CODE(X) == CONST_INT ? (reload_in_progress ? ADDR_REGS : DATA_REGS) :	\     GET_CODE(X) == LABEL_REF ||					\     GET_CODE(X) == SYMBOL_REF ||					\     GET_CODE(X) == CONST ? ADDR_REGS : (CLASS))/* Return the maximum number of consecutive registers needed to represent   mode MODE in a register of class CLASS.     Note that DCmode (complex double) needs two regs.*/#define CLASS_MAX_NREGS(CLASS, MODE)					\  ((CLASS) == FP_REGS ? 						\   ((GET_MODE_SIZE (MODE) + 2*UNITS_PER_WORD - 1) / (2*UNITS_PER_WORD)) :	\   (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)/* Stack layout; function entry, exit and calling.  *//* Define this if pushing a word on the stack makes the stack pointer a   smaller address.  *//* ------------------------------------------------------------------- *//* ================= */#ifdef TARGET_HLASM/* #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 *//* 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  						\     (STACK_POINTER_OFFSET + current_function_outgoing_args_size)#define INITIAL_FRAME_POINTER_OFFSET(DEPTH) (DEPTH) = STARTING_FRAME_OFFSET/* If we generate an insn to push BYTES bytes, this says how many the stack   pointer really advances by.  On the 370, we have no push instruction.  */#endif /* TARGET_HLASM *//* ================= */#ifdef TARGET_ELF_ABI /* With ELF/Linux, stack is placed at large virtual addrs and grows down.   But we want the compiler to generate posistive displacements from the    stack pointer, and so we make the frame lie above the stack.  */#define STACK_GROWS_DOWNWARD /* #define FRAME_GROWS_DOWNWARD *//* Offset within stack frame to start allocating local variables at.   This is the offset to the BEGINNING of the first local allocated.  */#define STARTING_FRAME_OFFSET  						\     (STACK_POINTER_OFFSET + current_function_outgoing_args_size)#define INITIAL_FRAME_POINTER_OFFSET(DEPTH) (DEPTH) = STARTING_FRAME_OFFSET#endif /* TARGET_ELF_ABI *//* ================= *//* #define PUSH_ROUNDING(BYTES) *//* Accumulate the outgoing argument count so we can request the right   DSA size and determine stack offset.  */#define ACCUMULATE_OUTGOING_ARGS 1/* Define offset from stack pointer, to location where a parm can be   pushed.  */#define STACK_POINTER_OFFSET 148/* Offset of first parameter from the argument pointer register value.  */#define FIRST_PARM_OFFSET(FNDECL) 0/* 1 if N is a possible register number for function argument passing.   On the 370, no registers are used in this way.  */#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.  */#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) += ((MODE) == DFmode || (MODE) == SFmode			\	    ? 256							\	    : (MODE) != BLKmode                 			\	    ? (GET_MODE_SIZE (MODE) + 3) / 4 				\	    : (int_size_in_bytes (TYPE) + 3) / 4))/* 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.  */#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) 0/* For an arg passed partly in registers and partly in memory, this is the   number of registers used.  For args passed entirely in registers or   entirely in memory, zero.  */#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0/* Define if returning from a function call automatically pops the   arguments described by the number-of-args field in the call.  */#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0/* The FUNCTION_VALUE macro defines 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 NULL.     On the 370 the return value is in R15 or R16.  However,   DImode (64-bit ints) scalars need to get returned on the stack,    with r15 pointing to the location.  To accomplish this, we define   the RETURN_IN_MEMORY macro to be true for both blockmode (structures)   and the DImode scalars. */#define RET_REG(MODE)	\    (((MODE) == DCmode || (MODE) == SCmode || (MODE) == TFmode || (MODE) == DFmode || (MODE) == SFmode) ? 16 : 15)#define FUNCTION_VALUE(VALTYPE, FUNC)  					\  gen_rtx_REG (TYPE_MODE (VALTYPE), RET_REG (TYPE_MODE (VALTYPE)))#define RETURN_IN_MEMORY(VALTYPE)  \  ((DImode == TYPE_MODE (VALTYPE)) || (BLKmode == TYPE_MODE (VALTYPE)))/* 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, RET_REG (MODE))/* 1 if N is a possible register number for a function value.   On the 370 under C/370, R15 and R16 are thus used.  */#define FUNCTION_VALUE_REGNO_P(N) ((N) == 15 || (N) == 16)/* This macro definition sets up a default value for `main' to return.  */#define DEFAULT_MAIN_RETURN  c_expand_return (integer_zero_node)/* Output assembler code for a block containing the constant parts of a   trampoline, leaving space for the variable parts.   On the 370, the trampoline contains these instructions:        BALR  14,0        USING *,14        L     STATIC_CHAIN_REGISTER,X        L     15,Y        BR    15   X    DS    0F   Y    DS    0F  *//*   I am confused as to why this emitting raw binary, instead of instructions ...   see for example, rs6000/rs000.c for an example of a different way to   do this ... especially since BASR should probably be substituted for BALR. */#define TRAMPOLINE_TEMPLATE(FILE)					\{									\  assemble_aligned_integer (2, GEN_INT (0x05E0));			\  assemble_aligned_integer (2, GEN_INT (0x5800 | STATIC_CHAIN_REGNUM << 4)); \  assemble_aligned_integer (2, GEN_INT (0xE00A));			\  assemble_aligned_integer (2, GEN_INT (0x58F0)); 			\  assemble_aligned_integer (2, GEN_INT (0xE00E));			\  assemble_aligned_integer (2, GEN_INT (0x07FF));			\  assemble_aligned_integer (2, const0_rtx);				\  assemble_aligned_integer (2, const0_rtx);				\  assemble_aligned_integer (2, const0_rtx);				\  assemble_aligned_integer (2, const0_rtx);				\}/* Length in units of the trampoline for entering a nested function.  */#define TRAMPOLINE_SIZE 20/* Emit RTL insns to initialize the variable parts of a trampoline.  */#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)			\{									\  emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 12)), CXT); \  emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 16)), FNADDR); \}/* Define EXIT_IGNORE_STACK if, when returning from a function, the stack   pointer does not matter (provided there is a frame pointer).  */#define EXIT_IGNORE_STACK	1/* Addressing modes, and classification of registers for them.  *//* #define HAVE_POST_INCREMENT *//* #define HAVE_POST_DECREMENT *//* #define HAVE_PRE_DECREMENT *//* #define HAVE_PRE_INCREMENT *//* 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.   These definitions are NOT overridden anywhere.  */#define REGNO_OK_FOR_INDEX_P(REGNO) 					\  (((REGNO) > 0 && (REGNO) < 16)					\    || (reg_renumber[REGNO] > 0 && reg_renumber[REGNO] < 16))#define REGNO_OK_FOR_BASE_P(REGNO) REGNO_OK_FOR_INDEX_P(REGNO)#define REGNO_OK_FOR_DATA_P(REGNO) 					\  ((REGNO) < 16 || (unsigned) reg_renumber[REGNO] < 16)#define REGNO_OK_FOR_FP_P(REGNO) 					\  ((unsigned) ((REGNO) - 16) < 4 || (unsigned) (reg_renumber[REGNO] - 16) < 4)/* Now macros that check whether X is a register and also,   strictly, whether it is in a specified class.  *//* 1 if X is a data register.  */#define DATA_REG_P(X) (REG_P (X) && REGNO_OK_FOR_DATA_P (REGNO (X)))/* 1 if X is an fp register.  */#define FP_REG_P(X) (REG_P (X) && REGNO_OK_FOR_FP_P (REGNO (X)))/* 1 if X is an address register.  */#define ADDRESS_REG_P(X) (REG_P (X) && REGNO_OK_FOR_BASE_P (REGNO (X)))/* Maximum number of registers that can appear in a valid memory address.  */#define MAX_REGS_PER_ADDRESS 2/* Recognize any constant value 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_DOUBLE		\  || (GET_CODE (X) == CONST						\	  && GET_CODE (XEXP (XEXP (X, 0), 0)) == LABEL_REF)		\  || (GET_CODE (X) == CONST						\	  && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF		\	  && !SYMBOL_REF_FLAG (XEXP (XEXP (X, 0), 0))))/* Nonzero if the constant value X is a legitimate general operand.   It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */#define LEGITIMATE_CONSTANT_P(X) 1/* 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 all.  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.   Some source files that are used after register allocation   need to be strict.  */#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) > 0 && REGNO(X) < 16) || REGNO(X) >= 20)/* 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 /* REG_OK_STRICT *//* 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 /* REG_OK_STRICT *//* 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.   The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS,   except for CONSTANT_ADDRESS_P which is actually machine-independent.  */#define COUNT_REGS(X, REGS, FAIL)					\ if (REG_P (X)) {							\   if (REG_OK_FOR_BASE_P (X)) REGS += 1;				\   else goto FAIL;							\ }									\ else if (GET_CODE (X) != CONST_INT || (unsigned) INTVAL (X) >= 4096)	\   goto FAIL;#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)				\{									\  if (REG_P (X) && REG_OK_FOR_BASE_P (X))				\    goto ADDR;								\  if (GET_CODE (X) == PLUS)						\    {									\      int regs = 0;							\

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -