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

📄 m68k.h

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 H
📖 第 1 页 / 共 5 页
字号:
#define BASE_REG_CLASS ADDR_REGS/* Get reg_class from a letter such as appears in the machine description.   We do a trick here to modify the effective constraints on the   machine description; we zorch the constraint letters that aren't   appropriate for a specific target.  This allows us to guarantee   that a specific kind of register will not be used for a given target   without fiddling with the register classes above. */#ifndef SUPPORT_SUN_FPA#define REG_CLASS_FROM_LETTER(C) \  ((C) == 'a' ? ADDR_REGS :			\   ((C) == 'd' ? DATA_REGS :			\    ((C) == 'f' ? (TARGET_68881 ? FP_REGS :	\		   NO_REGS) :			\     NO_REGS)))#else /* defined SUPPORT_SUN_FPA */#define REG_CLASS_FROM_LETTER(C) \  ((C) == 'a' ? ADDR_REGS :			\   ((C) == 'd' ? DATA_REGS :			\    ((C) == 'f' ? (TARGET_68881 ? FP_REGS :	\		   NO_REGS) :			\     ((C) == 'x' ? (TARGET_FPA ? FPA_REGS :	\		    NO_REGS) :			\      ((C) == 'y' ? (TARGET_FPA ? LO_FPA_REGS :	\		     NO_REGS) :			\       NO_REGS)))))#endif /* defined SUPPORT_SUN_FPA *//* The letters I, J, K, L and M in a register constraint string   can be used to stand for particular ranges of immediate operands.   This macro defines what the ranges are.   C is the letter, and VALUE is a constant value.   Return 1 if VALUE is in the range specified by C.   For the 68000, `I' is used for the range 1 to 8   allowed as immediate shift counts and in addq.   `J' is used for the range of signed numbers that fit in 16 bits.   `K' is for numbers that moveq can't handle.   `L' is for range -8 to -1, range of values that can be added with subq.   `M' is for numbers that moveq+notb can't handle.   'N' is for range 24 to 31, rotatert:SI 8 to 1 expressed as rotate.   'O' is for 16 (for rotate using swap).   'P' is for range 8 to 15, rotatert:HI 8 to 1 expressed as rotate.  */#define CONST_OK_FOR_LETTER_P(VALUE, C) \  ((C) == 'I' ? (VALUE) > 0 && (VALUE) <= 8 : \   (C) == 'J' ? (VALUE) >= -0x8000 && (VALUE) <= 0x7FFF : \   (C) == 'K' ? (VALUE) < -0x80 || (VALUE) >= 0x80 : \   (C) == 'L' ? (VALUE) < 0 && (VALUE) >= -8 : \   (C) == 'M' ? (VALUE) < -0x100 || (VALUE) >= 0x100 : \   (C) == 'N' ? (VALUE) >= 24 && (VALUE) <= 31 : \   (C) == 'O' ? (VALUE) == 16 : \   (C) == 'P' ? (VALUE) >= 8 && (VALUE) <= 15 : 0)/* * A small bit of explanation: * "G" defines all of the floating constants that are *NOT* 68881 * constants.  this is so 68881 constants get reloaded and the * fpmovecr is used.  "H" defines *only* the class of constants that * the fpa can use, because these can be gotten at in any fpa * instruction and there is no need to force reloads. */#ifndef SUPPORT_SUN_FPA#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)  \  ((C) == 'G' ? ! (TARGET_68881 && standard_68881_constant_p (VALUE)) : 0 )#else /* defined SUPPORT_SUN_FPA */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)  \  ((C) == 'G' ? ! (TARGET_68881 && standard_68881_constant_p (VALUE)) : \   (C) == 'H' ? (TARGET_FPA && standard_sun_fpa_constant_p (VALUE)) : 0)#endif /* defined SUPPORT_SUN_FPA *//* A C expression that defines the optional machine-dependent constraint   letters that can be used to segregate specific types of operands,     usually memory references, for the target machine.  It should return 1 if   VALUE corresponds to the operand type represented by the constraint letter   C.  If C is not defined as an extra constraint, the value returned should    be 0 regardless of VALUE.  *//* For the m68k, `Q' means address register indirect addressing mode. */#define EXTRA_CONSTRAINT(OP, C)	\  ((C) == 'Q' ? (GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == REG) : \   0 )/* Given an rtx X being reloaded into a reg required to be   in class CLASS, return the class of reg to actually use.   In general this is just CLASS; but on some machines   in some cases it is preferable to use a more restrictive class.   On the 68000 series, use a data reg if possible when the   value is a constant in the range where moveq could be used   and we ensure that QImodes are reloaded into data regs.  */#define PREFERRED_RELOAD_CLASS(X,CLASS)					\  ((GET_CODE (X) == CONST_INT						\    && (unsigned) (INTVAL (X) + 0x80) < 0x100				\    && (CLASS) != ADDR_REGS)						\   ? DATA_REGS								\   : (GET_MODE (X) == QImode && (CLASS) != ADDR_REGS)			\   ? DATA_REGS								\   : (GET_CODE (X) == CONST_DOUBLE					\      && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT)			\   ? (TARGET_68881 && (CLASS == FP_REGS || CLASS == DATA_OR_FP_REGS)	\      ? FP_REGS : NO_REGS)						\   : (CLASS))/* Force QImode output reloads from subregs to be allocated to data regs,   since QImode stores from address regs are not supported.  We make the   assumption that if the class is not ADDR_REGS, then it must be a superset   of DATA_REGS.  */#define LIMIT_RELOAD_CLASS(MODE, CLASS) \  (((MODE) == QImode && (CLASS) != ADDR_REGS)	\   ? DATA_REGS					\   : (CLASS))/* Return the maximum number of consecutive registers   needed to represent mode MODE in a register of class CLASS.  *//* On the 68000, this is the size of MODE in words,   except in the FP regs, where a single reg is always enough.  */#ifndef SUPPORT_SUN_FPA#define CLASS_MAX_NREGS(CLASS, MODE)	\ ((CLASS) == FP_REGS ? 1 \  : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))/* Moves between fp regs and other regs are two insns.  */#define REGISTER_MOVE_COST(CLASS1, CLASS2)		\  (((CLASS1) == FP_REGS && (CLASS2) != FP_REGS)	        \    || ((CLASS2) == FP_REGS && (CLASS1) != FP_REGS)	\    ? 4 : 2)#else /* defined SUPPORT_SUN_FPA */#define CLASS_MAX_NREGS(CLASS, MODE)	\ ((CLASS) == FP_REGS || (CLASS) == FPA_REGS || (CLASS) == LO_FPA_REGS ? 1 \  : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))/* Moves between fp regs and other regs are two insns.  *//* Likewise for high fpa regs and other regs.  */#define REGISTER_MOVE_COST(CLASS1, CLASS2)		\  ((((CLASS1) == FP_REGS && (CLASS2) != FP_REGS)	\    || ((CLASS2) == FP_REGS && (CLASS1) != FP_REGS)	\    || ((CLASS1) == FPA_REGS && (CLASS2) != FPA_REGS)	\    || ((CLASS2) == FPA_REGS && (CLASS1) != FPA_REGS))	\   ? 4 : 2)#endif /* define SUPPORT_SUN_FPA *//* Stack layout; function entry, exit and calling.  *//* Define this if pushing a word on the stack   makes the stack pointer a smaller address.  */#define STACK_GROWS_DOWNWARD/* Nonzero if we need to generate stack-probe insns.   On most systems they are not needed.   When they are needed, define this as the stack offset to probe at.  */#define NEED_PROBE 0/* Define this if the nominal address of the stack frame   is at the high-address end of the local variables;   that is, each additional local variable allocated   goes at a more negative offset in the frame.  */#define FRAME_GROWS_DOWNWARD/* Offset within stack frame to start allocating local variables at.   If FRAME_GROWS_DOWNWARD, this is the offset to the END of the   first local allocated.  Otherwise, it is the offset to the BEGINNING   of the first local allocated.  */#define STARTING_FRAME_OFFSET 0/* If we generate an insn to push BYTES bytes,   this says how many the stack pointer really advances by.   On the 68000, sp@- in a byte insn really pushes a word.   On the 5200 (coldfire), sp@- in a byte insn pushes just a byte.  */#define PUSH_ROUNDING(BYTES) (TARGET_5200 ? BYTES : ((BYTES) + 1) & ~1)/* Offset of first parameter from the argument pointer register value.  */#define FIRST_PARM_OFFSET(FNDECL) 8/* Offset of the CFA from the argument pointer register value.  */#define ARG_POINTER_CFA_OFFSET 8/* Value is the number of byte of arguments automatically   popped when returning from a subroutine call.   FUNDECL is the declaration node of the function (as a tree),   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.   SIZE is the number of bytes of arguments passed on the stack.   On the 68000, the RTS insn cannot pop anything.   On the 68010, the RTD insn may be used to pop them if the number     of args is fixed, but if the number is variable then the caller     must pop them all.  RTD can't be used for library calls now     because the library is compiled with the Unix compiler.   Use of RTD is a selectable option, since it is incompatible with   standard Unix calling sequences.  If the option is not selected,   the caller must always pop the args.  */#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE)   \  ((TARGET_RTD && (!(FUNDECL) || TREE_CODE (FUNDECL) != IDENTIFIER_NODE)	\    && (TYPE_ARG_TYPES (FUNTYPE) == 0				\	|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE)))	\	    == void_type_node)))				\   ? (SIZE) : 0)/* Define how to find the value returned by a function.   VALTYPE is the data type of the value (as a tree).   If the precise function being called is known, FUNC is its FUNCTION_DECL;   otherwise, FUNC is 0.  *//* On the 68000 the return value is in D0 regardless.  */#define FUNCTION_VALUE(VALTYPE, FUNC)  \  gen_rtx_REG (TYPE_MODE (VALTYPE), 0)/* Define how to find the value returned by a library function   assuming the value has mode MODE.  *//* On the 68000 the return value is in D0 regardless.  */#define LIBCALL_VALUE(MODE)  gen_rtx_REG (MODE, 0)/* 1 if N is a possible register number for a function value.   On the 68000, d0 is the only register thus used.  */#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)/* Define this to be true when FUNCTION_VALUE_REGNO_P is true for   more than one register.  */#define NEEDS_UNTYPED_CALL 0/* Define this if PCC uses the nonreentrant convention for returning   structure and union values.  */#define PCC_STATIC_STRUCT_RETURN/* 1 if N is a possible register number for function argument passing.   On the 68000, no registers are used in this way.  */#define FUNCTION_ARG_REGNO_P(N) 0/* 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.   On the m68k, this is a single integer, which is a number of bytes   of arguments scanned so far.  */#define CUMULATIVE_ARGS int/* 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.   On the m68k, the offset starts at 0.  */#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT)	\ ((CUM) = 0)/* 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)	\ ((CUM) += ((MODE) != BLKmode			\	    ? (GET_MODE_SIZE (MODE) + 3) & ~3	\	    : (int_size_in_bytes (TYPE) + 3) & ~3))/* 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).  *//* On the 68000 all args are pushed, except if -mregparm is specified   then the first two words of arguments are passed in d0, d1.   *NOTE* -mregparm does not work.   It exists only to test register calling conventions.  */#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \((TARGET_REGPARM && (CUM) < 8) ? gen_rtx_REG ((MODE), (CUM) / 4) : 0)/* 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.  */#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \((TARGET_REGPARM && (CUM) < 8					\  && 8 < ((CUM) + ((MODE) == BLKmode				\		      ? int_size_in_bytes (TYPE)		\		      : GET_MODE_SIZE (MODE))))  		\ ? 2 - (CUM) / 4 : 0)/* Generate the assembly code for function entry. */#define FUNCTION_PROLOGUE(FILE, SIZE) output_function_prologue(FILE, SIZE)/* Output assembler code to FILE to increment profiler label # LABELNO   for profiling a function entry.  */#define FUNCTION_PROFILER(FILE, LABELNO)  \  asm_fprintf (FILE, "\tlea %LLP%d,%Ra0\n\tjsr mcount\n", (LABELNO))/* Output assembler code to FILE to initialize this source file's   basic block profiling info, if that has not already been done.  */#define FUNCTION_BLOCK_PROFILER(FILE, BLOCK_OR_LABEL)	\do							\  {							\    switch (profile_block_flag)				\      {							\      case 2:						\        asm_fprintf (FILE, "\tpea %d\n\tpea %LLPBX0\n\tjsr %U__bb_init_trace_func\n\taddql %I8,%Rsp\n", \                           (BLOCK_OR_LABEL)); \        break;						\							\      default:						\        asm_fprintf (FILE, "\ttstl %LLPBX0\n\tbne %LLPI%d\n\tpea %LLPBX0\n\tjsr %U__bb_init_func\n\taddql %I4,%Rsp\n%LLPI%d:\n", \                           (BLOCK_OR_LABEL), (BLOCK_OR_LABEL)); \        break;						\      }							\  }							\while(0)/* Output assembler code to FILE to increment the counter for   the BLOCKNO'th basic block in this source file.  */

⌨️ 快捷键说明

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