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

📄 m68k.h

📁 gcc库的原代码,对编程有很大帮助.
💻 H
📖 第 1 页 / 共 5 页
字号:
	      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"/* Output to assembler file text saying following lines   no longer contain unusual constructs.  */#define ASM_APP_OFF "#NO_APP\n"/* Output before read-only data.  */#define TEXT_SECTION_ASM_OP ".text"/* Output before writable data.  */#define DATA_SECTION_ASM_OP ".data"/* Here are four prefixes that are used by asm_fprintf to   facilitate customization for alternate assembler syntaxes.   Machines with no likelihood of an alternate syntax need not   define these and need not use asm_fprintf.  *//* The prefix for register names.  Note that REGISTER_NAMES   is supposed to include this prefix.  */#define REGISTER_PREFIX ""/* The prefix for local labels.  You should be able to define this as   an empty string, or any arbitrary string (such as ".", ".L%", etc)   without having to make any other changes to account for the specific   definition.  Note it is a string literal, not interpreted by printf   and friends. */#define LOCAL_LABEL_PREFIX ""/* The prefix to add to user-visible assembler symbols.  */#define USER_LABEL_PREFIX "_"/* The prefix for immediate operands.  */#define IMMEDIATE_PREFIX "#"/* How to refer to registers in assembler output.   This sequence is indexed by compiler's hard-register-number (see above).  */#ifndef SUPPORT_SUN_FPA#define REGISTER_NAMES \{"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7",	\ "a0", "a1", "a2", "a3", "a4", "a5", "a6", "sp",	\ "fp0", "fp1", "fp2", "fp3", "fp4", "fp5", "fp6", "fp7" }#else /* SUPPORTED_SUN_FPA */#define REGISTER_NAMES \{"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7",	\ "a0", "a1", "a2", "a3", "a4", "a5", "a6", "sp",	\ "fp0", "fp1", "fp2", "fp3", "fp4", "fp5", "fp6", "fp7", \ "fpa0", "fpa1", "fpa2", "fpa3", "fpa4", "fpa5", "fpa6", "fpa7", \ "fpa8", "fpa9", "fpa10", "fpa11", "fpa12", "fpa13", "fpa14", "fpa15", \ "fpa16", "fpa17", "fpa18", "fpa19", "fpa20", "fpa21", "fpa22", "fpa23", \ "fpa24", "fpa25", "fpa26", "fpa27", "fpa28", "fpa29", "fpa30", "fpa31" }#endif /* defined SUPPORT_SUN_FPA *//* How to renumber registers for dbx and gdb.   On the Sun-3, the floating point registers have numbers   18 to 25, not 16 to 23 as they do in the compiler.  */#define DBX_REGISTER_NUMBER(REGNO) ((REGNO) < 16 ? (REGNO) : (REGNO) + 2)/* This is how to output the definition of a user-level label named NAME,   such as the label on a static function or variable NAME.  */#define ASM_OUTPUT_LABEL(FILE,NAME)	\  do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)/* This is how to output a command to make the user-level label named NAME   defined for reference from other files.  */#define GLOBAL_ASM_OP ".globl"#define ASM_GLOBALIZE_LABEL(FILE,NAME)	\  do { fprintf (FILE, "%s ", GLOBAL_ASM_OP);		\       assemble_name (FILE, NAME);			\       fputs ("\n", FILE);} while (0)/* This is how to output a reference to a user-level label named NAME.   `assemble_name' uses this.  */#define ASM_OUTPUT_LABELREF(FILE,NAME)	\  asm_fprintf (FILE, "%0U%s", NAME)/* 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)	\  asm_fprintf (FILE, "%0L%s%d:\n", 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%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM)/* This is how to output a `long double' extended real constant. */  #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE)  				\do { long l[3];								\     REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l);			\     if (sizeof (int) == sizeof (long))					\       fprintf (FILE, "\t.long 0x%x,0x%x,0x%x\n", l[0], l[1], l[2]);	\     else								\       fprintf (FILE, "\t.long 0x%lx,0x%lx,0x%lx\n", l[0], l[1], l[2]);	\   } while (0)  /* This is how to output an assembler line defining a `double' constant.  */#define ASM_OUTPUT_DOUBLE(FILE,VALUE)				\  do { char dstr[30];						\       REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr);		\       fprintf (FILE, "\t.double 0r%s\n", dstr);		\     } while (0)/* This is how to output an assembler line defining a `float' constant.  */#define ASM_OUTPUT_FLOAT(FILE,VALUE)			\do { long l;						\     REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);		\     if (sizeof (int) == sizeof (long))			\       fprintf (FILE, "\t.long 0x%x\n", l);		\     else						\       fprintf (FILE, "\t.long 0x%lx\n", l);		\   } while (0)/* This is how to output an assembler line defining an `int' constant.  */#define ASM_OUTPUT_INT(FILE,VALUE)  \( fprintf (FILE, "\t.long "),			\  output_addr_const (FILE, (VALUE)),		\  fprintf (FILE, "\n"))/* Likewise for `char' and `short' constants.  */#define ASM_OUTPUT_SHORT(FILE,VALUE)  \( fprintf (FILE, "\t.word "),			\  output_addr_const (FILE, (VALUE)),		\  fprintf (FILE, "\n"))#define ASM_OUTPUT_CHAR(FILE,VALUE)  \( fprintf (FILE, "\t.byte "),			\  output_addr_const (FILE, (VALUE)),		\  fprintf (FILE, "\n"))/* This is how to output an assembler line for a numeric constant byte.  */#define ASM_OUTPUT_BYTE(FILE,VALUE)  \  fprintf (FILE, "\t.byte 0x%x\n", (VALUE))/* This is how to output an insn to push a register on the stack.   It need not be very fast code.  */#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)  \  asm_fprintf (FILE, "\tmovel %s,%Rsp@-\n", reg_names[REGNO])/* This is how to output an insn to pop a register from the stack.   It need not be very fast code.  */#define ASM_OUTPUT_REG_POP(FILE,REGNO)  \  asm_fprintf (FILE, "\tmovel %Rsp@+,%s\n", reg_names[REGNO])/* This is how to output an element of a case-vector that is absolute.   (The 68000 does not use such vectors,   but we must define this macro anyway.)  */#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \  asm_fprintf (FILE, "\t.long %LL%d\n", VALUE)/* This is how to output an element of a case-vector that is relative.  */#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL)  \  asm_fprintf (FILE, "\t.word %LL%d-%LL%d\n", VALUE, REL)/* This is how to output an assembler line   that says to advance the location counter   to a multiple of 2**LOG bytes.  *//* We don't have a way to align to more than a two-byte boundary, so do the   best we can and don't complain.  */#define ASM_OUTPUT_ALIGN(FILE,LOG)	\  if ((LOG) >= 1)			\    fprintf (FILE, "\t.even\n");#define ASM_OUTPUT_SKIP(FILE,SIZE)  \  fprintf (FILE, "\t.skip %u\n", (SIZE))/* This says how to output an assembler line   to define a global common symbol.  */#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)  \( fputs (".comm ", (FILE)),			\  assemble_name ((FILE), (NAME)),		\  fprintf ((FILE), ",%u\n", (ROUNDED)))/* This says how to output an assembler line   to define a local common symbol.  */#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  \( fputs (".lcomm ", (FILE)),			\  assemble_name ((FILE), (NAME)),		\  fprintf ((FILE), ",%u\n", (ROUNDED)))/* Store in OUTPUT a string (made with alloca) containing   an assembler-name for a local static variable named NAME.   LABELNO is an integer which is different for each call.  */#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO)	\( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\  sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))/* Define the parentheses used to group arithmetic operations   in assembler code.  */#define ASM_OPEN_PAREN "("#define ASM_CLOSE_PAREN ")"/* Define results of standard character escape sequences.  */#define TARGET_BELL 007#define TARGET_BS 010#define TARGET_TAB 011#define TARGET_NEWLINE 012#define TARGET_VT 013#define TARGET_FF 014#define TARGET_CR 015/* Output a float value (represented as a C double) as an immediate operand.   This macro is a 68k-specific macro.  */#define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE)		\ do {								\      if (CODE == 'f')						\        {							\          char dstr[30];					\          REAL_VALUE_TO_DECIMAL (VALUE, "%.9g", dstr);		\          asm_fprintf ((FILE), "%I0r%s", dstr);			\        }							\      else							\        {							\          long l;						\          REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);		\          if (sizeof (int) == sizeof (long))			\            asm_fprintf ((FILE), "%I0x%x", l);			\          else							\            asm_fprintf ((FILE), "%I0x%lx", l);			\        }							\     } while (0)/* Output a double value (represented as a C double) as an immediate operand.   This macro is a 68k-specific macro.  */#define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE)				\ do { char dstr[30];							\      REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr);			\      asm_fprintf (FILE, "%I0r%s", dstr);				\    } while (0)/* Note, long double immediate operands are not actually   generated by m68k.md.  */#define ASM_OUTPUT_LONG_DOUBLE_OPERAND(FILE,VALUE)			\ do { char dstr[30];							\      REAL_VALUE_TO_DECIMAL (VALUE, "%.20g", dstr);			\      asm_fprintf (FILE, "%I0r%s", dstr);				\    } while (0)/* Print operand X (an rtx) in assembler syntax to file FILE.   CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.   For `%' followed by punctuation, CODE is the punctuation and X is null.   On the 68000, we use several CODE characters:   '.' for dot needed in Motorola-style opcode names.   '-' for an operand pushing on the stack:    

⌨️ 快捷键说明

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