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

📄 pa.h

📁 gcc库的原代码,对编程有很大帮助.
💻 H
📖 第 1 页 / 共 5 页
字号:
		     if (i <= 2)					\		       {						\			 if (i == 1) i++;				\			 ASM_DOUBLE_ARG_DESCRIPTORS (FILE, i++, i++);	\		       }						\		     else						\		       break;						\		   }							\		 else							\		   {							\		     int arg_size =					\		       FUNCTION_ARG_SIZE (TYPE_MODE (DECL_ARG_TYPE (parm)),\					  DECL_ARG_TYPE (parm));	\		     /* Passing structs by invisible reference uses	\			one general register.  */			\		     if (arg_size > 2					\			 || TYPE_NEEDS_CONSTRUCTING (DECL_ARG_TYPE (parm)))\		       arg_size = 1;					\		     if (arg_size == 2 && i <= 2)			\		       {						\			 if (i == 1) i++;				\			 fprintf (FILE, ",ARGW%d=GR", i++);		\			 fprintf (FILE, ",ARGW%d=GR", i++);		\		       }						\		     else if (arg_size == 1)				\		       fprintf (FILE, ",ARGW%d=GR", i++);		\		     else						\		       i += arg_size;					\		   }							\	       }							\	     /* anonymous args */					\	     if ((TYPE_ARG_TYPES (tree_type) != 0			\		  && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (tree_type)))\		      != void_type_node))				\		 || current_function_varargs)				\	       {							\		 for (; i < 4; i++)					\		   fprintf (FILE, ",ARGW%d=GR", i);			\	       }							\	     if (TYPE_MODE (fntype) == DFmode && ! TARGET_SOFT_FLOAT)	\	       fprintf (FILE, ",RTNVAL=FR");				\	     else if (TYPE_MODE (fntype) == SFmode && ! TARGET_SOFT_FLOAT) \	       fprintf (FILE, ",RTNVAL=FU");				\	     else if (fntype != void_type_node)				\	       fprintf (FILE, ",RTNVAL=GR");				\	     fputs ("\n", FILE);					\	   }} while (0)/* This macro generates the assembly code for function entry.   FILE is a stdio stream to output the code to.   SIZE is an int: how many units of temporary storage to allocate.   Refer to the array `regs_ever_live' to determine which registers   to save; `regs_ever_live[I]' is nonzero if register number I   is ever used in the function.  This macro is responsible for   knowing which registers should not be saved even if used.  *//* On HP-PA, move-double insns between fpu and cpu need an 8-byte block   of memory.  If any fpu reg is used in the function, we allocate   such a block here, at the bottom of the frame, just in case it's needed.   If this function is a leaf procedure, then we may choose not   to do a "save" insn.  The decision about whether or not   to do this is made in regclass.c.  */#define FUNCTION_PROLOGUE(FILE, SIZE) \  output_function_prologue (FILE, SIZE)/* Output assembler code to FILE to increment profiler label # LABELNO   for profiling a function entry.   Because HPUX _mcount is so different, we actually emit the   profiling code in function_prologue. This just stores LABELNO for   that. */#define PROFILE_BEFORE_PROLOGUE#define FUNCTION_PROFILER(FILE, LABELNO) \{ extern int hp_profile_labelno; hp_profile_labelno = (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.  */extern int may_call_alloca;extern int current_function_pretend_args_size;#define EXIT_IGNORE_STACK	\ (get_frame_size () != 0	\  || current_function_calls_alloca || current_function_outgoing_args_size)/* This macro generates the assembly code for function exit,   on machines that need it.  If FUNCTION_EPILOGUE is not defined   then individual return instructions are generated for each   return statement.  Args are same as for FUNCTION_PROLOGUE.   The function epilogue should not depend on the current stack pointer!   It should use the frame pointer only.  This is mandatory because   of alloca; we also take advantage of it to omit stack adjustments   before returning.  *//* This declaration is needed due to traditional/ANSI   incompatibilities which cannot be #ifdefed away   because they occur inside of macros.  Sigh.  */extern union tree_node *current_function_decl;#define FUNCTION_EPILOGUE(FILE, SIZE)			\  output_function_epilogue (FILE, SIZE)/* Output assembler code for a block containing the constant parts   of a trampoline, leaving space for the variable parts.\   The trampoline sets the static chain pointer to STATIC_CHAIN_REGNUM   and then branches to the specified routine.   This code template is copied from text segment to stack location   and then patched with INITIALIZE_TRAMPOLINE to contain   valid values, and then entered as a subroutine.   It is best to keep this as small as possible to avoid having to   flush multiple lines in the cache.  */#define TRAMPOLINE_TEMPLATE(FILE) \  {							\    fprintf (FILE, "\tldw	36(0,%%r22),%%r21\n");	\    fprintf (FILE, "\tbb,>=,n	%%r21,30,.+16\n");	\    fprintf (FILE, "\tdepi	0,31,2,%%r21\n");	\    fprintf (FILE, "\tldw	4(0,%%r21),%%r19\n");	\    fprintf (FILE, "\tldw	0(0,%%r21),%%r21\n");	\    fprintf (FILE, "\tldsid	(0,%%r21),%%r1\n");	\    fprintf (FILE, "\tmtsp	%%r1,%%sr0\n");		\    fprintf (FILE, "\tbe	0(%%sr0,%%r21)\n");	\    fprintf (FILE, "\tldw	40(0,%%r22),%%r29\n");	\    fprintf (FILE, "\t.word	0\n");			\    fprintf (FILE, "\t.word	0\n");			\  }/* Length in units of the trampoline for entering a nested function.   Flush the cache entries corresponding to the first and last addresses   of the trampoline.  This is necessary as the trampoline may cross two   cache lines.   If the code part of the trampoline ever grows to > 32 bytes, then it   will become necessary to hack on the cacheflush pattern in pa.md.  */#define TRAMPOLINE_SIZE (11 * 4)/* 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.   Move the function address to the trampoline template at offset 12.   Move the static chain value to trampoline template at offset 16.  */#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \{									\  rtx start_addr, end_addr;						\									\  start_addr = memory_address (Pmode, plus_constant ((TRAMP), 36));	\  emit_move_insn (gen_rtx (MEM, Pmode, start_addr), (FNADDR));		\  start_addr = memory_address (Pmode, plus_constant ((TRAMP), 40));	\  emit_move_insn (gen_rtx (MEM, Pmode, start_addr), (CXT));		\  /* fdc and fic only use registers for the address to flush,		\     they do not accept integer displacements.  */ 			\  start_addr = force_reg (SImode, (TRAMP));				\  end_addr = force_reg (SImode, plus_constant ((TRAMP), 32));		\  emit_insn (gen_dcacheflush (start_addr, end_addr));			\  end_addr = force_reg (SImode, plus_constant (start_addr, 32));	\  emit_insn (gen_icacheflush (start_addr, end_addr, start_addr,		\			      gen_reg_rtx (SImode), gen_reg_rtx (SImode)));\}/* Emit code for a call to builtin_saveregs.  We must emit USE insns which   reference the 4 integer arg registers and 4 fp arg registers.   Ordinarily they are not call used registers, but they are for   _builtin_saveregs, so we must make this explicit.  */extern struct rtx_def *hppa_builtin_saveregs ();#define EXPAND_BUILTIN_SAVEREGS(ARGLIST) hppa_builtin_saveregs (ARGLIST)/* Addressing modes, and classification of registers for them.  */#define HAVE_POST_INCREMENT#define HAVE_POST_DECREMENT#define HAVE_PRE_DECREMENT#define HAVE_PRE_INCREMENT/* 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) && ((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32))#define REGNO_OK_FOR_BASE_P(REGNO)  \  ((REGNO) && ((REGNO) < 32 || (unsigned) reg_renumber[REGNO] < 32))#define REGNO_OK_FOR_FP_P(REGNO) \  (FP_REGNO_P (REGNO) || FP_REGNO_P (reg_renumber[REGNO]))/* Now macros that check whether X is a register and also,   strictly, whether it is in a specified class.   These macros are specific to the the HP-PA, and may be used only   in code for printing assembler insns and in conditions for   define_optimization.  *//* 1 if X is an fp register.  */#define FP_REG_P(X) (REG_P (X) && REGNO_OK_FOR_FP_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 except   for symbolic addresses.  We get better CSE by rejecting them   here and allowing hppa_legitimize_address to break them up.  We   use most of the constants accepted by CONSTANT_P, except CONST_DOUBLE.  */#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) 						\   && (reload_in_progress || reload_completed || ! symbolic_expression_p (X)))/* 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)))	\   && !(flag_pic && function_label_operand (X, VOIDmode)))/* Subroutine for EXTRA_CONSTRAINT.   Return 1 iff OP is a pseudo which did not get a hard register and   we are running the reload pass.  */#define IS_RELOADING_PSEUDO_P(OP) \  ((reload_in_progress					\    && GET_CODE (OP) == REG				\    && REGNO (OP) >= FIRST_PSEUDO_REGISTER		\    && reg_renumber [REGNO (OP)] < 0))/* Optional extra constraints for this machine. Borrowed from sparc.h.   For the HPPA, `Q' means that this is a memory operand but not a   symbolic memory operand.  Note that an unassigned pseudo register   is such a memory operand.  Needed because reload will generate   these things in insns and then not re-recognize the insns, causing   constrain_operands to fail.   Also note `Q' accepts any memory operand during the reload pass.   This includes out-of-range displacements in reg+d addressing.   This makes for better code.  (??? For 2.5 address this issue).   `R' is unused.   `S' is unused.   `T' is for fp loads and stores.  */#define EXTRA_CONSTRAINT(OP, C)				\  ((C) == 'Q' ?						\   (IS_RELOADING_PSEUDO_P (OP)				\    || (GET_CODE (OP) == MEM 				\	&& reload_in_progress)				\    || (GET_CODE (OP) == MEM				\	&& memory_address_p (GET_MODE (OP), XEXP (OP, 0))\	&& ! symbolic_memory_operand (OP, VOIDmode)))	\   : ((C) == 'T' ? 					\      (GET_CODE (OP) == MEM				\       /* Using DFmode forces only short displacements	\	  to be recognized as valid in reg+d addresses.  */\       && memory_address_p (DFmode, XEXP (OP, 0))) : 0))/* 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) && (REGNO (X) < 32 || REGNO (X) >= FIRST_PSEUDO_REGISTER))/* 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) \(REGNO (X) && (REGNO (X) < 32 || REGNO (X) >= FIRST_PSEUDO_REGISTER))#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.   On the HP-PA, the actual legitimate addresses must be   REG+REG, REG+(REG*SCALE) or REG+SMALLINT.   But we can treat a SYMBOL_REF as legitimate if it is part of this   function's constant-pool, because such addresses can actually   be output as REG+SMALLINT.    Note we only allow 5 bit immediates for access to a constant address;   doing so avoids losing for loading/storing a FP register at an address   which will not fit in 5 bits.  */#define VAL_5_BITS_P(X) ((unsigned)(X) + 0x10 < 0x20)#define INT_5_BITS(X) VAL_5_BITS_P (INTVAL (X))#define VAL_U5_BITS_P(X) ((unsigned)(X) < 0x20)#define INT_U5_BITS(X) VAL_U5_BITS_P (INTVAL (X))#define VAL_11_BITS_P(X) ((unsigned)(X) + 0x400 < 0x800)#define INT_11_BITS(X) VAL_11_BITS_P (INTVAL (X))#define VAL_14_BITS_P(X) ((unsigned)(X) + 0x2000 < 0x4000)#define INT_14_BITS(X) VAL_14_BITS_P (INTVAL (X))#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)  \{							\  if ((REG_P (X) && REG_OK_FOR_BASE_P (X))		\      || ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == POST_DEC		\	   || GET_CODE (X) == PRE_INC || GET_CODE (X) == POST_INC)	\	  && REG_P (XEXP (X, 0))			\	  && REG_OK_FOR_BASE_P (XEXP (X, 0))))		\    goto ADDR;						\  else if (GET_CODE (X) == PLUS)			\    {							\

⌨️ 快捷键说明

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