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

📄 vax.h

📁 gcc-you can use this code to learn something about gcc, and inquire further into linux,
💻 H
📖 第 1 页 / 共 4 页
字号:
#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.   The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS,   except for CONSTANT_ADDRESS_P which is actually machine-independent.  */#ifdef NO_EXTERNAL_INDIRECT_ADDRESS/* Zero if this contains a (CONST (PLUS (SYMBOL_REF) (...))) and the   symbol in the SYMBOL_REF is an external symbol.  */#define INDIRECTABLE_CONSTANT_P(X) \ (! (GET_CODE ((X)) == CONST					\     && GET_CODE (XEXP ((X), 0)) == PLUS			\     && GET_CODE (XEXP (XEXP ((X), 0), 0)) == SYMBOL_REF	\     && SYMBOL_REF_FLAG (XEXP (XEXP ((X), 0), 0))))/* Re-definition of CONSTANT_ADDRESS_P, which is true only when there   are no SYMBOL_REFs for external symbols present.  */#define INDIRECTABLE_CONSTANT_ADDRESS_P(X)   				\  (GET_CODE (X) == LABEL_REF 						\   || (GET_CODE (X) == SYMBOL_REF && !SYMBOL_REF_FLAG (X))		\   || (GET_CODE (X) == CONST && INDIRECTABLE_CONSTANT_P(X))		\   || GET_CODE (X) == CONST_INT)/* Nonzero if X is an address which can be indirected.  External symbols   could be in a sharable image library, so we disallow those.  */#define INDIRECTABLE_ADDRESS_P(X)  \  (INDIRECTABLE_CONSTANT_ADDRESS_P (X) 					\   || (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X))			\   || (GET_CODE (X) == PLUS						\       && GET_CODE (XEXP (X, 0)) == REG					\       && REG_OK_FOR_BASE_P (XEXP (X, 0))				\       && INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (X, 1))))#else /* not NO_EXTERNAL_INDIRECT_ADDRESS */#define INDIRECTABLE_CONSTANT_ADDRESS_P(X) CONSTANT_ADDRESS_P(X)/* Nonzero if X is an address which can be indirected.  */#define INDIRECTABLE_ADDRESS_P(X)  \  (CONSTANT_ADDRESS_P (X)						\   || (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X))			\   || (GET_CODE (X) == PLUS						\       && GET_CODE (XEXP (X, 0)) == REG					\       && REG_OK_FOR_BASE_P (XEXP (X, 0))				\       && CONSTANT_ADDRESS_P (XEXP (X, 1))))#endif /* not NO_EXTERNAL_INDIRECT_ADDRESS *//* Go to ADDR if X is a valid address not using indexing.   (This much is the easy part.)  */#define GO_IF_NONINDEXED_ADDRESS(X, ADDR)  \{ register rtx xfoob = (X);						\  if (GET_CODE (xfoob) == REG)						\    {									\      extern rtx *reg_equiv_mem;					\      if (! reload_in_progress						\	  || reg_equiv_mem[REGNO (xfoob)] == 0				\	  || INDIRECTABLE_ADDRESS_P (reg_equiv_mem[REGNO (xfoob)]))	\	goto ADDR;							\    }									\  if (CONSTANT_ADDRESS_P (xfoob)) goto ADDR;				\  if (INDIRECTABLE_ADDRESS_P (xfoob)) goto ADDR;			\  xfoob = XEXP (X, 0);							\  if (GET_CODE (X) == MEM && INDIRECTABLE_ADDRESS_P (xfoob))		\    goto ADDR;								\  if ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == POST_INC)		\      && GET_CODE (xfoob) == REG && REG_OK_FOR_BASE_P (xfoob))		\    goto ADDR; }/* 1 if PROD is either a reg times size of mode MODE and MODE is less   than or equal 8 bytes, or just a reg if MODE is one byte.   This macro's expansion uses the temporary variables xfoo0 and xfoo1   that must be declared in the surrounding context.  */#define INDEX_TERM_P(PROD, MODE)   \(GET_MODE_SIZE (MODE) == 1						\ ? (GET_CODE (PROD) == REG && REG_OK_FOR_BASE_P (PROD))			\ : (GET_CODE (PROD) == MULT && GET_MODE_SIZE (MODE) <= 8		\    &&									\    (xfoo0 = XEXP (PROD, 0), xfoo1 = XEXP (PROD, 1),			\     ((((GET_CODE (xfoo0) == CONST_INT					\         && GET_CODE (xfoo1) == REG)					\         && INTVAL (xfoo0) == (int)GET_MODE_SIZE (MODE))		\         && REG_OK_FOR_INDEX_P (xfoo1))					\        ||								\      (((GET_CODE (xfoo1) == CONST_INT					\         && GET_CODE (xfoo0) == REG)					\         && INTVAL (xfoo1) == (int)GET_MODE_SIZE (MODE))		\         && REG_OK_FOR_INDEX_P (xfoo0))))))/* Go to ADDR if X is the sum of a register   and a valid index term for mode MODE.  */#define GO_IF_REG_PLUS_INDEX(X, MODE, ADDR)	\{ register rtx xfooa;							\  if (GET_CODE (X) == PLUS)						\    { if (GET_CODE (XEXP (X, 0)) == REG					\	  && REG_OK_FOR_BASE_P (XEXP (X, 0))				\	  && (xfooa = XEXP (X, 1),					\	      INDEX_TERM_P (xfooa, MODE)))				\	goto ADDR;							\      if (GET_CODE (XEXP (X, 1)) == REG					\	  && REG_OK_FOR_BASE_P (XEXP (X, 1))				\	  && (xfooa = XEXP (X, 0),					\	      INDEX_TERM_P (xfooa, MODE)))				\	goto ADDR; } }#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)  \{ register rtx xfoo, xfoo0, xfoo1;					\  GO_IF_NONINDEXED_ADDRESS (X, ADDR);					\  if (GET_CODE (X) == PLUS)						\    { /* Handle <address>[index] represented with index-sum outermost */\      xfoo = XEXP (X, 0);						\      if (INDEX_TERM_P (xfoo, MODE))					\	{ GO_IF_NONINDEXED_ADDRESS (XEXP (X, 1), ADDR); }		\      xfoo = XEXP (X, 1);						\      if (INDEX_TERM_P (xfoo, MODE))					\	{ GO_IF_NONINDEXED_ADDRESS (XEXP (X, 0), ADDR); }		\      /* Handle offset(reg)[index] with offset added outermost */	\      if (INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (X, 0)))		\	{ if (GET_CODE (XEXP (X, 1)) == REG				\	      && REG_OK_FOR_BASE_P (XEXP (X, 1)))			\	    goto ADDR;							\	  GO_IF_REG_PLUS_INDEX (XEXP (X, 1), MODE, ADDR); }		\      if (INDIRECTABLE_CONSTANT_ADDRESS_P (XEXP (X, 1)))		\	{ if (GET_CODE (XEXP (X, 0)) == REG				\	      && REG_OK_FOR_BASE_P (XEXP (X, 0)))			\	    goto ADDR;							\	  GO_IF_REG_PLUS_INDEX (XEXP (X, 0), MODE, 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 VAX, nothing needs to be done.  */#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)  {}/* Go to LABEL if ADDR (a legitimate address expression)   has an effect that depends on the machine mode it is used for.   On the VAX, the predecrement and postincrement address depend thus   (the amount of decrement or increment being the length of the operand)   and all indexed address depend thus (because the index scale factor   is the length of the operand).  */#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)	\ { if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC)	\     goto LABEL; 							\   if (GET_CODE (ADDR) == PLUS)						\     { if (CONSTANT_ADDRESS_P (XEXP (ADDR, 0))				\	   && GET_CODE (XEXP (ADDR, 1)) == REG);			\       else if (CONSTANT_ADDRESS_P (XEXP (ADDR, 1))			\		&& GET_CODE (XEXP (ADDR, 0)) == REG);			\       else goto LABEL; }}/* Specify the machine mode that this machine uses   for the index in the tablejump instruction.  */#define CASE_VECTOR_MODE HImode/* 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.  */#define CASE_VECTOR_PC_RELATIVE 1/* Define this if the case instruction drops through after the table   when the index is out of range.  Don't define it if the case insn   jumps to the default label instead.  */#define CASE_DROPS_THROUGH/* Indicate that jump tables go in the text section.  This is   necessary when compiling PIC code.  */#define JUMP_TABLES_IN_TEXT_SECTION 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.  */#define FIXUNS_TRUNC_LIKE_FIX_TRUNC/* Max number of bytes we can move from memory to memory   in one reasonably fast instruction.  */#define MOVE_MAX 8/* Nonzero if access to memory by bytes is slow and undesirable.  */#define SLOW_BYTE_ACCESS 0/* Define if shifts truncate the shift count   which implies one can omit a sign-extension or zero-extension   of a shift count.  *//* #define SHIFT_COUNT_TRUNCATED *//* 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/* When a prototype says `char' or `short', really pass an `int'.   (On the VAX, this is required for system-library compatibility.)  */#define PROMOTE_PROTOTYPES 1/* 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/* A function address in a call instruction   is a byte address (for indexing purposes)   so give the MEM rtx a byte's mode.  */#define FUNCTION_MODE QImode/* This machine doesn't use IEEE floats.  */#define TARGET_FLOAT_FORMAT VAX_FLOAT_FORMAT/* Compute the cost of computing a constant rtl expression RTX   whose rtx-code is CODE.  The body of this macro is a portion   of a switch statement.  If the code is computed here,   return it with a return statement.  Otherwise, break from the switch.  *//* On a VAX, constants from 0..63 are cheap because they can use the   1 byte literal constant format.  compare to -1 should be made cheap   so that decrement-and-branch insns can be formed more easily (if   the value -1 is copied to a register some decrement-and-branch patterns   will not match).  */#define CONST_COSTS(RTX,CODE,OUTER_CODE) \  case CONST_INT:						\    if (INTVAL (RTX) == 0) return 0;				\    if ((OUTER_CODE) == AND)					\      return ((unsigned) ~INTVAL (RTX) <= 077) ? 1 : 2;		\    if ((unsigned) INTVAL (RTX) <= 077) return 1;		\    if ((OUTER_CODE) == COMPARE && INTVAL (RTX) == -1)		\      return 1;							\    if ((OUTER_CODE) == PLUS && (unsigned) -INTVAL (RTX) <= 077)\      return 1;							\  case CONST:							\  case LABEL_REF:						\  case SYMBOL_REF:						\    return 3;							\  case CONST_DOUBLE:						\    if (GET_MODE_CLASS (GET_MODE (RTX)) == MODE_FLOAT)		\      return vax_float_literal (RTX) ? 5 : 8;			\    else							\      return (((CONST_DOUBLE_HIGH (RTX) == 0			\		&& (unsigned) CONST_DOUBLE_LOW (RTX) < 64)	\	       || ((OUTER_CODE) == PLUS				\		   && CONST_DOUBLE_HIGH (RTX) == -1		\		   && (unsigned)-CONST_DOUBLE_LOW (RTX) < 64))	\	      ? 2 : 5);#define RTX_COSTS(RTX,CODE,OUTER_CODE) case FIX: case FLOAT:	\ case MULT: case DIV: case UDIV: case MOD: case UMOD:		\ case ASHIFT: case LSHIFTRT: case ASHIFTRT:			\ case ROTATE: case ROTATERT: case PLUS: case MINUS: case IOR:	\ case XOR: case AND: case NEG: case NOT: case ZERO_EXTRACT:	\ case SIGN_EXTRACT: case MEM: return vax_rtx_cost(RTX)#define	ADDRESS_COST(RTX) (1 + (GET_CODE (RTX) == REG ? 0 : vax_address_cost(RTX)))/* Specify the cost of a branch insn; roughly the number of extra insns that   should be added to avoid a branch.   Branches are extremely cheap on the VAX while the shift insns often   used to replace branches can be expensive.  */#define BRANCH_COST 0/* * We can use the BSD C library routines for the libgcc calls that are * still generated, since that's what they boil down to anyways. */#define UDIVSI3_LIBCALL "*udiv"#define UMODSI3_LIBCALL "*urem"/* Tell final.c how to eliminate redundant test instructions.  *//* Here we define machine-dependent flags and fields in cc_status   (see `conditions.h').  No extra ones are needed for the VAX.  *//* Store in cc_status the expressions   that the condition codes will describe   after execution of an instruction whose pattern is EXP.   Do not alter them if the instruction would not alter the cc's.  */#define NOTICE_UPDATE_CC(EXP, INSN) \{ if (GET_CODE (EXP) == SET)					\    { if (GET_CODE (SET_SRC (EXP)) == CALL)			\	CC_STATUS_INIT;						\

⌨️ 快捷键说明

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