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

📄 mcore.h

📁 linux下的gcc编译器
💻 H
📖 第 1 页 / 共 4 页
字号:
   to do instead of doing that itself.  */#define SHIFT_COUNT_TRUNCATED 1/* All integers have the same format so truncation is easy.  */#define TRULY_NOOP_TRUNCATION(OUTPREC,INPREC)  1/* 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.  *//* why is this defined??? -- dac */#define NO_FUNCTION_CSE 1/* Chars and shorts should be passed as ints.  */#define PROMOTE_PROTOTYPES 1/* The machine modes of pointers and functions.  */#define Pmode          SImode#define FUNCTION_MODE  Pmode/* The relative costs of various types of constants.  Note that cse.c defines   REG = 1, SUBREG = 2, any node = (2 + sum of subnodes).  */#define CONST_COSTS(RTX, CODE, OUTER_CODE)      \  case CONST_INT:				\    return mcore_const_costs (RTX, OUTER_CODE); \  case CONST: 					\  case LABEL_REF:				\  case SYMBOL_REF:				\    return 5;					\  case CONST_DOUBLE:				\      return 10;/* provide the cost for an address calculation.   All addressing modes cost the same on the MCore.  */#define	ADDRESS_COST(RTX)	1/* Provide the cost of an rtl expression. */#define RTX_COSTS(X, CODE, OUTER_CODE)			\  case AND:                                             \    return COSTS_N_INSNS (mcore_and_cost (X));          \  case IOR:                                             \    return COSTS_N_INSNS (mcore_ior_cost (X));          \  case DIV:						\  case UDIV:						\  case MOD:						\  case UMOD:						\    return COSTS_N_INSNS (100);				\  case FLOAT:						\  case FIX:						\    return 100;/* Compute extra cost of moving data between one register class   and another.  All register moves are cheap.  */#define REGISTER_MOVE_COST(MODE, SRCCLASS, DSTCLASS) 2#define WORD_REGISTER_OPERATIONS/* Implicit library calls should use memcpy, not bcopy, etc.  */#define TARGET_MEM_FUNCTIONS/* Assembler output control.  */#define ASM_COMMENT_START "\t//"#define ASM_APP_ON	"// inline asm begin\n"#define ASM_APP_OFF	"// inline asm end\n"#define FILE_ASM_OP     "\t.file\n"/* Switch to the text or data segment.  */#define TEXT_SECTION_ASM_OP  "\t.text"#define DATA_SECTION_ASM_OP  "\t.data"#undef  EXTRA_SECTIONS#define EXTRA_SECTIONS SUBTARGET_EXTRA_SECTIONS#undef  EXTRA_SECTION_FUNCTIONS#define EXTRA_SECTION_FUNCTIONS			\  SUBTARGET_EXTRA_SECTION_FUNCTIONS		\  SWITCH_SECTION_FUNCTION/* Switch to SECTION (an `enum in_section').   ??? This facility should be provided by GCC proper.   The problem is that we want to temporarily switch sections in   ASM_DECLARE_OBJECT_NAME and then switch back to the original section   afterwards.  */#define SWITCH_SECTION_FUNCTION					\static void switch_to_section PARAMS ((enum in_section, tree));	\static void							\switch_to_section (section, decl)				\     enum in_section section;					\     tree decl;							\{								\  switch (section)						\    {								\      case in_text: text_section (); break;			\      case in_data: data_section (); break;			\      case in_named: named_section (decl, NULL, 0); break;	\      SUBTARGET_SWITCH_SECTIONS      				\      default: abort (); break;					\    }								\}/* Switch into a generic section.  */#undef TARGET_ASM_NAMED_SECTION#define TARGET_ASM_NAMED_SECTION  mcore_asm_named_section/* 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)  \  fprintf (FILE, "\tsubi\t %s,%d\n\tstw\t %s,(%s)\n",	\	   reg_names[STACK_POINTER_REGNUM],		\	   (STACK_BOUNDARY / BITS_PER_UNIT),		\	   reg_names[REGNO],				\	   reg_names[STACK_POINTER_REGNUM])/* Length in instructions of the code output by ASM_OUTPUT_REG_PUSH.  */#define REG_PUSH_LENGTH 2/* This is how to output an insn to pop a register from the stack.  */#define ASM_OUTPUT_REG_POP(FILE,REGNO)  \  fprintf (FILE, "\tldw\t %s,(%s)\n\taddi\t %s,%d\n",	\	   reg_names[REGNO],				\	   reg_names[STACK_POINTER_REGNUM],		\	   reg_names[STACK_POINTER_REGNUM],		\	   (STACK_BOUNDARY / BITS_PER_UNIT))  /* Output a reference to a label.  */#undef  ASM_OUTPUT_LABELREF#define ASM_OUTPUT_LABELREF(STREAM, NAME)  \  fprintf (STREAM, "%s%s", USER_LABEL_PREFIX, \	   (* targetm.strip_name_encoding) (NAME))/* This is how to output an assembler line   that says to advance the location counter   to a multiple of 2**LOG bytes.  */#define ASM_OUTPUT_ALIGN(FILE,LOG)	\  if ((LOG) != 0)			\    fprintf (FILE, "\t.align\t%d\n", LOG)#ifndef ASM_DECLARE_RESULT#define ASM_DECLARE_RESULT(FILE, RESULT)#endif#define MULTIPLE_SYMBOL_SPACES 1#define SUPPORTS_ONE_ONLY 1/* A pair of macros to output things for the callgraph data.   VALUE means (to the tools that reads this info later):  	0 a call from src to dst  	1 the call is special (e.g. dst is "unknown" or "alloca")  	2 the call is special (e.g., the src is a table instead of routine)     Frame sizes are augmented with timestamps to help later tools    differentiate between static entities with same names in different   files.  */extern long mcore_current_compilation_timestamp;#define	ASM_OUTPUT_CG_NODE(FILE,SRCNAME,VALUE)				\  do									\    {									\      if (mcore_current_compilation_timestamp == 0)			\        mcore_current_compilation_timestamp = time (0);			\      fprintf ((FILE),"\t.equ\t__$frame$size$_%s_$_%08lx,%d\n",		\             (SRCNAME), mcore_current_compilation_timestamp, (VALUE));	\    }									\  while (0)#define	ASM_OUTPUT_CG_EDGE(FILE,SRCNAME,DSTNAME,VALUE)		\  do								\    {								\      fprintf ((FILE),"\t.equ\t__$function$call$_%s_$_%s,%d\n",	\             (SRCNAME), (DSTNAME), (VALUE));			\    }								\  while (0)/* Globalizing directive for a label.  */#define GLOBAL_ASM_OP "\t.export\t"/* The prefix to add to user-visible assembler symbols. */#undef  USER_LABEL_PREFIX#define USER_LABEL_PREFIX ""/* Make an internal label into a string.  */#undef  ASM_GENERATE_INTERNAL_LABEL#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM)  \  sprintf (STRING, "*.%s%ld", PREFIX, (long) NUM)/* Output an internal label definition.  */#undef  ASM_OUTPUT_INTERNAL_LABEL#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\  fprintf (FILE, ".%s%d:\n", PREFIX, NUM)/* Construct a private name.  */#define ASM_FORMAT_PRIVATE_NAME(OUTVAR,NAME,NUMBER)  \  ((OUTVAR) = (char *) alloca (strlen (NAME) + 10),  \   sprintf ((OUTVAR), "%s.%d", (NAME), (NUMBER)))/* Jump tables must be 32 bit aligned. */#undef  ASM_OUTPUT_CASE_LABEL#define ASM_OUTPUT_CASE_LABEL(STREAM,PREFIX,NUM,TABLE) \  fprintf (STREAM, "\t.align 2\n.%s%d:\n", PREFIX, NUM);/* Output a relative address. Not needed since jump tables are absolute   but we must define it anyway.  */#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM,BODY,VALUE,REL)  \  fputs ("- - - ASM_OUTPUT_ADDR_DIFF_ELT called!\n", STREAM)/* Output an element of a dispatch table.  */#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE)  \    fprintf (STREAM, "\t.long\t.L%d\n", VALUE)/* Output various types of constants.  *//* This is how to output an assembler line   that says to advance the location counter by SIZE bytes.  */#undef  ASM_OUTPUT_SKIP#define ASM_OUTPUT_SKIP(FILE,SIZE)  \  fprintf (FILE, "\t.fill %d, 1\n", (SIZE))/* This says how to output an assembler line   to define a global common symbol, with alignment information.  *//* XXX - for now we ignore the alignment.  */     #undef  ASM_OUTPUT_ALIGNED_COMMON#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)	\  do								\    {								\      if (mcore_dllexport_name_p (NAME))			\	MCORE_EXPORT_NAME (FILE, NAME)				\      if (! mcore_dllimport_name_p (NAME))			\        {							\          fputs ("\t.comm\t", FILE);				\          assemble_name (FILE, NAME);				\          fprintf (FILE, ",%d\n", SIZE);			\        }							\    }								\  while (0)/* This says how to output an assembler line   to define an external symbol.  */#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME)   \  do						\    {						\      fputs ("\t.import\t", (FILE));		\      assemble_name ((FILE), (NAME));		\      fputs ("\n", (FILE));			\    }						\  while (0)     #undef	ASM_OUTPUT_EXTERNAL/* RBE: we undefined this and let gas do it's "undefined is imported"   games. This is because when we use this, we get a marked    reference through the call to assemble_name and this forces C++   inlined member functions (or any inlined function) to be instantiated   regardless of whether any callsites remain.   This makes this aspect of the compiler non-ABI compliant.  *//* Similar, but for libcall. FUN is an rtx.  */#undef  ASM_OUTPUT_EXTERNAL_LIBCALL#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN)	\  do						\    {						\      fprintf (FILE, "\t.import\t");		\      assemble_name (FILE, XSTR (FUN, 0));	\      fprintf (FILE, "\n");			\    }						\  while (0)/* This says how to output an assembler line   to define a local common symbol...  */#undef  ASM_OUTPUT_LOCAL#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)	\  (fputs ("\t.lcomm\t", FILE),				\  assemble_name (FILE, NAME),				\  fprintf (FILE, ",%d\n", SIZE))/* ... and how to define a local common symbol whose alignment   we wish to specify.  ALIGN comes in as bits, we have to turn   it into bytes.  */#undef  ASM_OUTPUT_ALIGNED_LOCAL#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)		\  do									\    {									\      fputs ("\t.bss\t", (FILE));					\      assemble_name ((FILE), (NAME));					\      fprintf ((FILE), ",%d,%d\n", (SIZE), (ALIGN) / BITS_PER_UNIT);	\    }									\  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.  */#define PRINT_OPERAND(STREAM, X, CODE)  mcore_print_operand (STREAM, X, CODE)/* Print a memory address as an operand to reference that memory location.  */#define PRINT_OPERAND_ADDRESS(STREAM,X)  mcore_print_operand_address (STREAM, X)#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \  ((CHAR)=='.' || (CHAR) == '#' || (CHAR) == '*' || (CHAR) == '^' || (CHAR) == '!')/* This is to handle loads from the constant pool.  */#define MACHINE_DEPENDENT_REORG(X) mcore_dependent_reorg (X)#define PREDICATE_CODES							\  { "mcore_arith_reg_operand",		{ REG, SUBREG }},		\  { "mcore_general_movsrc_operand",	{ MEM, CONST_INT, REG, SUBREG }},\  { "mcore_general_movdst_operand",	{ MEM, CONST_INT, REG, SUBREG }},\  { "mcore_reload_operand",	        { MEM, REG, SUBREG }},		\  { "mcore_arith_J_operand",		{ CONST_INT, REG, SUBREG }},	\  { "mcore_arith_K_operand",		{ CONST_INT, REG, SUBREG }},	\  { "mcore_arith_K_operand_not_0",	{ CONST_INT, REG, SUBREG }},	\  { "mcore_arith_M_operand",		{ CONST_INT, REG, SUBREG }},	\  { "mcore_arith_K_S_operand",		{ CONST_INT, REG, SUBREG }},	\  { "mcore_arith_O_operand",		{ CONST_INT, REG, SUBREG }},	\  { "mcore_arith_imm_operand",		{ CONST_INT, REG, SUBREG }},	\  { "mcore_arith_any_imm_operand",	{ CONST_INT, REG, SUBREG }},	\  { "mcore_literal_K_operand",		{ CONST_INT }},			\  { "mcore_addsub_operand",		{ CONST_INT, REG, SUBREG }},	\  { "mcore_compare_operand",		{ CONST_INT, REG, SUBREG }},	\  { "mcore_load_multiple_operation",	{ PARALLEL }},			\  { "mcore_store_multiple_operation",	{ PARALLEL }},			\  { "mcore_call_address_operand",	{ REG, SUBREG, CONST_INT }},	\#endif /* ! GCC_MCORE_H */

⌨️ 快捷键说明

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