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

📄 m68hc11.h

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
  if (m68hc11_go_if_legitimate_address ((X), (MODE), 0)) goto ADDR; \}#else#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)		 \{							 \  if (m68hc11_go_if_legitimate_address ((X), (MODE), 1)) goto ADDR; \}#endif/* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its   validity for a certain class.  We have two alternate definitions for each   of them.  The usual definition accepts all pseudo regs; the other rejects   them unless they have been allocated suitable hard regs.  The symbol   REG_OK_STRICT causes the latter definition to be used.     Most source files want to accept pseudo regs in the hope that they will   get allocated to the class that the insn wants them to be in. Source files   for reload pass need to be strict. After reload, it makes no difference,   since pseudo regs have been eliminated by then.  */#ifndef REG_OK_STRICT/* Nonzero if X is a hard reg that can be used as a base reg.  */#define REG_OK_FOR_BASE_P(X)   REG_OK_FOR_BASE_NONSTRICT_P(X)/* Nonzero if X is a hard reg that can be used as an index.  */#define REG_OK_FOR_INDEX_P(X)  REG_OK_FOR_INDEX_NONSTRICT_P(X)#else#define REG_OK_FOR_BASE_P(X)   REG_OK_FOR_BASE_STRICT_P(X)#define REG_OK_FOR_INDEX_P(X)  REG_OK_FOR_INDEX_STRICT_P(X)#endif/* Try machine-dependent ways of modifying an illegitimate address   to be legitimate.  If we find one, return the new, valid address.   This macro is used in only one place: `memory_address' in explow.c.     OLDX is the address as it was before break_out_memory_refs was called.   In some cases it is useful to look at this to decide what needs to be done.     MODE and WIN are passed so that this macro can use   GO_IF_LEGITIMATE_ADDRESS.     It is always safe for this macro to do nothing.   It exists to recognize opportunities to optimize the output.  */#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)                     \{ rtx operand = (X);                                            \  if (m68hc11_legitimize_address (&operand, (OLDX), (MODE)))	\    {                                                           \      (X) = operand;                                            \      GO_IF_LEGITIMATE_ADDRESS (MODE,X,WIN);                    \    }                                                           \}/* Go to LABEL if ADDR (a legitimate address expression)   has an effect that depends on the machine mode it is used for.  */#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)  \{									\  if (GET_CODE (ADDR) == PRE_DEC || GET_CODE (ADDR) == POST_DEC		\      || GET_CODE (ADDR) == PRE_INC || GET_CODE (ADDR) == POST_INC)	\    goto LABEL;								\}/* Nonzero if the constant value X is a legitimate general operand.   It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */#define LEGITIMATE_CONSTANT_P(X)	1/* Tell final.c how to eliminate redundant test instructions.  */#define NOTICE_UPDATE_CC(EXP, INSN) \	m68hc11_notice_update_cc ((EXP), (INSN))/* Move costs between classes of registers */#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)	\    (m68hc11_register_move_cost (MODE, CLASS1, CLASS2))/* Move cost between register and memory.    - Move to a 16-bit register is reasonable,    - Move to a soft register can be expensive.  */#define MEMORY_MOVE_COST(MODE,CLASS,IN)		\    m68hc11_memory_move_cost ((MODE),(CLASS),(IN))/* A C expression for the cost of a branch instruction.  A value of 1   is the default; other values are interpreted relative to that.   Pretend branches are cheap because GCC generates sub-optimal code   for the default value.  */#define BRANCH_COST 0/* Nonzero if access to memory by bytes is slow and undesirable.  */#define SLOW_BYTE_ACCESS	0/* It is as good to call a constant function address as to call an address   kept in a register.  */#define NO_FUNCTION_CSE/* Try a machine-dependent way of reloading an illegitimate address   operand.  If we find one, push the reload and jump to WIN.  This   macro is used in only one place: `find_reloads_address' in reload.c.   For M68HC11, we handle large displacements of a base register   by splitting the addend across an addhi3 insn.   For M68HC12, the 64K offset range is available.   */#define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_LEVELS,WIN)     \do {                                                                    \  /* We must recognize output that we have already generated ourselves.  */ \  if (GET_CODE (X) == PLUS						\      && GET_CODE (XEXP (X, 0)) == PLUS					\      && GET_CODE (XEXP (XEXP (X, 0), 0)) == REG			\      && GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT			\      && GET_CODE (XEXP (X, 1)) == CONST_INT)				\    {									\      push_reload (XEXP (X, 0), NULL_RTX, &XEXP (X, 0), NULL,           \                   BASE_REG_CLASS, GET_MODE (X), VOIDmode, 0, 0,        \                   OPNUM, TYPE);                                        \      goto WIN;                                                         \    }									\  if (GET_CODE (X) == PLUS                                              \      && GET_CODE (XEXP (X, 0)) == REG                                  \      && GET_CODE (XEXP (X, 1)) == CONST_INT				\      && !VALID_CONSTANT_OFFSET_P (XEXP (X, 1), MODE))                  \    {                                                                   \      HOST_WIDE_INT val = INTVAL (XEXP (X, 1));                         \      HOST_WIDE_INT low, high;                                          \      high = val & (~0x0FF);                                            \      low  = val & 0x00FF;                                              \      if (low >= 256-15) { high += 16; low -= 16; }                     \      /* Reload the high part into a base reg; leave the low part       \         in the mem directly.  */                                       \                                                                        \      X = gen_rtx_PLUS (Pmode,						\                        gen_rtx_PLUS (Pmode, XEXP (X, 0),		\                                      GEN_INT (high)),                  \                        GEN_INT (low));                                 \                                                                        \      push_reload (XEXP (X, 0), NULL_RTX, &XEXP (X, 0), NULL,           \                   BASE_REG_CLASS, GET_MODE (X), VOIDmode, 0, 0,        \                   OPNUM, TYPE);                                        \      goto WIN;                                                         \    }                                                                   \} while (0)/* Defining the Output Assembler Language.  *//* A default list of other sections which we might be "in" at any given   time.  For targets that use additional sections (e.g. .tdesc) you   should override this definition in the target-specific file which   includes this file.  *//* Output before read-only data.  */#define TEXT_SECTION_ASM_OP	("\t.sect\t.text")/* Output before writable data.  */#define DATA_SECTION_ASM_OP	("\t.sect\t.data")/* Output before uninitialized data.  */#define BSS_SECTION_ASM_OP 	("\t.sect\t.bss")/* Define the pseudo-ops used to switch to the .ctors and .dtors sections.   Same as config/elfos.h but don't mark these section SHF_WRITE since   there is no shared library problem.  */#undef CTORS_SECTION_ASM_OP#define CTORS_SECTION_ASM_OP	"\t.section\t.ctors,\"a\""#undef DTORS_SECTION_ASM_OP#define DTORS_SECTION_ASM_OP	"\t.section\t.dtors,\"a\""#define TARGET_ASM_CONSTRUCTOR  m68hc11_asm_out_constructor#define TARGET_ASM_DESTRUCTOR   m68hc11_asm_out_destructor/* Comment character */#define ASM_COMMENT_START	";"/* Output to assembler file text saying following lines   may contain character constants, extra white space, comments, etc.  */#define ASM_APP_ON 		"; Begin inline assembler code\n#APP\n"/* Output to assembler file text saying following lines   no longer contain unusual constructs.  */#define ASM_APP_OFF 		"; End of inline assembler code\n#NO_APP\n"/* Write the extra assembler code needed to declare a function properly.   Some svr4 assemblers need to also have something extra said about the   function's return value.  We allow for that here.   For 68HC12 we mark functions that return with 'rtc'.  The linker   will ensure that a 'call' is really made (instead of 'jsr').   The debugger needs this information to correctly compute the stack frame.   For 68HC11/68HC12 we also mark interrupt handlers for gdb to   compute the correct stack frame.  */#undef ASM_DECLARE_FUNCTION_NAME#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)	\  do							\    {							\      fprintf (FILE, "%s", TYPE_ASM_OP);		\      assemble_name (FILE, NAME);			\      putc (',', FILE);					\      fprintf (FILE, TYPE_OPERAND_FMT, "function");	\      putc ('\n', FILE);				\      							\      if (current_function_far)                         \        {						\          fprintf (FILE, "\t.far\t");			\	  assemble_name (FILE, NAME);			\	  putc ('\n', FILE);				\	}						\      else if (current_function_interrupt		\	       || current_function_trap)		\        {						\	  fprintf (FILE, "\t.interrupt\t");		\	  assemble_name (FILE, NAME);			\	  putc ('\n', FILE);				\	}						\      ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL));	\      ASM_OUTPUT_LABEL(FILE, NAME);			\    }							\  while (0)/* Output #ident as a .ident.  *//* output external reference */#define ASM_OUTPUT_EXTERNAL(FILE,DECL,NAME) \  {fputs ("\t; extern\t", FILE); \  assemble_name (FILE, NAME); \  fputs ("\n", FILE);}/* How to refer to registers in assembler output.  This sequence is indexed   by compiler's hard-register-number (see above).  */#define REGISTER_NAMES						\{ "x", "d", "y", "sp", "pc", "a", "b", "ccr", "z",		\  "*_.frame", "*_.tmp", "*_.z", "*_.xy", "*fake clobber",	\  SOFT_REG_NAMES, "*sframe", "*ap"}/* Print an instruction operand X on file FILE. CODE is the code from the   %-spec for printing this operand. If `%z3' was used to print operand   3, then CODE is 'z'.  */#define PRINT_OPERAND(FILE, X, CODE) \  print_operand (FILE, X, CODE)/* Print a memory operand whose address is X, on file FILE.  */#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \  print_operand_address (FILE, ADDR)/* This is how to output an insn to push/pop a register on the stack.   It need not be very fast code.     Don't define because we don't know how to handle that with   the STATIC_CHAIN_REGNUM (soft register).  Saving the static   chain must be made inside FUNCTION_PROFILER.  */#undef ASM_OUTPUT_REG_PUSH#undef ASM_OUTPUT_REG_POP/* 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, "\t%s\tL%d-L%d\n", integer_asm_op (2, TRUE), VALUE, REL)/* This is how to output an element of a case-vector that is absolute.  */#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \  fprintf (FILE, "\t%s\t.L%d\n", integer_asm_op (2, TRUE), VALUE)/* 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)			\  do {                                                  \      if ((LOG) > 1)                                    \          fprintf ((FILE), "%s\n", ALIGN_ASM_OP); \  } while (0)/* Assembler Commands for Exception Regions.  *//* Default values provided by GCC should be ok. Assuming that DWARF-2   frame unwind info is ok for this platform.  */#undef PREFERRED_DEBUGGING_TYPE#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG/* For the support of memory banks we need addresses that indicate   the page number.  */#define DWARF2_ADDR_SIZE 4/* SCz 2003-07-08: Don't use as dwarf2 .file/.loc directives because   the linker is doing relaxation and it does not adjust the debug_line   sections when it shrinks the code.  This results in invalid addresses   when debugging.  This does not bless too much the HC11/HC12 as most   applications are embedded and small, hence a reasonable debug info.   This problem is known for binutils 2.13, 2.14 and mainline.  */#undef HAVE_AS_DWARF2_DEBUG_LINE/* 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 for immediate operands.  */#define IMMEDIATE_PREFIX "#"#define GLOBAL_ASM_OP   "\t.globl\t"/* Miscellaneous Parameters.  *//* Define the codes that are matched by predicates in m68hc11.c.  */#define PREDICATE_CODES \{"stack_register_operand",   {SUBREG, REG}},				\{"d_registe

⌨️ 快捷键说明

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