pa.h

来自「GCC编译器源代码」· C头文件 代码 · 共 1,751 行 · 第 1/5 页

H
1,751
字号
   `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				\	&& (memory_address_p (GET_MODE (OP), XEXP (OP, 0))\	    || reload_in_progress)			\	&& ! symbolic_memory_operand (OP, VOIDmode)	\        && !(GET_CODE (XEXP (OP, 0)) == PLUS		\	     && (GET_CODE (XEXP (XEXP (OP, 0), 0)) == MULT\		 || GET_CODE (XEXP (XEXP (OP, 0), 1)) == MULT))))\   : ((C) == 'R' ?					\     (GET_CODE (OP) == MEM				\      && GET_CODE (XEXP (OP, 0)) == PLUS		\      && (GET_CODE (XEXP (XEXP (OP, 0), 0)) == MULT	\	  || GET_CODE (XEXP (XEXP (OP, 0), 1)) == MULT)	\      && (move_operand (OP, GET_MODE (OP))		\	  || memory_address_p (GET_MODE (OP), XEXP (OP, 0))\	  || reload_in_progress))			\   : ((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))	\       && !(GET_CODE (XEXP (OP, 0)) == PLUS		\	    && (GET_CODE (XEXP (XEXP (OP, 0), 0)) == MULT\		|| GET_CODE (XEXP (XEXP (OP, 0), 1)) == MULT))) : 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)			\    {							\      rtx base = 0, index;				\      if (flag_pic && XEXP (X, 0) == pic_offset_table_rtx)\	{						\	  if (GET_CODE (XEXP (X, 1)) == REG		\	      && REG_OK_FOR_BASE_P (XEXP (X, 1)))	\	    goto ADDR;					\	  else if (flag_pic == 1			\		   && GET_CODE (XEXP (X, 1)) == SYMBOL_REF)\	    goto ADDR;					\	}						\      else if (REG_P (XEXP (X, 0))			\	  && REG_OK_FOR_BASE_P (XEXP (X, 0)))		\	base = XEXP (X, 0), index = XEXP (X, 1);	\      else if (REG_P (XEXP (X, 1))			\	       && REG_OK_FOR_BASE_P (XEXP (X, 1)))	\	base = XEXP (X, 1), index = XEXP (X, 0);	\      if (base != 0)					\	if (GET_CODE (index) == CONST_INT		\	    && ((INT_14_BITS (index)			\		 && (TARGET_SOFT_FLOAT			\		     || ((MODE) != SFmode && (MODE) != DFmode))) \		|| INT_5_BITS (index)))			\	  goto ADDR;					\      if (! TARGET_SOFT_FLOAT				\	  && ! TARGET_DISABLE_INDEXING			\	  && base					\	  && (mode == SFmode || mode == DFmode)		\	  && GET_CODE (index) == MULT			\	  && GET_CODE (XEXP (index, 0)) == REG		\	  && REG_OK_FOR_BASE_P (XEXP (index, 0))	\	  && GET_CODE (XEXP (index, 1)) == CONST_INT	\	  && INTVAL (XEXP (index, 1)) == (mode == SFmode ? 4 : 8))\	goto ADDR;					\    }							\  else if (GET_CODE (X) == LO_SUM			\	   && GET_CODE (XEXP (X, 0)) == REG		\	   && REG_OK_FOR_BASE_P (XEXP (X, 0))		\	   && CONSTANT_P (XEXP (X, 1))			\	   && (TARGET_SOFT_FLOAT			\	       || ((MODE) != SFmode			\		   && (MODE) != DFmode)))		\    goto ADDR;						\  else if (GET_CODE (X) == LO_SUM			\	   && GET_CODE (XEXP (X, 0)) == SUBREG		\	   && GET_CODE (SUBREG_REG (XEXP (X, 0))) == REG\	   && REG_OK_FOR_BASE_P (SUBREG_REG (XEXP (X, 0)))\	   && CONSTANT_P (XEXP (X, 1))			\	   && (TARGET_SOFT_FLOAT			\	       || ((MODE) != SFmode			\		   && (MODE) != DFmode)))		\    goto ADDR;						\  else if (GET_CODE (X) == LABEL_REF			\	   || (GET_CODE (X) == CONST_INT		\	       && INT_5_BITS (X)))			\    goto ADDR;						\  /* Needed for -fPIC */				\  else if (GET_CODE (X) == LO_SUM			\	   && GET_CODE (XEXP (X, 0)) == REG             \	   && REG_OK_FOR_BASE_P (XEXP (X, 0))		\	   && GET_CODE (XEXP (X, 1)) == UNSPEC)		\    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.  */extern struct rtx_def *hppa_legitimize_address ();#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)	\{ rtx orig_x = (X);				\  (X) = hppa_legitimize_address (X, OLDX, MODE);	\  if ((X) != orig_x && memory_address_p (MODE, X)) \    goto 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)	\  if (GET_CODE (ADDR) == PRE_DEC	\      || GET_CODE (ADDR) == POST_DEC	\      || GET_CODE (ADDR) == PRE_INC	\      || GET_CODE (ADDR) == POST_INC)	\    goto LABEL/* Define this macro if references to a symbol must be treated   differently depending on something about the variable or   function named by the symbol (such as what section it is in).   The macro definition, if any, is executed immediately after the   rtl for DECL or other node is created.   The value of the rtl will be a `mem' whose address is a   `symbol_ref'.   The usual thing for this macro to do is to a flag in the   `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified   name string in the `symbol_ref' (if one bit is not enough   information).   On the HP-PA we use this to indicate if a symbol is in text or   data space.  Also, function labels need special treatment. */#define TEXT_SPACE_P(DECL)\  (TREE_CODE (DECL) == FUNCTION_DECL					\   || (TREE_CODE (DECL) == VAR_DECL					\       && TREE_READONLY (DECL) && ! TREE_SIDE_EFFECTS (DECL)		\       && (! DECL_INITIAL (DECL) || ! reloc_needed (DECL_INITIAL (DECL))) \       && !flag_pic)							\   || (*tree_code_type[(int) TREE_CODE (DECL)] == 'c'			\       && !(TREE_CODE (DECL) == STRING_CST && flag_writable_strings)))#define FUNCTION_NAME_P(NAME) \(*(NAME) == '@' || (*(NAME) == '*' && *((NAME) + 1) == '@'))#define ENCODE_SECTION_INFO(DECL)\do							\  { if (TEXT_SPACE_P (DECL))				\      {	rtx _rtl;					\	if (TREE_CODE (DECL) == FUNCTION_DECL		\	    || TREE_CODE (DECL) == VAR_DECL)		\	  _rtl = DECL_RTL (DECL);			\	else						\	  _rtl = TREE_CST_RTL (DECL);			\	SYMBOL_REF_FLAG (XEXP (_rtl, 0)) = 1;		\	if (TREE_CODE (DECL) == FUNCTION_DECL)		\	  hppa_encode_label (XEXP (DECL_RTL (DECL), 0), 0);\      }							\  }							\while (0)/* Store the user-specified part of SYMBOL_NAME in VAR.   This is sort of inverse to ENCODE_SECTION_INFO.  */#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME)	\  (VAR) = ((SYMBOL_NAME)  + ((SYMBOL_NAME)[0] == '*' ?	\			     1 + (SYMBOL_NAME)[1] == '@'\			     : (SYMBOL_NAME)[0] == '@'))/* On hpux10, the linker will give an error if we have a reference   in the read-only data section to a symbol defined in a shared   library.  Therefore, expressions that might require a reloc can   not be placed in the read-only data section.  */#define SELECT_SECTION(EXP,RELOC) \  if (TREE_CODE (EXP) == VAR_DECL \      && TREE_READONLY (EXP) \      && !TREE_THIS_VOLATILE (EXP) \      && DECL_INITIAL (EXP) \      && (DECL_INITIAL (EXP) == error_mark_node \          || TREE_CONSTANT (DECL_INITIAL (EXP))) \      && !reloc) \    readonly_data_section (); \  else if (TREE_CODE_CLASS (TREE_CODE (EXP)) == 'c' \	   && !(TREE_CODE (EXP) == STRING_CST && flag_writable_strings) \	   && !reloc) \    readonly_data_section (); \  else \    data_section ();   /* Arghh.  The hpux10 linker chokes if we have a reference to symbols   in a readonly data section when the symbol is defined in a shared   library.  Since we can't know at compile time if a symbol will be   satisfied by a shared library or main program we put any symbolic   constant into the normal data section.  */#define SELECT_RTX_SECTION(MODE,RTX)	\  if (symbolic_operand (RTX, MODE))	\    data_section ();			\  else					\    readonly_data_section ();/* Specify the machine mode that this machine uses   for the index in the tablejump instruction.  */#define CASE_VECTOR_MODE (TARGET_BIG_SWITCH ? TImode : DImode)/* Specify the tree operation to be used to convert reals to integers.  */#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR/* This is the kind of divide that is easiest to do in the general case.  */#define EASY_DIV_EXPR TRUNC_DIV_EXPR/* Define this as 1 if `char' should by default be signed; else as 0.  */#define DEFAULT_SIGNED_CHAR 1/* Max number of bytes we can move from memory to memory   in one reasonably fast instruction.  */#define MOVE_MAX 8/* Higher than the default as we prefer to use simple move insns   (better scheduling and delay slot filling) and because our   built-in block move is really a 2X unrolled loop.  */#define MOVE_RATIO 4/* Define if operations between registers always perform the operation   on the full register even if a narrower mode is specified.  */#define WORD_REGISTER_OPERATIONS/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD   will either zero-extend or sign-extend.  The value of this macro should   be the code that says which one of the two operations is implicitly   done, NIL if none.  */#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND/* Nonzero if access to memory by bytes is slow and undesirable.  */#define SLOW_BYTE_ACCESS 1/* Do not break .stabs pseudos into continuations.  */#define DBX_CONTIN_LENGTH 4000/* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits   is done just by pretending it is already truncated.  */#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1/* We assume that the store-condition-codes instructions store 0 for false   and some other value for true.  This is the value stored for true.  */#define STORE_FLAG_VALUE 1/* When a prototype says `char' or `short', really pass an `int'.  */#define PROMOTE_PROTOTYPES/* Specify the machine mode that pointers have.   After generation of rtl, the compiler makes no further distinction   between pointers and any other objects of this machine mode.  */#define Pmode SImode/* Add any extra modes needed to represent the condition code.   HPPA floating comparisons produce condition codes. */#define EXTRA_CC_MODES CCFPmode/* Define the names for the modes specified above.  */#define EXTRA_CC_NAMES "CCFP"/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,   return the mode to be used for the comparison.  For floating-point, CCFPmode   should be used.  CC_NOOVmode should be used when the first operand is a   PLUS

⌨️ 快捷键说明

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