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

📄 h8300.h

📁 GCC编译器源代码
💻 H
📖 第 1 页 / 共 4 页
字号:
#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;					\    }								\}								\								\void								\readonly_data() 						\{								\  if (in_section != in_readonly_data)				\    {								\      fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP);\      in_section = in_readonly_data;				\    }								\}#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)	\  do { ctors_section();				\       fprintf(FILE, "\t%s\t_%s\n", ASM_WORD_OP, NAME); } while (0)#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)	\  do { dtors_section();				\       fprintf(FILE, "\t%s\t_%s\n", ASM_WORD_OP, 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 TINY_DATA_NAME_P(NAME) (*(NAME) == '*')/* If we are referencing a function that is supposed to be called   through the function vector, the SYMBOL_REF_FLAG in the rtl   so the call patterns can generate the correct code.  */#define ENCODE_SECTION_INFO(DECL)  \  if (TREE_CODE (DECL) == FUNCTION_DECL \       && h8300_funcvec_function_p (DECL)) \    SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \  else if ((TREE_STATIC (DECL) || DECL_EXTERNAL (DECL)) \      && TREE_CODE (DECL) == VAR_DECL \      && h8300_eightbit_data_p (DECL)) \    SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \  else if ((TREE_STATIC (DECL) || DECL_EXTERNAL (DECL)) \      && TREE_CODE (DECL) == VAR_DECL \      && h8300_tiny_data_p (DECL)) \    h8300_encode_label (DECL);/* Store the user-specified part of SYMBOL_NAME in VAR.   This is sort of inverse to ENCODE_SECTION_INFO.  */#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \  (VAR) = (SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*' || (SYMBOL_NAME)[0] == '@');/* How to refer to registers in assembler output.   This sequence is indexed by compiler's hard-register-number (see above).  */#define REGISTER_NAMES \{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "sp", "mac", "ap"}#define ADDITIONAL_REGISTER_NAMES { { "r7", 7 } }/* How to renumber registers for dbx and gdb.   H8/300 needs no change in the numeration.  */#define DBX_REGISTER_NUMBER(REGNO) (REGNO)#define SDB_DEBUGGING_INFO#define SDB_DELIM	"\n"/* Support -gstabs.  */#include "dbxcoff.h"/* Override definition in dbxcoff.h.  *//* Generate a blank trailing N_SO to mark the end of the .o file, since   we can't depend upon the linker to mark .o file boundaries with   embedded stabs.  */#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME)			\  fprintf (FILE,							\	   "\t.text\n.stabs \"\",%d,0,0,.Letext\n.Letext:\n", N_SO)/* 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, RELOC) \  fprintf (FILE, "\t.section %s\n", NAME)/* 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)#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) /* This is how to output a command to make the user-level label named NAME   defined for reference from other files.  */#define ASM_GLOBALIZE_LABEL(FILE, NAME)	\  do { fputs ("\t.global ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \   ASM_OUTPUT_LABEL(FILE, NAME)/* 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 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%d", PREFIX, NUM)/* This is how to output an assembler line defining a `double' constant.   It is .dfloat or .gfloat, depending.  */#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)/* 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) \  fprintf (FILE, "\t%s\t%s\n", h8_push_op, h8_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) \  fprintf (FILE, "\t%s\t%s\n", h8_pop_op, h8_reg_names[REGNO])/* This is how to output an element of a case-vector that is absolute.  */#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \  asm_fprintf (FILE, "\t%s .L%d\n", ASM_WORD_OP, VALUE)/* This is how to output an element of a case-vector that is relative.  */#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \  fprintf (FILE, "\t%s .L%d-.L%d\n", ASM_WORD_OP, VALUE, REL)/* 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))/* This is how to output an assembler line   that says to advance the location counter by SIZE bytes.  */#define ASM_OUTPUT_IDENT(FILE, NAME) \  fprintf(FILE, "%s\t \"%s\"\n", IDENT_ASM_OP, NAME)#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 the assembler to define a global   uninitialized but not common symbol.   Try to use asm_output_bss to implement this macro.  */#define ASM_OUTPUT_BSS(FILE, DECL, NAME, SIZE, ROUNDED) \  asm_output_bss ((FILE), (DECL), (NAME), (SIZE), (ROUNDED))/* 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)))/* 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/* Print an instruction operand X on file FILE.   look in h8300.c for details */#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \  ((CODE) == '#')#define PRINT_OPERAND(FILE, X, CODE)  print_operand(FILE,X,CODE)/* Print a memory operand whose address is X, on file FILE.   This uses a function in h8300.c.  */#define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)/* Define this macro if you want to implement any pragmas.  If defined, it   should be a C expression to be executed when #pragma is seen.  The   argument STREAM is the stdio input stream from which the source   text can be read.  CH is the first character after the #pragma.  The   result of the expression is the terminating character found   (newline or EOF).  */#define HANDLE_PRAGMA(FILE, NODE) handle_pragma (FILE, NODE)#define FINAL_PRESCAN_INSN(insn, operand, nop) final_prescan_insn (insn, operand,nop)/* Define this macro if GNU CC should generate calls to the System V   (and ANSI C) library functions `memcpy' and `memset' rather than   the BSD functions `bcopy' and `bzero'.  */#define TARGET_MEM_FUNCTIONS 1#define MULHI3_LIBCALL	"__mulhi3"#define DIVHI3_LIBCALL	"__divhi3"#define UDIVHI3_LIBCALL	"__udivhi3"#define MODHI3_LIBCALL	"__modhi3"#define UMODHI3_LIBCALL	"__umodhi3"/* Perform target dependent optabs initialization.  */#define INIT_TARGET_OPTABS \  do { \    smul_optab->handlers[(int) HImode].libfunc		\      = gen_rtx (SYMBOL_REF, Pmode, MULHI3_LIBCALL);	\    sdiv_optab->handlers[(int) HImode].libfunc		\      = gen_rtx (SYMBOL_REF, Pmode, DIVHI3_LIBCALL);	\    udiv_optab->handlers[(int) HImode].libfunc		\      = gen_rtx (SYMBOL_REF, Pmode, UDIVHI3_LIBCALL);	\    smod_optab->handlers[(int) HImode].libfunc		\      = gen_rtx (SYMBOL_REF, Pmode, MODHI3_LIBCALL);	\    umod_optab->handlers[(int) HImode].libfunc		\      = gen_rtx (SYMBOL_REF, Pmode, UMODHI3_LIBCALL);	\  } while (0)#define MOVE_RATIO 3/* Declarations for functions used in insn-output.c.  */char *emit_a_shift ();int h8300_funcvec_function_p ();char *output_adds_subs ();char * output_simode_bld ();

⌨️ 快捷键说明

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