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

📄 m68hc11.h

📁 gcc3.2.1源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
/* Given FROM and TO register numbers, say whether this elimination is allowed.   Frame pointer elimination is automatically handled.   All other eliminations are valid.  */#define CAN_ELIMINATE(FROM, TO)					\ ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM	\  ? ! frame_pointer_needed					\  : 1)/* Define the offset between two registers, one to be eliminated, and the other   its replacement, at the start of a routine.  */#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)			\    { OFFSET = m68hc11_initial_elimination_offset (FROM, TO); }/* Passing Function Arguments on the Stack.  *//* When a prototype says `char' or `short', really pass an `int'.  *//* #define PROMOTE_PROTOTYPES *//* If we generate an insn to push BYTES bytes, this says how many the   stack pointer really advances by. No rounding or alignment needed   for MC6811.  */#define PUSH_ROUNDING(BYTES)	(BYTES)/* Value is 1 if returning from a function call automatically pops the   arguments described by the number-of-args field in the call. FUNTYPE is   the data type of the function (as a tree), or for a library call it is   an identifier node for the subroutine name.     The standard MC6811 call, with arg count word, includes popping the   args as part of the call template.  */#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE)	0/* Nonzero if type TYPE should be returned in memory.   Blocks and data types largers than 4 bytes cannot be returned   in the register (D + X = 4).  */#define RETURN_IN_MEMORY(TYPE)				\    ((TYPE_MODE (TYPE) == BLKmode)			\     ? (int_size_in_bytes (TYPE) > 4)			\     : (GET_MODE_SIZE (TYPE_MODE (TYPE)) > 4))/* Passing Arguments in Registers.  *//* Define a data type for recording info about an argument list   during the scan of that argument list.  This data type should   hold all necessary information about the function itself   and about the args processed so far, enough to enable macros   such as FUNCTION_ARG to determine where the next arg should go.  */typedef struct m68hc11_args{  int words;  int nregs;} CUMULATIVE_ARGS;/* A C expression that indicates when an argument must be passed by reference.   If nonzero for an argument, a copy of that argument is made in memory and a   pointer to the argument is passed instead of the argument itself.   The pointer is passed in whatever way is appropriate for passing a pointer   to that type.    64-bit numbers are passed by reference.  */#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \    m68hc11_function_arg_pass_by_reference (& (CUM), (MODE), (TYPE), (NAMED))/* If defined, a C expression which determines whether, and in which direction,   to pad out an argument with extra space.  The value should be of type   `enum direction': either `upward' to pad above the argument,   `downward' to pad below, or `none' to inhibit padding.   Structures are stored left shifted in their argument slot.  */#define FUNCTION_ARG_PADDING(MODE, TYPE) \  m68hc11_function_arg_padding ((MODE), (TYPE))/* A C expression that indicates when it is the called function's   responsibility to make a copy of arguments passed by invisible   reference.  Normally, the caller makes a copy and passes the   address of the copy to the routine being called.  When   FUNCTION_ARG_CALLEE_COPIES is defined and is nonzero, the caller   does not make a copy.  Instead, it passes a pointer to the "live"   value.  The called function must not modify this value.  If it can   be determined that the value won't be modified, it need not make a   copy; otherwise a copy must be made.  */#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED)		\    ((NAMED) && FUNCTION_ARG_PASS_BY_REFERENCE (CUM, MODE, TYPE, NAMED))/* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a   function whose data type is FNTYPE. For a library call, FNTYPE is 0.  */#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \    (m68hc11_init_cumulative_args (&CUM, FNTYPE, LIBNAME))/* Update the data in CUM to advance over an argument of mode MODE and data   type TYPE. (TYPE is null for libcalls where that information may not be   available.) */#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \    (m68hc11_function_arg_advance (&CUM, MODE, TYPE, NAMED))/* Define where to put the arguments to a function.   Value is zero to push the argument on the stack,   or a hard register in which to store the argument.   MODE is the argument's machine mode.   TYPE is the data type of the argument (as a tree).    This is null for libcalls where that information may    not be available.   CUM is a variable of type CUMULATIVE_ARGS which gives info about    the preceding args and about the function being called.   NAMED is nonzero if this argument is a named parameter    (otherwise it is an extra parameter matching an ellipsis).  */#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \  (m68hc11_function_arg (&CUM, MODE, TYPE, NAMED))/* Define the profitability of saving registers around calls.   Disable this because the saving instructions generated by   caller-save need a reload and the way it is implemented,   it forbids all spill registers at that point.  Enabling   caller saving results in spill failure.  */#define CALLER_SAVE_PROFITABLE(REFS,CALLS) 0/* Implement `va_arg'.  */#define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \  m68hc11_expand_builtin_va_start (stdarg, valist, nextarg)#define EXPAND_BUILTIN_VA_ARG(valist, type) \  m68hc11_va_arg (valist, type)/* For an arg passed partly in registers and partly in memory,   this is the number of registers used.   For args passed entirely in registers or entirely in memory, zero.   Passing an arg partly in register and memory does not work at all.   Don't do that.  */#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) (0)/* 1 if N is a possible register number for function argument passing.   D is for 16-bit values, X is for 32-bit (X+D).  */#define FUNCTION_ARG_REGNO_P(N)	\     (((N) == HARD_D_REGNUM) || ((N) == HARD_X_REGNUM))/* All return values are in the D or X+D registers:    - 8 and 16-bit values are returned in D.      BLKmode are passed in D as pointer.    - 32-bit values are returned in X + D.      The high part is passed in X and the low part in D.      For GCC, the register number must be HARD_X_REGNUM.  */#define FUNCTION_VALUE(VALTYPE, FUNC)					\     gen_rtx (REG, TYPE_MODE (VALTYPE),					\              ((TYPE_MODE (VALTYPE) == BLKmode				\	        || GET_MODE_SIZE (TYPE_MODE (VALTYPE)) <= 2)		\		   ? HARD_D_REGNUM : HARD_X_REGNUM))#define LIBCALL_VALUE(MODE)						\     gen_rtx (REG, MODE,						\              (((MODE) == BLKmode || GET_MODE_SIZE (MODE) <= 2)		\                   ? HARD_D_REGNUM : HARD_X_REGNUM))/* 1 if N is a possible register number for a function value.  */#define FUNCTION_VALUE_REGNO_P(N) \     ((N) == HARD_D_REGNUM || (N) == HARD_X_REGNUM)/* Register in which address to store a structure value is passed to a   function.  */#define STRUCT_VALUE_REGNUM	HARD_D_REGNUM/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,   the stack pointer does not matter.  The value is tested only in functions   that have frame pointers. No definition is equivalent to always zero.  */#define EXIT_IGNORE_STACK	0/* Generating Code for Profiling.  *//* Output assembler code to FILE to increment profiler label # LABELNO   for profiling a function entry.  */#define FUNCTION_PROFILER(FILE, LABELNO)		\    asm_fprintf (FILE, "\tldy\t.LP%d\n\tjsr mcount\n", (LABELNO))/* Length in units of the trampoline for entering a nested function.  */#define TRAMPOLINE_SIZE		(TARGET_M6811 ? 11 : 9)/* A C statement to initialize the variable parts of a trampoline.   ADDR is an RTX for the address of the trampoline; FNADDR is an   RTX for the address of the nested function; STATIC_CHAIN is an   RTX for the static chain value that should be passed to the   function when it is called.  */#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \  m68hc11_initialize_trampoline ((TRAMP), (FNADDR), (CXT))/* Define this macro if references to a symbol must be treated   differently depending on something about the variable or function   named by the symbol (such as what section it is in).   For the 68HC11, we want to recognize trap handlers so that we   handle calls to traps in a special manner (by issuing the trap).   This information is stored in SYMBOL_REF_FLAG.  */#define ENCODE_SECTION_INFO(DECL) m68hc11_encode_section_info (DECL)/* Override what GCC does for section info to let us recognize traps.  */#define REDO_SECTION_INFO_P(DECL) 1/* `INIT_TARGET_OPTABS'     Define this macro as a C statement that declares additional library     routines renames existing ones. `init_optabs' calls this macro     after initializing all the normal library routines.     Overrides the memcpy */#define INIT_TARGET_OPTABS						\do									\  {									\    memcpy_libfunc = gen_rtx_SYMBOL_REF (Pmode, "__memcpy");		\    memcmp_libfunc = gen_rtx_SYMBOL_REF (Pmode, "__memcmp");		\    memset_libfunc = gen_rtx_SYMBOL_REF (Pmode, "__memset");		\  }									\while (0)/* Addressing modes, and classification of registers for them.  *//* The 68HC12 has all the post/pre increment/decrement modes.  */#define HAVE_POST_INCREMENT (TARGET_M6812 && TARGET_AUTO_INC_DEC)#define HAVE_PRE_INCREMENT  (TARGET_M6812 && TARGET_AUTO_INC_DEC)#define HAVE_POST_DECREMENT (TARGET_M6812 && TARGET_AUTO_INC_DEC)#define HAVE_PRE_DECREMENT  (TARGET_M6812 && TARGET_AUTO_INC_DEC)/* The class value for base registers.  This depends on the target:   A_REGS for 68HC11 and A_OR_SP_REGS for 68HC12.  The class value   is stored at init time.  */extern enum reg_class m68hc11_base_reg_class;#define BASE_REG_CLASS		m68hc11_base_reg_class/* The class value for index registers.  This is NO_REGS for 68HC11.  */extern enum reg_class m68hc11_index_reg_class;#define INDEX_REG_CLASS	        m68hc11_index_reg_class/* These assume that REGNO is a hard or pseudo reg number. They give nonzero   only if REGNO is a hard reg of the suitable class or a pseudo reg currently   allocated to a suitable hard reg.  Since they use reg_renumber, they are   safe only once reg_renumber has been allocated, which happens in   local-alloc.c.  *//* Internal macro, return 1 if REGNO is a valid base register.  */#define REG_VALID_P(REGNO) (1)	/* ? */extern unsigned char m68hc11_reg_valid_for_base[FIRST_PSEUDO_REGISTER];#define REG_VALID_FOR_BASE_P(REGNO) \    (REG_VALID_P (REGNO) && (REGNO) < FIRST_PSEUDO_REGISTER \     && m68hc11_reg_valid_for_base[REGNO])/* Internal macro, return 1 if REGNO is a valid index register.  */extern unsigned char m68hc11_reg_valid_for_index[FIRST_PSEUDO_REGISTER];#define REG_VALID_FOR_INDEX_P(REGNO) \    (REG_VALID_P (REGNO) >= 0 && (REGNO) < FIRST_PSEUDO_REGISTER \     && m68hc11_reg_valid_for_index[REGNO])/* Internal macro, the nonstrict definition for REGNO_OK_FOR_BASE_P.  */#define REGNO_OK_FOR_BASE_NONSTRICT_P(REGNO) \    ((REGNO) >= FIRST_PSEUDO_REGISTER \     || REG_VALID_FOR_BASE_P (REGNO) \     || (REGNO) == FRAME_POINTER_REGNUM \     || (REGNO) == HARD_FRAME_POINTER_REGNUM \     || (REGNO) == ARG_POINTER_REGNUM \     || (reg_renumber && REG_VALID_FOR_BASE_P (reg_renumber[REGNO])))/* Internal macro, the nonstrict definition for REGNO_OK_FOR_INDEX_P.  */#define REGNO_OK_FOR_INDEX_NONSTRICT_P(REGNO) \    (TARGET_M6812 \     && ((REGNO) >= FIRST_PSEUDO_REGISTER \         || REG_VALID_FOR_INDEX_P (REGNO) \         || (reg_renumber && REG_VALID_FOR_INDEX_P (reg_renumber[REGNO]))))/* Internal macro, the strict definition for REGNO_OK_FOR_BASE_P.  */#define REGNO_OK_FOR_BASE_STRICT_P(REGNO) \    ((REGNO) < FIRST_PSEUDO_REGISTER ? REG_VALID_FOR_BASE_P (REGNO) \     : (reg_renumber && REG_VALID_FOR_BASE_P (reg_renumber[REGNO])))/* Internal macro, the strict definition for REGNO_OK_FOR_INDEX_P.  */#define REGNO_OK_FOR_INDEX_STRICT_P(REGNO) \    (TARGET_M6812 \     && ((REGNO) < FIRST_PSEUDO_REGISTER ? REG_VALID_FOR_INDEX_P (REGNO) \         : (reg_renumber && REG_VALID_FOR_INDEX_P (reg_renumber[REGNO]))))#define REGNO_OK_FOR_BASE_P2(REGNO,STRICT) \    ((STRICT) ? (REGNO_OK_FOR_BASE_STRICT_P (REGNO)) \              : (REGNO_OK_FOR_BASE_NONSTRICT_P (REGNO)))#define REGNO_OK_FOR_INDEX_P2(REGNO,STRICT) \    ((STRICT) ? (REGNO_OK_FOR_INDEX_STRICT_P (REGNO)) \              : (REGNO_OK_FOR_INDEX_NONSTRICT_P (REGNO)))#define REGNO_OK_FOR_BASE_P(REGNO) REGNO_OK_FOR_BASE_STRICT_P (REGNO)#define REGNO_OK_FOR_INDEX_P(REGNO) REGNO_OK_FOR_INDEX_STRICT_P (REGNO)#define REG_OK_FOR_BASE_STRICT_P(X)     REGNO_OK_FOR_BASE_STRICT_P (REGNO (X))#define REG_OK_FOR_BASE_NONSTRICT_P(X)  REGNO_OK_FOR_BASE_NONSTRICT_P (REGNO (X))#define REG_OK_FOR_INDEX_STRICT_P(X)    REGNO_OK_FOR_INDEX_STRICT_P (REGNO (X))#define REG_OK_FOR_INDEX_NONSTRICT_P(X) REGNO_OK_FOR_INDEX_NONSTRICT_P (REGNO (X))/* see PUSH_POP_ADDRESS_P() below for an explanation of this.  */#define IS_STACK_PUSH(operand) \    ((GET_CODE (operand) == MEM) \     && (GET_CODE (XEXP (operand, 0)) == PRE_DEC) \     && (SP_REG_P (XEXP (XEXP (operand, 0), 0))))#define IS_STACK_POP(operand) \    ((GET_CODE (operand) == MEM) \     && (GET_CODE (XEXP (operand, 0)) == POST_INC) \     && (SP_REG_P (XEXP (XEXP (operand, 0), 0))))/* 1 if X is an rtx for a constant that is a valid address.  */#define CONSTANT_ADDRESS_P(X)	(CONSTANT_P (X))

⌨️ 快捷键说明

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