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

📄 m68k.h

📁 linux下的gcc编译器
💻 H
📖 第 1 页 / 共 5 页
字号:
   Likewise for a LABEL_REF when generating PIC.   The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS.  *//* Allow SUBREG everywhere we allow REG.  This results in better code.  It   also makes function inlining work when inline functions are called with   arguments that are SUBREGs.  */#define LEGITIMATE_BASE_REG_P(X)   \  ((GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X))	\   || (GET_CODE (X) == SUBREG				\       && GET_CODE (SUBREG_REG (X)) == REG		\       && REG_OK_FOR_BASE_P (SUBREG_REG (X))))#define INDIRECTABLE_1_ADDRESS_P(X)  \  ((CONSTANT_ADDRESS_P (X) && (!flag_pic || LEGITIMATE_PIC_OPERAND_P (X))) \   || LEGITIMATE_BASE_REG_P (X)						\   || ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == POST_INC)		\       && LEGITIMATE_BASE_REG_P (XEXP (X, 0)))				\   || (GET_CODE (X) == PLUS						\       && LEGITIMATE_BASE_REG_P (XEXP (X, 0))				\       && GET_CODE (XEXP (X, 1)) == CONST_INT				\       && (TARGET_68020							\	   || ((unsigned) INTVAL (XEXP (X, 1)) + 0x8000) < 0x10000))	\   || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\       && flag_pic && GET_CODE (XEXP (X, 1)) == SYMBOL_REF)		\   || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx 	\       && flag_pic && GET_CODE (XEXP (X, 1)) == LABEL_REF))#define GO_IF_NONINDEXED_ADDRESS(X, ADDR)  \{ if (INDIRECTABLE_1_ADDRESS_P (X)) goto ADDR; }/* Only labels on dispatch tables are valid for indexing from.  */#define GO_IF_INDEXABLE_BASE(X, ADDR)				\{ rtx temp;							\  if (GET_CODE (X) == LABEL_REF					\      && (temp = next_nonnote_insn (XEXP (X, 0))) != 0		\      && GET_CODE (temp) == JUMP_INSN				\      && (GET_CODE (PATTERN (temp)) == ADDR_VEC			\	  || GET_CODE (PATTERN (temp)) == ADDR_DIFF_VEC))	\    goto ADDR;							\  if (LEGITIMATE_BASE_REG_P (X)) goto ADDR; }#define GO_IF_INDEXING(X, ADDR)	\{ if (GET_CODE (X) == PLUS && LEGITIMATE_INDEX_P (XEXP (X, 0)))		\    { GO_IF_INDEXABLE_BASE (XEXP (X, 1), ADDR); }			\  if (GET_CODE (X) == PLUS && LEGITIMATE_INDEX_P (XEXP (X, 1)))		\    { GO_IF_INDEXABLE_BASE (XEXP (X, 0), ADDR); } }#define GO_IF_INDEXED_ADDRESS(X, ADDR)	 \{ GO_IF_INDEXING (X, ADDR);						\  if (GET_CODE (X) == PLUS)						\    { if (GET_CODE (XEXP (X, 1)) == CONST_INT				\	  && (TARGET_68020 || (unsigned) INTVAL (XEXP (X, 1)) + 0x80 < 0x100))		\	{ rtx go_temp = XEXP (X, 0); GO_IF_INDEXING (go_temp, ADDR); }	\      if (GET_CODE (XEXP (X, 0)) == CONST_INT				\	  && (TARGET_68020 || (unsigned) INTVAL (XEXP (X, 0)) + 0x80 < 0x100))		\	{ rtx go_temp = XEXP (X, 1); GO_IF_INDEXING (go_temp, ADDR); } } }/* coldfire/5200 does not allow HImode index registers.  */#define LEGITIMATE_INDEX_REG_P(X)   \  ((GET_CODE (X) == REG && REG_OK_FOR_INDEX_P (X))	\   || (! TARGET_5200					\       && GET_CODE (X) == SIGN_EXTEND			\       && GET_CODE (XEXP (X, 0)) == REG			\       && GET_MODE (XEXP (X, 0)) == HImode		\       && REG_OK_FOR_INDEX_P (XEXP (X, 0)))		\   || (GET_CODE (X) == SUBREG				\       && GET_CODE (SUBREG_REG (X)) == REG		\       && REG_OK_FOR_INDEX_P (SUBREG_REG (X))))#define LEGITIMATE_INDEX_P(X)   \   (LEGITIMATE_INDEX_REG_P (X)				\    || ((TARGET_68020 || TARGET_5200) && GET_CODE (X) == MULT \	&& LEGITIMATE_INDEX_REG_P (XEXP (X, 0))		\	&& GET_CODE (XEXP (X, 1)) == CONST_INT		\	&& (INTVAL (XEXP (X, 1)) == 2			\	    || INTVAL (XEXP (X, 1)) == 4		\	    || (INTVAL (XEXP (X, 1)) == 8 && !TARGET_5200))))/* If pic, we accept INDEX+LABEL, which is what do_tablejump makes.  */#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)				\{ GO_IF_NONINDEXED_ADDRESS (X, ADDR);					\  GO_IF_INDEXED_ADDRESS (X, ADDR);					\  if (flag_pic && MODE == CASE_VECTOR_MODE && GET_CODE (X) == PLUS	\      && LEGITIMATE_INDEX_P (XEXP (X, 0))				\      && GET_CODE (XEXP (X, 1)) == LABEL_REF)				\    goto ADDR; }/* Don't call memory_address_noforce for the address to fetch   the switch offset.  This address is ok as it stands (see above),   but memory_address_noforce would alter it.  */#define PIC_CASE_VECTOR_ADDRESS(index) index/* 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 68000, we handle X+REG by loading X into a register R and   using R+REG.  R will go in an address reg and indexing will be used.   However, if REG is a broken-out memory address or multiplication,   nothing needs to be done because REG can certainly go in an address reg.  */#define COPY_ONCE(Y) if (!copied) { Y = copy_rtx (Y); copied = ch = 1; }#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)   \{ register int ch = (X) != (OLDX);					\  if (GET_CODE (X) == PLUS)						\    { int copied = 0;							\      if (GET_CODE (XEXP (X, 0)) == MULT)				\	{ COPY_ONCE (X); XEXP (X, 0) = force_operand (XEXP (X, 0), 0);}	\      if (GET_CODE (XEXP (X, 1)) == MULT)				\	{ COPY_ONCE (X); XEXP (X, 1) = force_operand (XEXP (X, 1), 0);}	\      if (ch && GET_CODE (XEXP (X, 1)) == REG				\	  && GET_CODE (XEXP (X, 0)) == REG)				\	goto WIN;							\      if (ch) { GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN); }		\      if (GET_CODE (XEXP (X, 0)) == REG					\	       || (GET_CODE (XEXP (X, 0)) == SIGN_EXTEND		\		   && GET_CODE (XEXP (XEXP (X, 0), 0)) == REG		\		   && GET_MODE (XEXP (XEXP (X, 0), 0)) == HImode))	\	{ register rtx temp = gen_reg_rtx (Pmode);			\	  register rtx val = force_operand (XEXP (X, 1), 0);		\	  emit_move_insn (temp, val);					\	  COPY_ONCE (X);						\	  XEXP (X, 1) = temp;						\	  goto WIN; }							\      else if (GET_CODE (XEXP (X, 1)) == REG				\	       || (GET_CODE (XEXP (X, 1)) == SIGN_EXTEND		\		   && GET_CODE (XEXP (XEXP (X, 1), 0)) == REG		\		   && GET_MODE (XEXP (XEXP (X, 1), 0)) == HImode))	\	{ register rtx temp = gen_reg_rtx (Pmode);			\	  register rtx val = force_operand (XEXP (X, 0), 0);		\	  emit_move_insn (temp, val);					\	  COPY_ONCE (X);						\	  XEXP (X, 0) = temp;						\	  goto 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 68000, only predecrement and postincrement address depend thus   (the amount of decrement or increment being 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/* 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 as 1 if `char' should by default be signed; else as 0.  */#define DEFAULT_SIGNED_CHAR 1/* Don't cse the address of the function being compiled.  */#define NO_RECURSIVE_FUNCTION_CSE/* Max number of bytes we can move from memory to memory   in one reasonably fast instruction.  */#define MOVE_MAX 4/* Nonzero if access to memory by bytes is slow and undesirable.  */#define SLOW_BYTE_ACCESS 0/* 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 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/* 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.  */#define CONST_COSTS(RTX,CODE,OUTER_CODE) \  case CONST_INT:						\    /* Constant zero is super cheap due to clr instruction.  */	\    if (RTX == const0_rtx) return 0;				\    /* if ((OUTER_CODE) == SET) */				\      return const_int_cost(RTX);				\  case CONST:							\  case LABEL_REF:						\  case SYMBOL_REF:						\    return 3;							\  case CONST_DOUBLE:						\    /* Make 0.0 cheaper than other floating constants to	\       encourage creating tstsf and tstdf insns.  */		\    if ((OUTER_CODE) == COMPARE					\        && ((RTX) == CONST0_RTX (SFmode)			\	    || (RTX) == CONST0_RTX (DFmode)))			\      return 4;							\    return 5;/* Compute the cost of various arithmetic operations.   These are vaguely right for a 68020.  *//* The costs for long multiply have been adjusted to   work properly in synth_mult on the 68020,   relative to an average of the time for add and the time for shift,   taking away a little more because sometimes move insns are needed.  *//* div?.w is relatively cheaper on 68000 counted in COSTS_N_INSNS terms.  */#define MULL_COST (TARGET_68060 ? 2 : TARGET_68040 ? 5 : 13)#define MULW_COST (TARGET_68060 ? 2 : TARGET_68040 ? 3 : TARGET_68020 ? 8 : 5)#define DIVW_COST (TARGET_68020 ? 27 : 12)#define RTX_COSTS(X,CODE,OUTER_CODE)				\  case PLUS:							\    /* An lea costs about three times as much as a simple add.  */  \    if (GET_MODE (X) == SImode					\	&& GET_CODE (XEXP (X, 1)) == REG			\	&& GET_CODE (XEXP (X, 0)) == MULT			\	&& GET_CODE (XEXP (XEXP (X, 0), 0)) == REG		\	&& GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT	\	&& (INTVAL (XEXP (XEXP (X, 0), 1)) == 2			\	    || INTVAL (XEXP (XEXP (X, 0), 1)) == 4		\	    || INTVAL (XEXP (XEXP (X, 0), 1)) == 8))		\      return COSTS_N_INSNS (3);	 /* lea an@(dx:l:i),am */	\    break;							\  case ASHIFT:							\  case ASHIFTRT:						\  case LSHIFTRT:						\    if (TARGET_68060)						\      return COSTS_N_INSNS(1);					\    if (! TARGET_68020)							\      {									\	if (GET_CODE (XEXP (X, 1)) == CONST_INT)			\	  {								\	    if (INTVAL (XEXP (X, 1)) < 16)				\	      return COSTS_N_INSNS (2) + INTVAL (XEXP (X, 1)) / 2;	\	    else							\	      /* We're using clrw + swap for these cases.  */		\	      return COSTS_N_INSNS (4) + (INTVAL (XEXP (X, 1)) - 16) / 2; \	  }								\	return COSTS_N_INSNS (10); /* worst case */			\      }									\    /* A shift by a big integer takes an extra instruction.  */ \    if (GET_CODE (XEXP (X, 1)) == CONST_INT			\	&& (INTVAL (XEXP (X, 1)) == 16))			\      return COSTS_N_INSNS (2);	 /* clrw;swap */		\    if (GET_CODE (XEXP (X, 1)) == CONST_INT			\	&& !(INTVAL (XEXP (X, 1)) > 0				\	     && INTVAL (XEXP (X, 1)) <= 8))			\      return COSTS_N_INSNS (3);	 /* lsr #i,dn */		\    break;							\  case MULT:							\    if ((GET_CODE (XEXP (X, 0)) == ZERO_EXTEND			\	 || GET_CODE (XEXP (X, 0)) == SIGN_EXTEND)		\	&& GET_MODE (X) == SImode)				\      return COSTS_N_INSNS (MULW_COST);				\    if (GET_MODE (X) == QImode || GET_MODE (X) == HImode)	\      return COSTS_N_INSNS (MULW_COST);				\    else							\      return COSTS_N_INSNS (MULL_COST);				\  case DIV:							\  case UDIV:							\  case MOD:							\  case UMOD:							\    if (GET_MODE (X) == QImode || GET_MODE (X) == HImode)	\      return COSTS_N_INSNS (DIVW_COST); /* div.w */		\    return COSTS_N_INSNS (43);	 /* div.l *//* Tell final.c how to eliminate redundant test instructions.  *//* Here we define machine-dependent flags and fields in cc_status   (see `conditions.h').  *//* Set if the cc value is actually in the 68881, so a floating point   conditional branch must be output.  */#define CC_IN_68881 04000/* 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.  *//* On the 68000, all the insns to store in an address register fail to   set the cc's.  However, in some cases these instructions can make it   possibly invalid to use the saved cc's.  In those cases we clear out   some or all of the saved cc's so they won't be used.  */#define NOTICE_UPDATE_CC(EXP,INSN) notice_update_cc (EXP, INSN)#define OUTPUT_JUMP(NORMAL, FLOAT, NO_OV)  \{ if (cc_prev_status.flags & CC_IN_68881)			\    return FLOAT;						\  if (cc_prev_status.flags & CC_NO_OVERFLOW)			\    return NO_OV;						\  return NORMAL; }/* Control the assembler format that we output.  *//* Output at beginning of assembler file.  */#define ASM_FILE_START(FILE)	\  fprintf (FILE, "#NO_APP\n");/* Output to assembler file text saying following lines   may contain character constants, extra white space, comments, etc.  */#define ASM_APP_ON "#APP\n"

⌨️ 快捷键说明

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