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

📄 alpha.h

📁 gcc-you can use this code to learn something about gcc, and inquire further into linux,
💻 H
📖 第 1 页 / 共 5 页
字号:
#define REG_CLASS_NAMES					\ {"NO_REGS", "R0_REG", "R24_REG", "R25_REG", "R27_REG",	\  "GENERAL_REGS", "FLOAT_REGS", "ALL_REGS" }/* Define which registers fit in which classes.   This is an initializer for a vector of HARD_REG_SET   of length N_REG_CLASSES.  */#define REG_CLASS_CONTENTS				\{ {0x00000000, 0x00000000},	/* NO_REGS */		\  {0x00000001, 0x00000000},	/* R0_REG */		\  {0x01000000, 0x00000000},	/* R24_REG */		\  {0x02000000, 0x00000000},	/* R25_REG */		\  {0x08000000, 0x00000000},	/* R27_REG */		\  {0xffffffff, 0x80000000},	/* GENERAL_REGS */	\  {0x00000000, 0x7fffffff},	/* FLOAT_REGS */	\  {0xffffffff, 0xffffffff} }/* 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) == 0 ? R0_REG				\  : (REGNO) == 24 ? R24_REG			\  : (REGNO) == 25 ? R25_REG			\  : (REGNO) == 27 ? R27_REG			\  : (REGNO) >= 32 && (REGNO) <= 62 ? FLOAT_REGS	\  : GENERAL_REGS)/* The class value for index registers, and the one for base regs.  */#define INDEX_REG_CLASS NO_REGS#define BASE_REG_CLASS GENERAL_REGS/* Get reg_class from a letter such as appears in the machine description.  */#define REG_CLASS_FROM_LETTER(C)	\ ((C) == 'a' ? R24_REG			\  : (C) == 'b' ? R25_REG		\  : (C) == 'c' ? R27_REG		\  : (C) == 'f' ? FLOAT_REGS		\  : (C) == 'v' ? R0_REG			\  : NO_REGS)/* Define this macro to change register usage conditional on target flags.  *//* #define CONDITIONAL_REGISTER_USAGE  *//* The letters I, J, K, L, M, N, O, and P 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.   For Alpha:   `I' is used for the range of constants most insns can contain.   `J' is the constant zero.   `K' is used for the constant in an LDA insn.   `L' is used for the constant in a LDAH insn.   `M' is used for the constants that can be AND'ed with using a ZAP insn.   `N' is used for complemented 8-bit constants.   `O' is used for negated 8-bit constants.   `P' is used for the constants 1, 2 and 3.  */#define CONST_OK_FOR_LETTER_P   alpha_const_ok_for_letter_p/* Similar, but for floating or large integer constants, and defining letters   G and H.   Here VALUE is the CONST_DOUBLE rtx itself.   For Alpha, `G' is the floating-point constant zero.  `H' is a CONST_DOUBLE   that is the operand of a ZAP insn.  */#define CONST_DOUBLE_OK_FOR_LETTER_P  alpha_const_double_ok_for_letter_p/* Optional extra constraints for this machine.   For the Alpha, `Q' means that this is a memory operand but not a   reference to an unaligned location.   `R' is a SYMBOL_REF that has SYMBOL_REF_FLAG set or is the current   function.   'S' is a 6-bit constant (valid for a shift insn).     'T' is a HIGH.   'U' is a symbolic operand.   'W' is a vector zero.   */#define EXTRA_CONSTRAINT  alpha_extra_constraint/* 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.  */#define PREFERRED_RELOAD_CLASS  alpha_preferred_reload_class/* Loading and storing HImode or QImode values to and from memory   usually requires a scratch register.  The exceptions are loading   QImode and HImode from an aligned address to a general register   unless byte instructions are permitted.   We also cannot load an unaligned address or a paradoxical SUBREG into an   FP register.  */#define SECONDARY_INPUT_RELOAD_CLASS(CLASS,MODE,IN) \  secondary_reload_class((CLASS), (MODE), (IN), 1)#define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS,MODE,OUT) \  secondary_reload_class((CLASS), (MODE), (OUT), 0)/* If we are copying between general and FP registers, we need a memory   location unless the FIX extension is available.  */#define SECONDARY_MEMORY_NEEDED(CLASS1,CLASS2,MODE) \ (! TARGET_FIX && (((CLASS1) == FLOAT_REGS && (CLASS2) != FLOAT_REGS) \                   || ((CLASS2) == FLOAT_REGS && (CLASS1) != FLOAT_REGS)))/* Specify the mode to be used for memory when a secondary memory   location is needed.  If MODE is floating-point, use it.  Otherwise,   widen to a word like the default.  This is needed because we always   store integers in FP registers in quadword format.  This whole   area is very tricky! */#define SECONDARY_MEMORY_NEEDED_MODE(MODE)		\  (GET_MODE_CLASS (MODE) == MODE_FLOAT ? (MODE)		\   : GET_MODE_SIZE (MODE) >= 4 ? (MODE)			\   : mode_for_size (BITS_PER_WORD, GET_MODE_CLASS (MODE), 0))/* 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) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)/* Return the class of registers that cannot change mode from FROM to TO.  */#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS)		\  (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)			\   ? reg_classes_intersect_p (FLOAT_REGS, CLASS) : 0)/* Define the cost of moving between registers of various classes.  Moving   between FLOAT_REGS and anything else except float regs is expensive.    In fact, we make it quite expensive because we really don't want to   do these moves unless it is clearly worth it.  Optimizations may   reduce the impact of not being able to allocate a pseudo to a   hard register.  */#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)	\  (((CLASS1) == FLOAT_REGS) == ((CLASS2) == FLOAT_REGS)	\   ? 2							\   : TARGET_FIX ? 3 : 4+2*alpha_memory_latency)/* A C expressions returning the cost of moving data of MODE from a register to   or from memory.   On the Alpha, bump this up a bit.  */extern int alpha_memory_latency;#define MEMORY_MOVE_COST(MODE,CLASS,IN)  (2*alpha_memory_latency)/* Provide the cost of a branch.  Exact meaning under development.  */#define BRANCH_COST 5/* 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 *//* 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.   On Alpha, don't define this because there are no push insns.  *//*  #define PUSH_ROUNDING(BYTES) *//* Define this to be nonzero if stack checking is built into the ABI.  */#define STACK_CHECK_BUILTIN 1/* Define this if the maximum size of all the outgoing args is to be   accumulated and pushed during the prologue.  The amount can be   found in the variable current_function_outgoing_args_size.  */#define ACCUMULATE_OUTGOING_ARGS 1/* Offset of first parameter from the argument pointer register value.  */#define FIRST_PARM_OFFSET(FNDECL) 0/* Definitions for register eliminations.   We have two registers that can be eliminated on the Alpha.  First, the   frame pointer register can often be eliminated in favor of the stack   pointer register.  Secondly, the argument pointer register can always be   eliminated; it is replaced with either the stack or frame pointer.  *//* This is an array of structures.  Each structure initializes one pair   of eliminable registers.  The "from" register number is given first,   followed by "to".  Eliminations of the same "from" register are listed   in order of preference.  */#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}}/* Given FROM and TO register numbers, say whether this elimination is allowed.   Frame pointer elimination is automatically handled.   All eliminations are valid since the cases where FP can't be   eliminated are already handled.  */#define CAN_ELIMINATE(FROM, TO) 1/* Round up to a multiple of 16 bytes.  */#define ALPHA_ROUND(X) (((X) + 15) & ~ 15)/* Define the offset between two registers, one to be eliminated, and the other   its replacement, at the start of a routine.  */#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)			\{ if ((FROM) == FRAME_POINTER_REGNUM)					\    (OFFSET) = (ALPHA_ROUND (current_function_outgoing_args_size)	\		+ alpha_sa_size ());					\  else if ((FROM) == ARG_POINTER_REGNUM)				\    (OFFSET) = (ALPHA_ROUND (current_function_outgoing_args_size)	\		+ alpha_sa_size ()					\		+ (ALPHA_ROUND (get_frame_size ()			\			       + current_function_pretend_args_size)	\		   - current_function_pretend_args_size));		\  else									\    abort ();								\}/* Define this if stack space is still allocated for a parameter passed   in a register.  *//* #define REG_PARM_STACK_SPACE *//* 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) 0/* 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.   On Alpha the value is found in $0 for integer functions and   $f0 for floating-point functions.  */#define FUNCTION_VALUE(VALTYPE, FUNC)	\  gen_rtx_REG (((INTEGRAL_TYPE_P (VALTYPE)			\		 && TYPE_PRECISION (VALTYPE) < BITS_PER_WORD)	\		|| POINTER_TYPE_P (VALTYPE))			\	       ? word_mode : TYPE_MODE (VALTYPE),		\	       ((TARGET_FPREGS					\		 && (TREE_CODE (VALTYPE) == REAL_TYPE		\		     || TREE_CODE (VALTYPE) == COMPLEX_TYPE))	\		? 32 : 0))/* 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,						\		(TARGET_FPREGS					\		 && (GET_MODE_CLASS (MODE) == MODE_FLOAT	\		     || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT) \		 ? 32 : 0))/* The definition of this macro implies that there are cases where   a scalar value cannot be returned in registers.   For the Alpha, any structure or union type is returned in memory, as   are integers whose size is larger than 64 bits.  */#define RETURN_IN_MEMORY(TYPE) \  (TYPE_MODE (TYPE) == BLKmode \   || TYPE_MODE (TYPE) == TFmode \   || TYPE_MODE (TYPE) == TCmode \   || (TREE_CODE (TYPE) == INTEGER_TYPE && TYPE_PRECISION (TYPE) > 64))/* 1 if N is a possible register number for a function value   as seen by the caller.  */#define FUNCTION_VALUE_REGNO_P(N)  \  ((N) == 0 || (N) == 1 || (N) == 32 || (N) == 33)/* 1 if N is a possible register number for function argument passing.   On Alpha, these are $16-$21 and $f16-$f21.  */#define FUNCTION_ARG_REGNO_P(N) \  (((N) >= 16 && (N) <= 21) || ((N) >= 16 + 32 && (N) <= 21 + 32))/* 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 Alpha, this is a single integer, which is a number of words   of arguments scanned so far.   Thus 6 or more means all following args should go on the stack.  */#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/* Define intermediate macro to compute the size (in registers) of an argument   for the Alpha.  */#define ALPHA_ARG_SIZE(MODE, TYPE, NAMED)				\  ((MODE) == TFmode || (MODE) == TCmode ? 1				\   : (((MODE) == BLKmode ? int_size_in_bytes (TYPE) : GET_MODE_SIZE (MODE)) \      + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)/* 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)			\  if (MUST_PASS_IN_STACK (MODE, TYPE))					\    (CUM) = 6;								\  else									\    (CUM) += ALPHA_ARG_SIZE (MODE, TYPE, NAMED)/* Determine where to put an argument 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).   On Alpha the first 6 words of args are normally in registers   and the rest are pushed.  */

⌨️ 快捷键说明

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