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

📄 alpha.h

📁 gcc-you can use this code to learn something about gcc, and inquire further into linux,
💻 H
📖 第 1 页 / 共 5 页
字号:
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED)	\  function_arg((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) \  ((MODE) == TFmode || (MODE) == TCmode)/* Specify the padding direction of arguments.   On the Alpha, we must pad upwards in order to be able to pass args in   registers.  */#define FUNCTION_ARG_PADDING(MODE, TYPE)	upward/* 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)	\((CUM) < 6 && 6 < (CUM) + ALPHA_ARG_SIZE (MODE, TYPE, NAMED)	\ ? 6 - (CUM) : 0)/* Perform any needed actions needed for a function that is receiving a   variable number of arguments.    CUM is as above.   MODE and TYPE are the mode and type of the current parameter.   PRETEND_SIZE is a variable that should be set to the amount of stack   that must be pushed by the prolog to pretend that our caller pushed   it.   Normally, this macro will push all remaining incoming registers on the   stack and set PRETEND_SIZE to the length of the registers pushed.    On the Alpha, we allocate space for all 12 arg registers, but only   push those that are remaining.   However, if NO registers need to be saved, don't allocate any space.   This is not only because we won't need the space, but because AP includes   the current_pretend_args_size and we don't want to mess up any   ap-relative addresses already made.   If we are not to use the floating-point registers, save the integer   registers where we would put the floating-point registers.  This is   not the most efficient way to implement varargs with just one register   class, but it isn't worth doing anything more efficient in this rare   case.  */   #define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL)	\{ if ((CUM) < 6)							\    {									\      if (! (NO_RTL))							\	{								\	  rtx tmp; int set = get_varargs_alias_set ();			\	  tmp = gen_rtx_MEM (BLKmode,					\		             plus_constant (virtual_incoming_args_rtx,	\				            ((CUM) + 6)* UNITS_PER_WORD)); \	  set_mem_alias_set (tmp, set);					\	  move_block_from_reg						\	    (16 + CUM, tmp,						\	     6 - (CUM), (6 - (CUM)) * UNITS_PER_WORD);			\									\	  tmp = gen_rtx_MEM (BLKmode,					\		             plus_constant (virtual_incoming_args_rtx,	\				            (CUM) * UNITS_PER_WORD));	\	  set_mem_alias_set (tmp, set);					\	  move_block_from_reg						\	    (16 + (TARGET_FPREGS ? 32 : 0) + CUM, tmp,			\	     6 - (CUM), (6 - (CUM)) * UNITS_PER_WORD);			\	 }								\      PRETEND_SIZE = 12 * UNITS_PER_WORD;				\    }									\}/* We do not allow indirect calls to be optimized into sibling calls, nor   can we allow a call to a function in a different compilation unit to   be optimized into a sibcall.  */#define FUNCTION_OK_FOR_SIBCALL(DECL)			\  (DECL							\   && (! TREE_PUBLIC (DECL)				\       || (TREE_ASM_WRITTEN (DECL) && (*targetm.binds_local_p) (DECL))))/* Try to output insns to set TARGET equal to the constant C if it can be   done in less than N insns.  Do all computations in MODE.  Returns the place   where the output has been placed if it can be done and the insns have been   emitted.  If it would take more than N insns, zero is returned and no   insns and emitted.  *//* Define the information needed to generate branch and scc insns.  This is   stored from the compare operation.  Note that we can't use "rtx" here   since it hasn't been defined!  */struct alpha_compare{  struct rtx_def *op0, *op1;  int fp_p;};extern struct alpha_compare alpha_compare;/* Make (or fake) .linkage entry for function call.   IS_LOCAL is 0 if name is used in call, 1 if name is used in definition.  *//* This macro defines the start of an assembly comment.  */#define ASM_COMMENT_START " #"/* This macro produces the initial definition of a function.  */#define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \  alpha_start_function(FILE,NAME,DECL);/* This macro closes up a function definition for the assembler.  */#define ASM_DECLARE_FUNCTION_SIZE(FILE,NAME,DECL) \  alpha_end_function(FILE,NAME,DECL)   /* Output any profiling code before the prologue.  */#define PROFILE_BEFORE_PROLOGUE 1/* Output assembler code to FILE to increment profiler label # LABELNO   for profiling a function entry.  Under OSF/1, profiling is enabled   by simply passing -pg to the assembler and linker.  */#define FUNCTION_PROFILER(FILE, 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/* Define registers used by the epilogue and return instruction.  */#define EPILOGUE_USES(REGNO)	((REGNO) == 26)/* 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.     Note that $27 has been set to the address of the trampoline, so we can   use it for addressability of the two data items.  */#define TRAMPOLINE_TEMPLATE(FILE)		\do {						\  fprintf (FILE, "\tldq $1,24($27)\n");		\  fprintf (FILE, "\tldq $27,16($27)\n");	\  fprintf (FILE, "\tjmp $31,($27),0\n");	\  fprintf (FILE, "\tnop\n");			\  fprintf (FILE, "\t.quad 0,0\n");		\} while (0)/* Section in which to place the trampoline.  On Alpha, instructions   may only be placed in a text segment.  */#define TRAMPOLINE_SECTION text_section/* Length in units of the trampoline for entering a nested function.  */#define TRAMPOLINE_SIZE    32/* The alignment of a trampoline, in bits.  */#define TRAMPOLINE_ALIGNMENT  64/* 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) \  alpha_initialize_trampoline (TRAMP, FNADDR, CXT, 16, 24, 8)/* A C expression whose value is RTL representing the value of the return   address for the frame COUNT steps up from the current frame.   FRAMEADDR is the frame pointer of the COUNT frame, or the frame pointer of   the COUNT-1 frame if RETURN_ADDR_IN_PREVIOUS_FRAME is defined.  */#define RETURN_ADDR_RTX  alpha_return_addr/* Before the prologue, RA lives in $26.  */#define INCOMING_RETURN_ADDR_RTX  gen_rtx_REG (Pmode, 26)#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (26)/* Describe how we implement __builtin_eh_return.  */#define EH_RETURN_DATA_REGNO(N)	((N) < 4 ? (N) + 16 : INVALID_REGNUM)#define EH_RETURN_STACKADJ_RTX	gen_rtx_REG (Pmode, 28)#define EH_RETURN_HANDLER_RTX \  gen_rtx_MEM (Pmode, plus_constant (stack_pointer_rtx, \				     current_function_outgoing_args_size))/* 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) 0#define REGNO_OK_FOR_BASE_P(REGNO) \((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32  \ || (REGNO) == 63 || reg_renumber[REGNO] == 63)/* Maximum number of registers that can appear in a valid memory address.  */#define MAX_REGS_PER_ADDRESS 1/* Recognize any constant value that is a valid address.  For the Alpha,   there are only constants none since we want to use LDA to load any   symbolic addresses into registers.  */#define CONSTANT_ADDRESS_P(X)   \  (GET_CODE (X) == CONST_INT	\   && (unsigned HOST_WIDE_INT) (INTVAL (X) + 0x8000) < 0x10000)/* Include all constant integers and constant doubles, but not   floating-point, except for floating-point zero.  */#define LEGITIMATE_CONSTANT_P(X)  		\  (GET_MODE_CLASS (GET_MODE (X)) != MODE_FLOAT	\   || (X) == CONST0_RTX (GET_MODE (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.  *//* 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) 0/* Nonzero if X is a hard reg that can be used as a base reg   or if it is a pseudo reg.  */#define NONSTRICT_REG_OK_FOR_BASE_P(X)  \  (REGNO (X) < 32 || REGNO (X) == 63 || REGNO (X) >= FIRST_PSEUDO_REGISTER)/* ??? Nonzero if X is the frame pointer, or some virtual register   that may eliminate to the frame pointer.  These will be allowed to   have offsets greater than 32K.  This is done because register   elimination offsets will change the hi/lo split, and if we split   before reload, we will require additional instructions.  */#define NONSTRICT_REG_OK_FP_BASE_P(X)		\  (REGNO (X) == 31 || REGNO (X) == 63		\   || (REGNO (X) >= FIRST_PSEUDO_REGISTER	\       && REGNO (X) < LAST_VIRTUAL_REGISTER))/* Nonzero if X is a hard reg that can be used as a base reg.  */#define STRICT_REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))#ifdef REG_OK_STRICT#define REG_OK_FOR_BASE_P(X)	STRICT_REG_OK_FOR_BASE_P (X)#else#define REG_OK_FOR_BASE_P(X)	NONSTRICT_REG_OK_FOR_BASE_P (X)#endif/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression that is a   valid memory address for an instruction.  */#ifdef REG_OK_STRICT#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, WIN)	\do {						\  if (alpha_legitimate_address_p (MODE, X, 1))	\    goto WIN;					\} while (0)#else#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, WIN)	\do {						\  if (alpha_legitimate_address_p (MODE, X, 0))	\    goto WIN;					\} while (0)#endif/* 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.  */#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)			\do {								\  rtx new_x = alpha_legitimize_address (X, NULL_RTX, MODE);	\  if (new_x)							\    {								\      X = new_x;						\      goto WIN;							\    }								\} while (0)/* Try a machine-dependent way of reloading an illegitimate address   operand.  If we find one, push the reload and jump to WIN.  This   macro is used in only one place: `find_reloads_address' in reload.c.  */   #define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_L,WIN)		     \do {									     \  rtx new_x = alpha_legitimize_reload_address (X, MODE, OPNUM, TYPE, IND_L); \  if (new_x)								     \    {									     \      X = new_x;							     \      goto WIN;								     \    }									     \} while (0)/* Go to LABEL if ADDR (a legitimate address expression)   has an effect that depends on the machine mode it is used for.   On the Alpha this is true only for the unaligned modes.   We can   simplify this test since we know that the address must be valid.  */#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)  \{ if (GET_CODE (ADDR) == AND) goto LABEL; }/* Compute the cost of an address.  For the Alpha, all valid addresses are   the same cost.  */#define ADDRESS_COST(X)  0/* Machine-dependent reorg pass.  */#define MACHINE_DEPENDENT_REORG(X)	alpha_reorg(X)/* 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.   On the Alpha, the table is really GP-relative, not relative to the PC   of the table, but we pretend that it is PC-relative; this should be OK,   but we should try to find some better way sometime.  */#define CASE_VECTOR_PC_RELATIVE 1/* 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   also convert validly to an unsigned one.   We actually lie a bit here as overflow conditions are different.  But

⌨️ 快捷键说明

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