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

📄 sh.h

📁 GUN开源阻止下的编译器GCC
💻 H
📖 第 1 页 / 共 4 页
字号:
   from it.  */#define REGISTER_MOVE_COST(SRCCLASS, DSTCLASS) \	(((DSTCLASS == T_REGS) || (DSTCLASS == PR_REG)) ? 10 : 1)/* ??? Perhaps make MEMORY_MOVE_COST depend on compiler option?  This   would be so that people would slow memory systems could generate   different code that does fewer memory accesses.  *//* Assembler output control.  *//* The text to go at the start of the assembler file.  */#define ASM_FILE_START(STREAM) 						\  output_file_start (STREAM, f_options,					\		     sizeof f_options / sizeof f_options[0],		\		     W_options, sizeof W_options / sizeof W_options[0]);#define ASM_FILE_END(STREAM)#define ASM_APP_ON  		""#define ASM_APP_OFF  		""#define FILE_ASM_OP 		"\t.file\n"#define IDENT_ASM_OP 		"\t.ident\n"/* How to change between sections.  */#define TEXT_SECTION_ASM_OP  		"\t.text"#define DATA_SECTION_ASM_OP  		"\t.data"#define CTORS_SECTION_ASM_OP 		"\t.section\t.ctors\n"#define DTORS_SECTION_ASM_OP 		"\t.section\t.dtors\n"#define EXTRA_SECTIONS 			in_ctors, in_dtors#define EXTRA_SECTION_FUNCTIONS					\void								\ctors_section()							\{								\  if (in_section != in_ctors)					\    {								\      fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP);	\      in_section = in_ctors;					\    }								\}								\void								\dtors_section()							\{								\  if (in_section != in_dtors)					\    {								\      fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP);	\      in_section = in_dtors;					\    }								\}/* A C statement to output something to the assembler file to switch to section   NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or   NULL_TREE.  Some target formats do not support arbitrary sections.  Do not   define this macro in such cases.  */#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME) \   do { fprintf (FILE, ".section\t%s\n", NAME); } while (0)#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \   do { ctors_section();  fprintf(FILE,"\t.long\t_%s\n", NAME); } while (0)#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \   do {  dtors_section();  fprintf(FILE,"\t.long\t_%s\n", NAME); } while (0)#undef DO_GLOBAL_CTORS_BODY#define DO_GLOBAL_CTORS_BODY			\{						\  typedef (*pfunc)();				\  extern pfunc __ctors[];			\  extern pfunc __ctors_end[];			\  pfunc *p;					\  for (p = __ctors_end; p > __ctors; )		\    {						\      (*--p)();					\    }						\}#undef DO_GLOBAL_DTORS_BODY#define DO_GLOBAL_DTORS_BODY			\{						\  typedef (*pfunc)();				\  extern pfunc __dtors[];			\  extern pfunc __dtors_end[];			\  pfunc *p;					\  for (p = __dtors; p < __dtors_end; p++)	\    {						\      (*p)();					\    }						\}#define ASM_OUTPUT_REG_PUSH(file, v) \  fprintf (file, "\tmov.l	r%s,-@r15\n", v);#define ASM_OUTPUT_REG_POP(file, v) \  fprintf (file, "\tmov.l	@r15+,r%s\n", v);/* The assembler's names for the registers.  RFP need not always be used as   the Real framepointer; it can also be used as a normal general register.   Note that the name `fp' is horribly misleading since `fp' is in fact only   the argument-and-return-context pointer.  */#define REGISTER_NAMES  				\{				                   	\  "r0", "r1", "r2",  "r3",  "r4",  "r5",  "r6",  "r7", 	\  "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",	\  "ap", "pr", "t",  "gbr", "mach","macl" 		\}/* DBX register number for a given compiler register number.  */#define DBX_REGISTER_NUMBER(REGNO)  (REGNO)/* Output a label definition.  */#define ASM_OUTPUT_LABEL(FILE,NAME) \  do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)/* 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 %d\n", LOG)/* Output a function label definition.  */#define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \    ASM_OUTPUT_LABEL(STREAM, NAME)/* Output a globalising directive for a label.  */#define ASM_GLOBALIZE_LABEL(STREAM,NAME)	\  (fprintf (STREAM, "\t.global\t"),		\   assemble_name (STREAM, NAME),		\   fputc ('\n',STREAM))/* Output a reference to a label.  */#define ASM_OUTPUT_LABELREF(STREAM,NAME) \  fprintf (STREAM, "_%s", NAME)/* Make an internal label into a string.  */#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \  sprintf (STRING, "*%s%d", PREFIX, NUM)/* Output an internal label definition.  */#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \  fprintf (FILE, "%s%d:\n", PREFIX, NUM)/* #define ASM_OUTPUT_CASE_END(STREAM,NUM,TABLE)	    *//* 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, no matter the size of the element.  */#define ASM_OUTPUT_CASE_LABEL(STREAM,PREFIX,NUM,TABLE) \  fprintf (STREAM, "\t.align 2\n%s%d:\n",  PREFIX, NUM);/* Output a relative address table.  */#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM,VALUE,REL)  			\  if (TARGET_BIGTABLE) 							\    fprintf (STREAM, "\t.long	L%d-L%d\n", VALUE,REL); 		\  else									\    fprintf (STREAM, "\t.word	L%d-L%d\n", VALUE,REL); 		\/* Output an absolute table element.  */#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE)  				\  if (TARGET_BIGTABLE) 							\    fprintf (STREAM, "\t.long	L%d\n", VALUE); 			\  else									\    fprintf (STREAM, "\t.word	L%d\n", VALUE); 			\/* Output various types of constants.  *//* This is how to output an assembler line defining a `double'.  */#define ASM_OUTPUT_DOUBLE(FILE,VALUE)			\do { char dstr[30];					\     REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr);	\     fprintf (FILE, "\t.double %s\n", dstr);		\   } while (0)/* This is how to output an assembler line defining a `float' constant.  */#define ASM_OUTPUT_FLOAT(FILE,VALUE)			\do { char dstr[30];					\     REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr);	\     fprintf (FILE, "\t.float %s\n", dstr);		\   } while (0)#define ASM_OUTPUT_INT(STREAM, EXP)  	\  (fprintf (STREAM, "\t.long\t"),      	\   output_addr_const (STREAM, (EXP)),  	\   fputc ('\n', STREAM))#define ASM_OUTPUT_SHORT(STREAM, EXP)	\  (fprintf (STREAM, "\t.short\t"),	\   output_addr_const (STREAM, (EXP)),	\   fputc ('\n', STREAM))#define ASM_OUTPUT_CHAR(STREAM, EXP)  	\  (fprintf (STREAM, "\t.byte\t"),      	\   output_addr_const (STREAM, (EXP)),  	\   fputc ('\n', STREAM))#define ASM_OUTPUT_BYTE(STREAM, VALUE)  	\  fprintf (STREAM, "\t.byte\t%d\n", VALUE)  	\/* This is how to output an assembler line   that says to advance the location counter by SIZE bytes.  */#define ASM_OUTPUT_SKIP(FILE,SIZE) \  fprintf (FILE, "\t.space %d\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 ("\t.comm ", (FILE)),			\  assemble_name ((FILE), (NAME)),		\  fprintf ((FILE), ",%d\n", (SIZE)))/* This says how to output an assembler line   to define a local common symbol.  */#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE,ROUNDED)	\( fputs ("\t.lcomm ", (FILE)),				\  assemble_name ((FILE), (NAME)),			\  fprintf ((FILE), ",%d\n", (SIZE)))/* The assembler's parentheses characters.  */#define ASM_OPEN_PAREN "("#define ASM_CLOSE_PAREN ")"/* Target characters.  */#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/* Only perform branch elimination (by making instructions conditional) if   we're optimizing.  Otherwise it's of no use anyway.  */#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \  final_prescan_insn (INSN, OPVEC, NOPERANDS)/* 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)  print_operand (STREAM, X, CODE)/* Print a memory address as an operand to reference that memory location.  */#define PRINT_OPERAND_ADDRESS(STREAM,X)  print_operand_address (STREAM, X)#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \  ((CHAR)=='.' || (CHAR) == '#' || (CHAR)=='@')extern struct rtx_def *sh_compare_op0;extern struct rtx_def *sh_compare_op1;extern struct rtx_def *prepare_scc_operands();/* Which processor to schedule for.  The elements of the enumeration must   match exactly the cpu attribute in the sh.md file.  */enum processor_type {  PROCESSOR_SH0,  PROCESSOR_SH1,  PROCESSOR_SH2,  PROCESSOR_SH3};#define sh_cpu_attr ((enum attr_cpu)sh_cpu)extern enum processor_type sh_cpu;/* Declare functions defined in sh.c and used in templates.  */extern char *output_branch();extern char *output_shift();extern char *output_movedouble();extern char *output_movepcrel();extern char *output_jump_label_table();extern char *output_far_jump();#define MACHINE_DEPENDENT_REORG(X) machine_dependent_reorg(X)/* Generate calls to memcpy, memcmp and memset.  */#define TARGET_MEM_FUNCTIONS#define HANDLE_PRAGMA(finput) return handle_pragma (finput)/* Set when processing a function with pragma interrupt turned on.  */extern int pragma_interrupt;#define MOVE_RATIO (TARGET_SMALLCODE ? 2 : 16)/* Instructions with unfilled delay slots take up an extra two bytes for   the nop in the delay slot.  */#define ADJUST_INSN_LENGTH(X, LENGTH)				\  if (((GET_CODE (X) == INSN					\	&& GET_CODE (PATTERN (X)) != SEQUENCE			\	&& GET_CODE (PATTERN (X)) != USE			\	&& GET_CODE (PATTERN (X)) != CLOBBER)			\       || GET_CODE (X) == CALL_INSN				\       || (GET_CODE (X) == JUMP_INSN				\	   && GET_CODE (PATTERN (X)) != ADDR_DIFF_VEC		\	   && GET_CODE (PATTERN (X)) != ADDR_VEC))		\      && get_attr_needs_delay_slot (X) == NEEDS_DELAY_SLOT_YES)	\   LENGTH += 2;/* Enable a bug fix for the shorten_branches pass.  */#define SHORTEN_WITH_ADJUST_INSN_LENGTH/* Define the codes that are matched by predicates in sh.c.  */#define PREDICATE_CODES \  {"arith_reg_operand", {SUBREG, REG}},					\  {"arith_operand", {SUBREG, REG, CONST_INT}},				\  {"arith_reg_or_0_operand", {SUBREG, REG, CONST_INT}},			\  {"logical_operand", {SUBREG, REG, CONST_INT}},			\  {"general_movsrc_operand", {SUBREG, REG, CONST_INT, MEM}},		\  {"general_movdst_operand", {SUBREG, REG, CONST_INT, MEM}},/* Define this macro if it is advisable to hold scalars in registers   in a wider mode than that declared by the program.  In such cases,    the value is constrained to be within the bounds of the declared   type, but kept valid in the wider mode.  The signedness of the   extension may differ from that of the type.   Leaving the unsignedp unchanged gives better code than always setting it   to 0.  This is despite the fact that we have only signed char and short   load instructions.  */#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \  if (GET_MODE_CLASS (MODE) == MODE_INT			\      && GET_MODE_SIZE (MODE) < UNITS_PER_WORD)		\    MODE = SImode;/* Defining PROMOTE_FUNCTION_ARGS eliminates some unnecessary zero/sign   extensions applied to char/short functions arguments.  Defining   PROMOTE_FUNCTION_RETURN does the same for function returns.  */#define PROMOTE_FUNCTION_ARGS#define PROMOTE_FUNCTION_RETURN/* ??? Define ACCUMULATE_OUTGOING_ARGS?  This is more efficient than pushing   and poping arguments.  However, we do have push/pop instructions, and   rather limited offsets (4 bits) in load/store instructions, so it isn't   clear if this would give better code.  If implemented, should check for   compatibility problems.  *//* ??? Define ADJUST_COSTS?  *//* For the sake of libgcc2.c, indicate target supports atexit.  */#define HAVE_ATEXIT

⌨️ 快捷键说明

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