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

📄 h8300.h

📁 gcc3.2.1源代码
💻 H
📖 第 1 页 / 共 4 页
字号:
   (see `conditions.h').  No extra ones are needed for the h8300.  *//* 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.  */#define NOTICE_UPDATE_CC(EXP, INSN) notice_update_cc (EXP, INSN)/* The add insns don't set overflow in a usable way.  */#define CC_OVERFLOW_UNUSABLE 01000/* The mov,and,or,xor insns don't set carry.  That's OK though as the   Z bit is all we need when doing unsigned comparisons on the result of   these insns (since they're always with 0).  However, conditions.h has   CC_NO_OVERFLOW defined for this purpose.  Rename it to something more   understandable.  */#define CC_NO_CARRY CC_NO_OVERFLOW/* Control the assembler format that we output.  *//* Output at beginning/end of assembler file.  */#define ASM_FILE_START(FILE) asm_file_start (FILE)#define ASM_FILE_END(FILE) asm_file_end (FILE)/* 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"#define FILE_ASM_OP "\t.file\n"#define IDENT_ASM_OP "\t.ident\n"/* The assembler op to get a word, 2 bytes for the H8/300, 4 for H8/300H.  */#define ASM_WORD_OP	(TARGET_H8300 ? "\t.word\t" : "\t.long\t")/* We define a readonly data section solely to remove readonly data   from the instruction stream.  This can improve relaxing in two significant   ways.  First it's more likely that references to readonly data   can be done with a 16bit absolute address since they'll be in low   memory.  Second, it's more likely that jsr instructions can be   turned into bsr instructions since read-only data is not in the   instruction stream.  */#define READONLY_DATA_SECTION readonly_data#define TEXT_SECTION_ASM_OP "\t.section .text"#define DATA_SECTION_ASM_OP "\t.section .data"#define BSS_SECTION_ASM_OP "\t.section .bss"#define INIT_SECTION_ASM_OP "\t.section .init"#define READONLY_DATA_SECTION_ASM_OP "\t.section .rodata"#define EXTRA_SECTIONS in_readonly_data#define EXTRA_SECTION_FUNCTIONS						\extern void readonly_data PARAMS ((void));				\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;					\    }									\}#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_CODE (DECL) == VAR_DECL				\	   && (TREE_STATIC (DECL) || DECL_EXTERNAL (DECL))	\	   && h8300_eightbit_data_p (DECL))			\    SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;		\  else if (TREE_CODE (DECL) == VAR_DECL				\	   && (TREE_STATIC (DECL) || DECL_EXTERNAL (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] == '@'	\			   || (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", "rap" }#define ADDITIONAL_REGISTER_NAMES \{ {"er0", 0}, {"er1", 1}, {"er2", 2}, {"er3", 3}, {"er4", 4}, \  {"er5", 5}, {"er6", 6}, {"er7", 7}, {"r7", 7} }#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)/* Switch into a generic section.  */#define TARGET_ASM_NAMED_SECTION h8300_asm_named_section/* 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_LABELREF(FILE, NAME)  \  asm_fprintf ((FILE), "%U%s", (NAME) + (TINY_DATA_NAME_P (NAME) ? 1 : 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.   N.B.: The h8300.md branch_true and branch_false patterns also know   how to generate internal labels.  */#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 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, "%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, BODY, VALUE, REL) \  fprintf (FILE, "%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\"%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)))/* 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)/* H8300 specific pragmas.  */#define REGISTER_TARGET_PRAGMAS(PFILE)					\  do									\    {									\      cpp_register_pragma (PFILE, 0, "saveall", h8300_pr_saveall);	\      cpp_register_pragma (PFILE, 0, "interrupt", h8300_pr_interrupt);	\    }									\  while (0)#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		\	= init_one_libfunc (MULHI3_LIBCALL);			\      sdiv_optab->handlers[(int) HImode].libfunc		\	= init_one_libfunc (DIVHI3_LIBCALL);			\      udiv_optab->handlers[(int) HImode].libfunc		\	= init_one_libfunc (UDIVHI3_LIBCALL);			\      smod_optab->handlers[(int) HImode].libfunc		\	= init_one_libfunc (MODHI3_LIBCALL);			\      umod_optab->handlers[(int) HImode].libfunc		\	= init_one_libfunc (UMODHI3_LIBCALL);			\    }								\  while (0)#define MOVE_RATIO 3#endif /* ! GCC_H8300_H */

⌨️ 快捷键说明

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