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

📄 alpha.h

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 H
📖 第 1 页 / 共 5 页
字号:
   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) 0/* 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) < 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 REG_OK_FP_BASE_P(X)			\  (REGNO (X) == 31 || REGNO (X) == 63		\   || (REGNO (X) >= FIRST_PSEUDO_REGISTER	\       && REGNO (X) < LAST_VIRTUAL_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))#define REG_OK_FP_BASE_P(X) 0#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.    For Alpha, we have either a constant address or the sum of a register   and a constant address, or just a register.  For DImode, any of those   forms can be surrounded with an AND that clear the low-order three bits;   this is an "unaligned" access.   First define the basic valid address.  */#define GO_IF_LEGITIMATE_SIMPLE_ADDRESS(MODE, X, ADDR)			\{									\  rtx tmp = (X);							\  if (GET_CODE (tmp) == SUBREG						\      && (GET_MODE_SIZE (GET_MODE (tmp))				\	  < GET_MODE_SIZE (GET_MODE (SUBREG_REG (tmp)))))		\    tmp = SUBREG_REG (tmp);						\  if (REG_P (tmp) && REG_OK_FOR_BASE_P (tmp))				\    goto ADDR;								\  if (CONSTANT_ADDRESS_P (X))						\    goto ADDR;								\  if (GET_CODE (X) == PLUS)						\    {									\      tmp = XEXP (X, 0);						\      if (GET_CODE (tmp) == SUBREG					\          && (GET_MODE_SIZE (GET_MODE (tmp))				\	      < GET_MODE_SIZE (GET_MODE (SUBREG_REG (tmp)))))		\        tmp = SUBREG_REG (tmp);						\      if (REG_P (tmp))							\	{								\	  if (REG_OK_FP_BASE_P (tmp)					\	      && GET_CODE (XEXP (X, 1)) == CONST_INT)			\	    goto ADDR;							\	  if (REG_OK_FOR_BASE_P (tmp)					\	      && CONSTANT_ADDRESS_P (XEXP (X, 1)))			\	    goto ADDR;							\	}								\    }									\}/* Now accept the simple address, or, for DImode only, an AND of a simple   address that turns off the low three bits.  */#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \{ GO_IF_LEGITIMATE_SIMPLE_ADDRESS (MODE, X, ADDR); \  if ((MODE) == DImode				\      && GET_CODE (X) == AND			\      && GET_CODE (XEXP (X, 1)) == CONST_INT	\      && INTVAL (XEXP (X, 1)) == -8)		\    GO_IF_LEGITIMATE_SIMPLE_ADDRESS (MODE, XEXP (X, 0), 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.    For the Alpha, there are three cases we handle:   (1) If the address is (plus reg const_int) and the CONST_INT is not a       valid offset, compute the high part of the constant and add it to the       register.  Then our address is (plus temp low-part-const).   (2) If the address is (const (plus FOO const_int)), find the low-order       part of the CONST_INT.  Then load FOO plus any high-order part of the       CONST_INT into a register.  Our address is (plus reg low-part-const).       This is done to reduce the number of GOT entries.   (3) If we have a (plus reg const), emit the load as in (2), then add       the two registers, and finally generate (plus reg low-part-const) as       our address.  */#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)			\{ if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == REG	\      && GET_CODE (XEXP (X, 1)) == CONST_INT			\      && ! CONSTANT_ADDRESS_P (XEXP (X, 1)))			\    {								\      HOST_WIDE_INT val = INTVAL (XEXP (X, 1));			\      HOST_WIDE_INT lowpart = (val & 0xffff) - 2 * (val & 0x8000); \      HOST_WIDE_INT highpart = val - lowpart;			\      rtx high = GEN_INT (highpart);				\      rtx temp = expand_binop (Pmode, add_optab, XEXP (x, 0),	\			       high, NULL_RTX, 1, OPTAB_LIB_WIDEN); \								\      (X) = plus_constant (temp, lowpart);			\      goto WIN;							\    }								\  else if (GET_CODE (X) == CONST				\	   && GET_CODE (XEXP (X, 0)) == PLUS			\	   && GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT)	\    {								\      HOST_WIDE_INT val = INTVAL (XEXP (XEXP (X, 0), 1));	\      HOST_WIDE_INT lowpart = (val & 0xffff) - 2 * (val & 0x8000); \      HOST_WIDE_INT highpart = val - lowpart;			\      rtx high = XEXP (XEXP (X, 0), 0);				\								\      if (highpart)						\	high = plus_constant (high, highpart);			\								\      (X) = plus_constant (force_reg (Pmode, high), lowpart);	\      goto WIN;							\    }								\  else if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == REG \	   && GET_CODE (XEXP (X, 1)) == CONST			\	   && GET_CODE (XEXP (XEXP (X, 1), 0)) == PLUS		\	   && GET_CODE (XEXP (XEXP (XEXP (X, 1), 0), 1)) == CONST_INT) \    {								\      HOST_WIDE_INT val = INTVAL (XEXP (XEXP (XEXP (X, 1), 0), 1)); \      HOST_WIDE_INT lowpart = (val & 0xffff) - 2 * (val & 0x8000); \      HOST_WIDE_INT highpart = val - lowpart;			\      rtx high = XEXP (XEXP (XEXP (X, 1), 0), 0);		\								\      if (highpart)						\	high = plus_constant (high, highpart);			\								\      high = expand_binop (Pmode, add_optab, XEXP (X, 0),	\			   force_reg (Pmode, high),		\			   high, 1, OPTAB_LIB_WIDEN);		\      (X) = plus_constant (high, lowpart);			\      goto WIN;							\    }								\}/* 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.   For the Alpha, we wish to handle large displacements off a base   register by splitting the addend across an ldah and the mem insn.   This cuts number of extra insns needed from 3 to 1.  */   #define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_LEVELS,WIN)	\do {									\  /* We must recognize output that we have already generated ourselves.  */ \  if (GET_CODE (X) == PLUS						\      && GET_CODE (XEXP (X, 0)) == PLUS					\      && GET_CODE (XEXP (XEXP (X, 0), 0)) == REG			\      && GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT			\      && GET_CODE (XEXP (X, 1)) == CONST_INT)				\    {									\      push_reload (XEXP (X, 0), NULL_RTX, &XEXP (X, 0), NULL_PTR,	\		   BASE_REG_CLASS, GET_MODE (X), VOIDmode, 0, 0,	\		   OPNUM, TYPE);					\      goto WIN;								\    }									\  if (GET_CODE (X) == PLUS						\      && GET_CODE (XEXP (X, 0)) == REG					\      && REGNO (XEXP (X, 0)) < FIRST_PSEUDO_REGISTER			\      && REG_MODE_OK_FOR_BASE_P (XEXP (X, 0), MODE)			\      && GET_CODE (XEXP (X, 1)) == CONST_INT)				\    {									\      HOST_WIDE_INT val = INTVAL (XEXP (X, 1));				\      HOST_WIDE_INT low = ((val & 0xffff) ^ 0x8000) - 0x8000;		\      HOST_WIDE_INT high						\	= (((val - low) & 0xffffffff) ^ 0x80000000) - 0x80000000;	\									\      /* Check for 32-bit overflow.  */					\      if (high + low != val)						\	break;								\									\      /* Reload the high part into a base reg; leave the low part	\	 in the mem directly.  */					\									\      X = gen_rtx_PLUS (GET_MODE (X),					\			gen_rtx_PLUS (GET_MODE (X), XEXP (X, 0),	\				      GEN_INT (high)),			\			GEN_INT (low));					\	  								\      push_reload (XEXP (X, 0), NULL_RTX, &XEXP (X, 0), NULL_PTR,	\		   BASE_REG_CLASS, GET_MODE (X), VOIDmode, 0, 0,	\		   OPNUM, TYPE);					\      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/* 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/* 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   they aren't being checked anyway.  */#define FIXUNS_TRUNC_LIKE_FIX_TRUNC/* Max number of bytes we can move to or from memory   in one reasonably fast instruction.  */#define MOVE_MAX 8/* If a memory-to-memory move would take MOVE_RATIO or more simple   move-instruction pairs, we will do a movstr or libcall instead.   Without byte/word accesses, we want no more than four instructions;   with, several single byte accesses are better.   */#define MOVE_RATIO  (TARGET_BWX ? 7 : 2)/* Largest number of bytes of an object that can be placed in a register.   On the Alpha we have plenty of registers, so use TImode.  */#define MAX_FIXED_MODE_SIZE	GET_MODE_BITSIZE (TImode)/* Nonzero if access to memory by bytes is no faster than for words.   Also non-zero if doing byte operations (specifically shifts) in registers   is undesirable.    On the Alpha, we want to not use the byte operation and instead use   masking operations to access fields; these will save instructions.  */#define SLOW_BYTE_ACCESS	1/* 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) ((MODE) == SImode ? SIGN_EXTEND : ZERO_EXTEND)/* Define if loading short immediate values into registers sign extends.  */#define SHORT_IMMEDIATES_SIGN_EXTEND/* 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/* Define the value returned by a floating-point comparison instruction.  */#define FLOAT_STORE_FLAG_VALUE (TARGET_FLOAT_VAX ? 0.5 : 2.0)/* Canonicalize a comparison from one we don't have to one we do have.  */#define CANONICALIZE_COMPARISON(CODE,OP0,OP1) \  do {									\    if (((CODE) == GE || (CODE) == GT || (CODE) == GEU || (CODE) == GTU) \	&& (GET_CODE (OP1) == REG || (OP1) == const0_rtx))		\      {									\	rtx tem = (OP0);						\	(OP0) = (OP1);							\	(OP1) = tem;							\	(CODE) = swap_condition (CODE);					\      }									\    if (((CODE) == LT || (CODE) == LTU)					\	&& GET_CODE (OP1) == CONST_INT && INTVAL (OP1) == 256)		\      {									\	(CODE) = (CODE) == LT ? LE : LEU;				\	(OP1) = GEN_INT (255);						\      }									\  } while (0)/* Specify th

⌨️ 快捷键说明

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