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

📄 alpha.h

📁 gcc-you can use this code to learn something about gcc, and inquire further into linux,
💻 H
📖 第 1 页 / 共 5 页
字号:
   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 nonzero 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(MODE) \  REAL_VALUE_ATOF ((TARGET_FLOAT_VAX ? "0.5" : "2.0"), (MODE))/* 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 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 DImode/* Mode of a function address in a call instruction (for indexing purposes).  */#define FUNCTION_MODE Pmode/* Define this if addresses of constant functions   shouldn't be put through pseudo regs where they can be cse'd.   Desirable on machines where ordinary constants are expensive   but a CALL with constant address is cheap.   We define this on the Alpha so that gen_call and gen_call_value   get to see the SYMBOL_REF (for the hint field of the jsr).  It will   then copy it into a register, thus actually letting the address be   cse'ed.  */#define NO_FUNCTION_CSE/* Define this to be nonzero if shift instructions ignore all but the low-order   few bits.  */#define SHIFT_COUNT_TRUNCATED 1/* 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.   If this is an 8-bit constant, return zero since it can be used   nearly anywhere with no cost.  If it is a valid operand for an   ADD or AND, likewise return 0 if we know it will be used in that   context.  Otherwise, return 2 since it might be used there later.   All other constants take at least two insns.  */#define CONST_COSTS(RTX,CODE,OUTER_CODE) \  case CONST_INT:						\    if (INTVAL (RTX) >= 0 && INTVAL (RTX) < 256)		\      return 0;							\  case CONST_DOUBLE:						\    if ((RTX) == CONST0_RTX (GET_MODE (RTX)))			\      return 0;							\    else if (((OUTER_CODE) == PLUS && add_operand (RTX, VOIDmode)) \	|| ((OUTER_CODE) == AND && and_operand (RTX, VOIDmode))) \      return 0;							\    else if (add_operand (RTX, VOIDmode) || and_operand (RTX, VOIDmode)) \      return 2;							\    else							\      return COSTS_N_INSNS (2);					\  case CONST:							\  case SYMBOL_REF:						\  case LABEL_REF:						\  switch (alpha_cpu)						\    {								\    case PROCESSOR_EV4:						\      return COSTS_N_INSNS (3);					\    case PROCESSOR_EV5:						\    case PROCESSOR_EV6:						\      return COSTS_N_INSNS (2);					\    default: abort();						\    }    /* Provide the costs of a rtl expression.  This is in the body of a   switch on CODE.  */   #define RTX_COSTS(X,CODE,OUTER_CODE)			\  case PLUS:  case MINUS:				\    if (FLOAT_MODE_P (GET_MODE (X)))			\      switch (alpha_cpu)				\        {						\        case PROCESSOR_EV4:				\          return COSTS_N_INSNS (6);			\        case PROCESSOR_EV5:				\        case PROCESSOR_EV6:				\          return COSTS_N_INSNS (4); 			\	default: abort();				\	}						\    else if (GET_CODE (XEXP (X, 0)) == MULT		\	     && const48_operand (XEXP (XEXP (X, 0), 1), VOIDmode)) \      return (2 + rtx_cost (XEXP (XEXP (X, 0), 0), OUTER_CODE)	\	      + rtx_cost (XEXP (X, 1), OUTER_CODE));	\    break;						\  case MULT:						\    switch (alpha_cpu)					\      {							\      case PROCESSOR_EV4:				\        if (FLOAT_MODE_P (GET_MODE (X)))		\          return COSTS_N_INSNS (6);			\        return COSTS_N_INSNS (23);			\      case PROCESSOR_EV5:				\        if (FLOAT_MODE_P (GET_MODE (X)))		\          return COSTS_N_INSNS (4);			\        else if (GET_MODE (X) == DImode)		\          return COSTS_N_INSNS (12);			\        else						\          return COSTS_N_INSNS (8);			\      case PROCESSOR_EV6:				\	if (FLOAT_MODE_P (GET_MODE (X)))		\	  return COSTS_N_INSNS (4);			\	else 						\	  return COSTS_N_INSNS (7);			\      default: abort();					\      }							\  case ASHIFT:						\    if (GET_CODE (XEXP (X, 1)) == CONST_INT		\	&& INTVAL (XEXP (X, 1)) <= 3)			\      break;						\    /* ... fall through ...  */				\  case ASHIFTRT:  case LSHIFTRT:			\    switch (alpha_cpu)					\      {							\      case PROCESSOR_EV4:				\        return COSTS_N_INSNS (2);			\      case PROCESSOR_EV5:				\      case PROCESSOR_EV6:				\        return COSTS_N_INSNS (1); 			\      default: abort();					\      }							\  case IF_THEN_ELSE:					\    switch (alpha_cpu)					\      {							\      case PROCESSOR_EV4:				\      case PROCESSOR_EV6:				\        return COSTS_N_INSNS (2);			\      case PROCESSOR_EV5:				\        return COSTS_N_INSNS (1); 			\      default: abort();					\      }							\  case DIV:  case UDIV:  case MOD:  case UMOD:		\    switch (alpha_cpu)					\      {							\      case PROCESSOR_EV4:				\        if (GET_MODE (X) == SFmode)			\          return COSTS_N_INSNS (34);			\        else if (GET_MODE (X) == DFmode)		\          return COSTS_N_INSNS (63);			\        else						\          return COSTS_N_INSNS (70);			\      case PROCESSOR_EV5:				\        if (GET_MODE (X) == SFmode)			\          return COSTS_N_INSNS (15);			\        else if (GET_MODE (X) == DFmode)		\          return COSTS_N_INSNS (22);			\        else						\          return COSTS_N_INSNS (70);	/* ??? */	\      case PROCESSOR_EV6:				\	if (GET_MODE (X) == SFmode)			\	  return COSTS_N_INSNS (12);			\        else if (GET_MODE (X) == DFmode)		\          return COSTS_N_INSNS (15);			\        else						\          return COSTS_N_INSNS (70);	/* ??? */	\      default: abort();					\      }							\  case MEM:						\    switch (alpha_cpu)					\      {							\      case PROCESSOR_EV4:				\      case PROCESSOR_EV6:				\        return COSTS_N_INSNS (3);			\      case PROCESSOR_EV5:				\        return COSTS_N_INSNS (2); 			\      default: abort();					\      }							\  case NEG:  case ABS:					\    if (! FLOAT_MODE_P (GET_MODE (X)))			\      break;						\    /* ... fall through ...  */				\  case FLOAT:  case UNSIGNED_FLOAT:  case FIX:  case UNSIGNED_FIX: \  case FLOAT_EXTEND:  case FLOAT_TRUNCATE:		\    switch (alpha_cpu)					\      {							\      case PROCESSOR_EV4:				\        return COSTS_N_INSNS (6);			\      case PROCESSOR_EV5:				\      case PROCESSOR_EV6:				\        return COSTS_N_INSNS (4); 			\      default: abort();					\      }/* Control the assembler format that we output.  *//* Output to assembler file text saying following lines   may contain character constants, extra white space, comments, etc.  */#define ASM_APP_ON (TARGET_EXPLICIT_RELOCS ? "\t.set\tmacro\n" : "")/* Output to assembler file text saying following lines   no longer contain unusual constructs.  */#define ASM_APP_OFF (TARGET_EXPLICIT_RELOCS ? "\t.set\tnomacro\n" : "")#define TEXT_SECTION_ASM_OP "\t.text"/* Output before read-only data.  */#define READONLY_DATA_SECTION_ASM_OP "\t.rdata"/* Output before writable data.  */#define DATA_SECTION_ASM_OP "\t.data"/* How to refer to registers in assembler output.   This sequence is indexed by compiler's hard-register-number (see above).  */#define REGISTER_NAMES						\{"$0", "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",		\ "$9", "$10", "$11", "$12", "$13", "$14", "$15",		\ "$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23",	\ "$24", "$25", "$26", "$27", "$28", "$29", "$30", "AP",		\ "$f0", "$f1", "$f2", "$f3", "$f4", "$f5", "$f6", "$f7", "$f8",	\ "$f9", "$f10", "$f11", "$f12", "$f13", "$f14", "$f15",		\ "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23",\ "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "$f30", "FP"}/* Strip name encoding when emitting labels.  */#define ASM_OUTPUT_LABELREF(STREAM, NAME)	\do {						\  const char *name_ = NAME;			\  if (*name_ == '@' || *name_ == '%')		\    name_ += 2;					\  if (*name_ == '*')				\    name_++;					\  else						\    fputs (user_label_prefix, STREAM);		\  fputs (name_, STREAM);			\} while (0)/* Globalizing directive for a label.  */#define GLOBAL_ASM_OP "\t.globl "/* The prefix to add to user-visible assembler symbols.  */#define USER_LABEL_PREFIX ""/* This is how to output an internal numbered label where   PREFIX is the class of label and NUM is the number within the class.  */#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\  fprintf (FILE, "$%s%d:\n", PREFIX, NUM)/* This is how to output a label for a jump table.  Arguments are the same as   for ASM_OUTPUT_INTERNAL_LABEL, except the insn for the jump table is   passed.  */#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN)	\{ ASM_OUTPUT_ALIGN (FILE, 2); ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); }/* This is how to store into the string LABEL   the symbol_ref name of an internal numbered label where   PREFIX is the class of label and NUM is the number within the class.   This is suitable for output with `assemble_name'.  */#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)	\  sprintf ((LABEL), "*$%s%ld", (PREFIX), (long)(NUM))/* We use the default ASCII-output routine, except that we don't write more   than 50 characters since the assembler doesn't support very long lines.  */#define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \  do {									      \    FILE *_hide_asm_out_file = (MYFILE);				      \    const unsigned char *_hide_p = (const unsigned char *) (MYSTRING);	      \    int _hide_thissize = (MYLENGTH);					      \    int _size_so_far = 0;						      \    {									      \      FILE *asm_out_file = _hide_asm_out_file;				      \      const unsigned char *p = _hide_p;					      \      int thissize = _hide_thissize;					      \      int i;								      \      fprintf (asm_out_file, "\t.ascii \"");				      \									      \      for (i = 0; i < thissize; i++)					      \	{								      \	  register int c = p[i];					      \									      \	  if (_size_so_far ++ > 50 && i < thissize - 4)			      \	    _size_so_far = 0, fprintf (asm_out_file, "\"\n\t.ascii \"");      \									      \	  if (c == '\"' || c == '\\')					      \	    putc ('\\', asm_out_file);					      \	  if (c >= ' ' && c < 0177)					      \	    putc (c, asm_out_file)

⌨️ 快捷键说明

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