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

📄 h8300.h

📁 linux下编程用 编译软件
💻 H
📖 第 1 页 / 共 3 页
字号:
  (TARGET_H8300H || TARGET_H8300S			\   ? (VALUE) == 1 || (VALUE) == 2 || (VALUE) == 4	\   : (VALUE) == 1 || (VALUE) == 2)#define CONST_OK_FOR_M(VALUE)				\  ((VALUE) == 1 || (VALUE) == 2)#define CONST_OK_FOR_N(VALUE)				\  (TARGET_H8300H || TARGET_H8300S			\   ? (VALUE) == -1 || (VALUE) == -2 || (VALUE) == -4	\   : (VALUE) == -1 || (VALUE) == -2)#define CONST_OK_FOR_O(VALUE)				\  ((VALUE) == -1 || (VALUE) == -2)/* Multi-letter constraints for constant are always started with P   (just because it was the only letter in the range left.  New   constraints for constants should be added here.  */#define CONST_OK_FOR_Ppositive(VALUE, NBITS)		\  ((VALUE) > 0 && (VALUE) < (1 << (NBITS)))#define CONST_OK_FOR_Pnegative(VALUE, NBITS)		\  ((VALUE) < 0 && (VALUE) > -(1 << (NBITS)))#define CONST_OK_FOR_P(VALUE, STR) \  ((STR)[1] >= '1' && (STR)[1] <= '9' && (STR)[2] == '<' 	\   ? (((STR)[3] == '0' || ((STR)[3] == 'X' && TARGET_H8300SX))	\      && CONST_OK_FOR_Pnegative ((VALUE), (STR)[1] - '0'))	\   : ((STR)[1] >= '1' && (STR)[1] <= '9' && (STR)[2] == '>')	\   ? (((STR)[3] == '0' || ((STR)[3] == 'X' && TARGET_H8300SX))	\      && CONST_OK_FOR_Ppositive ((VALUE), (STR)[1] - '0'))	\   : 0)#define CONSTRAINT_LEN_FOR_P(STR) \  ((((STR)[1] >= '1' && (STR)[1] <= '9')			\    && ((STR)[2] == '<' || (STR)[2] == '>')			\    && ((STR)[3] == 'X' || (STR)[3] == '0')) ? 4		\   : 0)#define CONST_OK_FOR_CONSTRAINT_P(VALUE, C, STR)	\  ((C) == 'P' ? CONST_OK_FOR_P ((VALUE), (STR))		\   : CONST_OK_FOR_LETTER_P ((VALUE), (C)))  #define CONST_OK_FOR_LETTER_P(VALUE, C)		\  ((C) == 'I' ? CONST_OK_FOR_I (VALUE) :	\   (C) == 'J' ? CONST_OK_FOR_J (VALUE) :	\   (C) == 'L' ? CONST_OK_FOR_L (VALUE) :	\   (C) == 'M' ? CONST_OK_FOR_M (VALUE) :	\   (C) == 'N' ? CONST_OK_FOR_N (VALUE) :	\   (C) == 'O' ? CONST_OK_FOR_O (VALUE) :	\   0)/* Similar, but for floating constants, and defining letters G and H.   Here VALUE is the CONST_DOUBLE rtx itself.  `G' is a floating-point zero.  */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)	\  ((C) == 'G' ? (VALUE) == CONST0_RTX (SFmode)	\   : 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.  */#define PREFERRED_RELOAD_CLASS(X, CLASS)  (CLASS)/* Return the maximum number of consecutive registers   needed to represent mode MODE in a register of class CLASS.  *//* On the H8, this is the size of MODE in words.  */#define CLASS_MAX_NREGS(CLASS, MODE)	\  ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)/* Any SI register-to-register move may need to be reloaded,   so define REGISTER_MOVE_COST to be > 2 so that reload never   shortcuts.  */#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)  \  (CLASS1 == MAC_REGS || CLASS2 == MAC_REGS ? 6 : 3)/* 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/* Define this to nonzero 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 1/* 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 H8/300, @-sp really pushes a byte if you ask it to - but that's   dangerous, so we claim that it always pushes a word, then we catch   the mov.b rx,@-sp and turn it into a mov.w rx,@-sp on output.   On the H8/300H, we simplify TARGET_QUICKCALL by setting this to 4   and doing a similar thing.  */#define PUSH_ROUNDING(BYTES) \  (((BYTES) + PARM_BOUNDARY / 8 - 1) & -PARM_BOUNDARY / 8)/* Offset of first parameter from the argument pointer register value.  *//* Is equal to the size of the saved fp + pc, even if an fp isn't   saved since the value is used before we know.  */#define FIRST_PARM_OFFSET(FNDECL) 0/* Value is the number of bytes 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 H8 the return does not pop anything.  */#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, SIZE) 0/* Definitions for register eliminations.   This is an array of structures.  Each structure initializes one pair   of eliminable registers.  The "from" register number is given first,   followed by "to".  Eliminations of the same "from" register are listed   in order of preference.   We have three registers that can be eliminated on the h8300.   First, the frame pointer register can often be eliminated in favor   of the stack pointer register.  Secondly, the argument pointer   register and the return address pointer register are always   eliminated; they are replaced with either the stack or frame   pointer.  */#define ELIMINABLE_REGS						\{{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM},			\ { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM},		\ { RETURN_ADDRESS_POINTER_REGNUM, STACK_POINTER_REGNUM},	\ { RETURN_ADDRESS_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM},	\ { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM},			\ { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}}/* Given FROM and TO register numbers, say whether this elimination is allowed.   Frame pointer elimination is automatically handled.   For the h8300, if frame pointer elimination is being done, we would like to   convert ap and rp into sp, not fp.   All other eliminations are valid.  */#define CAN_ELIMINATE(FROM, TO)					\  ((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) = h8300_initial_elimination_offset ((FROM), (TO)))/* 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 H8 the return value is in R0/R1.  */#define FUNCTION_VALUE(VALTYPE, FUNC) \  gen_rtx_REG (TYPE_MODE (VALTYPE), R0_REG)/* Define how to find the value returned by a library function   assuming the value has mode MODE.  *//* On the H8 the return value is in R0/R1.  */#define LIBCALL_VALUE(MODE) \  gen_rtx_REG (MODE, R0_REG)/* 1 if N is a possible register number for a function value.   On the H8, R0 is the only register thus used.  */#define FUNCTION_VALUE_REGNO_P(N) ((N) == R0_REG)/* 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 H8, no registers are used in this way.  */#define FUNCTION_ARG_REGNO_P(N) (TARGET_QUICKCALL ? N < 3 : 0)/* When defined, the compiler allows registers explicitly used in the   rtl to be used as spill registers but prevents the compiler from   extending the lifetime of these registers.  */#define SMALL_REGISTER_CLASSES 1/* 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 H8/300, this is a two item struct, the first is the number   of bytes scanned so far and the second is the rtx of the called   library function if any.  */#define CUMULATIVE_ARGS struct cum_argstruct cum_arg{  int nbytes;  struct rtx_def *libcall;};/* 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 H8/300, the offset starts at 0.  */#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \ ((CUM).nbytes = 0, (CUM).libcall = 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)			\ ((CUM).nbytes += ((MODE) != BLKmode					\  ? (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) & -UNITS_PER_WORD	\  : (int_size_in_bytes (TYPE) + UNITS_PER_WORD - 1) & -UNITS_PER_WORD))/* 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 H8/300 all normal args are pushed, unless -mquickcall in which   case the first 3 arguments are passed in registers.   See function `function_arg'.  */#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \  function_arg (&CUM, MODE, TYPE, NAMED)/* Output assembler code to FILE to increment profiler label # LABELNO   for profiling a function entry.  */#define FUNCTION_PROFILER(FILE, LABELNO)  \  fprintf (FILE, "\t%s\t#LP%d,%s\n\tjsr @mcount\n", \	   h8_mov_op, (LABELNO), h8_reg_names[0]);/* 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/* We emit the entire trampoline with INITIALIZE_TRAMPOLINE.   Depending on the pointer size, we use a different trampoline.   Pmode == HImode	      vvvv context   1 0000 7903xxxx		mov.w	#0x1234,r3   2 0004 5A00xxxx		jmp	@0x1234	      ^^^^ function   Pmode == SImode	      vvvvvvvv context   2 0000 7A03xxxxxxxx		mov.l	#0x12345678,er3   3 0006 5Axxxxxx		jmp	@0x123456	    ^^^^^^ function*//* Length in units of the trampoline for entering a nested function.  */#define TRAMPOLINE_SIZE ((Pmode == HImode) ? 8 : 12)/* Emit RTL insns to build a trampoline.   FNADDR is an RTX for the address of the function's pure code.   CXT is an RTX for the static chain value for the function.  */#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)			    \  do									    \    {									    \      if (Pmode == HImode)						    \	{								    \	  emit_move_insn (gen_rtx_MEM (HImode, (TRAMP)), GEN_INT (0x7903)); \	  emit_move_insn (gen_rtx_MEM (Pmode, plus_constant ((TRAMP), 2)),  \			  (CXT));					    \	  emit_move_insn (gen_rtx_MEM (Pmode, plus_constant ((TRAMP), 4)),  \			  GEN_INT (0x5a00));				    \	  emit_move_insn (gen_rtx_MEM (Pmode, plus_constant ((TRAMP), 6)),  \			  (FNADDR));					    \	}								    \      else								    \	{								    \	  rtx tem = gen_reg_rtx (Pmode);				    \									    \	  emit_move_insn (gen_rtx_MEM (HImode, (TRAMP)), GEN_INT (0x7a03)); \	  emit_move_insn (gen_rtx_MEM (Pmode, plus_constant ((TRAMP), 2)),  \			  (CXT));					    \	  emit_move_insn (tem, (FNADDR));				    \	  emit_insn (gen_andsi3 (tem, tem, GEN_INT (0x00ffffff)));	    \	  emit_insn (gen_iorsi3 (tem, tem, GEN_INT (0x5a000000)));	    \	  emit_move_insn (gen_rtx_MEM (Pmode, plus_constant ((TRAMP), 6)),  \			  tem);						    \	}								    \    }									    \  while (0)/* Addressing modes, and classification of registers for them.  */#define HAVE_POST_INCREMENT 1#define HAVE_PRE_DECREMENT 1#define HAVE_POST_DECREMENT TARGET_H8300SX#define HAVE_PRE_INCREMENT TARGET_H8300SX/* Macros to check register numbers against specific register classes.  *//* 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.  */#define REGNO_OK_FOR_INDEX_P(regno) 0#define REGNO_OK_FOR_BASE_P(regno)				\  (((regno) < FIRST_PSEUDO_REGISTER && regno != MAC_REG)	\   || reg_renumber[regno] >= 0)/* Maximum number of registers that can appear in a valid memory address.  */#define MAX_REGS_PER_ADDRESS 1/* 1 if X is an rtx for a constant that is a valid address.  */#define CONSTANT_ADDRESS_P(X)					\  (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF	\   || (GET_CODE (X) == CONST_INT				\       /* We handle signed and unsigned offsets here.  */	\       && INTVAL (X) > (TARGET_H8300 ? -0x10000 : -0x1000000)	\       && INTVAL (X) < (TARGET_H8300 ? 0x10000 : 0x1000000))	\   || (GET_CODE (X) == HIGH || GET_CODE (X) == CONST))/* 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) (h8300_legitimate_constant_p (X))/* 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.  *//* Non-strict versions.  */#define REG_OK_FOR_INDEX_NONSTRICT_P(X) 0/* Don't use REGNO_OK_FOR_BASE_P here because it uses reg_renumber.  */#define REG_OK_FOR_BASE_NONSTRICT_P(X)				\  (REGNO (X) >= FIRST_PSEUDO_REGISTER || REGNO (X) != MAC_REG)/* Strict versions.  */#define REG_OK_FOR_INDEX_STRICT_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X))#define REG_OK_FOR_BASE_STRICT_P(X)  REGNO_OK_FOR_BASE_P (REGNO (X))#ifndef REG_OK_STRICT#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_INDEX_NONSTRICT_P (X)#define REG_OK_FOR_BASE_P(X)  REG_OK_FOR_BASE_NONSTRICT_P (X)#else#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_INDEX_STRICT_P (X)#define REG_OK_FOR_BASE_P(X)  REG_OK_FOR_BASE_STRICT_P (X)#endif

⌨️ 快捷键说明

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