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

📄 sh.h

📁 GUN开源阻止下的编译器GCC
💻 H
📖 第 1 页 / 共 4 页
字号:
   in order of preference.  */#define ELIMINABLE_REGS				\{{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM},	\ { ARG_POINTER_REGNUM,   STACK_POINTER_REGNUM},	\ { ARG_POINTER_REGNUM,   FRAME_POINTER_REGNUM},}/* Given FROM and TO register numbers, say whether this elimination   is allowed.  */#define CAN_ELIMINATE(FROM, TO) \  (!((FROM) == FRAME_POINTER_REGNUM && FRAME_POINTER_REQUIRED))/* 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 = initial_elimination_offset (FROM, TO)/* Base register for access to arguments of the function.  */#define ARG_POINTER_REGNUM	16/* Register in which the static-chain is passed to a function.  */#define STATIC_CHAIN_REGNUM	13/* The register in which a struct value address is passed.  */#define STRUCT_VALUE_REGNUM 2/* If the structure value address is not passed in a register, define   `STRUCT_VALUE' as an expression returning an RTX for the place   where the address is passed.  If it returns 0, the address is   passed as an "invisible" first argument.  *//*#define STRUCT_VALUE ((rtx)0)*//* Don't default to pcc-struct-return, because we have already specified   exactly how to return structures in the RETURN_IN_MEMORY macro.  */#define DEFAULT_PCC_STRUCT_RETURN 0/* Define the classes of registers for register constraints in the   machine description.  Also define ranges of constants.   One of the classes must always be named ALL_REGS and include all hard regs.   If there is more than one class, another class must be named NO_REGS   and contain no registers.   The name GENERAL_REGS must be the name of a class (or an alias for   another name such as ALL_REGS).  This is the class of registers   that is allowed by "g" or "r" in a register constraint.   Also, registers outside this class are allocated only when   instructions express preferences for them.   The classes must be numbered in nondecreasing order; that is,   a larger-numbered class must never be contained completely   in a smaller-numbered class.   For any two classes, it is very desirable that there be another   class that represents their union.  *//* The SH has two sorts of general registers, R0 and the rest.  R0 can   be used as the destination of some of the arithmetic ops. There are   also some special purpose registers; the T bit register, the   Procedure Return Register and the Multiply Accumulate Registers.  */enum reg_class{  NO_REGS,  R0_REGS,  PR_REGS,  T_REGS,  MAC_REGS,  GENERAL_REGS,  ALL_REGS,  LIM_REG_CLASSES};#define N_REG_CLASSES  (int) LIM_REG_CLASSES/* Give names of register classes as strings for dump file.  */#define REG_CLASS_NAMES	\{			\  "NO_REGS",		\  "R0_REGS",		\  "PR_REGS",		\  "T_REGS",		\  "MAC_REGS",		\  "GENERAL_REGS",	\  "ALL_REGS",		\}/* Define which registers fit in which classes.   This is an initializer for a vector of HARD_REG_SET   of length N_REG_CLASSES.  */#define REG_CLASS_CONTENTS	\{				\  0x000000,  /* NO_REGS      */	\  0x000001,  /* R0_REGS      */	\  0x020000,  /* PR_REGS      */	\  0x040000,  /* T_REGS       */	\  0x300000,  /* MAC_REGS     */	\  0x01FFFF,  /* GENERAL_REGS */	\  0x37FFFF   /* ALL_REGS     */	\}/* The same information, inverted:   Return the class number of the smallest class containing   reg number REGNO.  This could be a conditional expression   or could index an array.  */extern int regno_reg_class[];#define REGNO_REG_CLASS(REGNO) regno_reg_class[REGNO]/* 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/* The order in which register should be allocated.  */#define REG_ALLOC_ORDER \  { 1,2,3,7,6,5,4,0,8,9,10,11,12,13,14,15,16,17,18,19,20,21 }/* The class value for index registers, and the one for base regs.  */#define INDEX_REG_CLASS  R0_REGS#define BASE_REG_CLASS	 GENERAL_REGS/* Get reg_class from a letter such as appears in the machine   description.  */extern enum reg_class reg_class_from_letter[];#define REG_CLASS_FROM_LETTER(C) \   ( (C) >= 'a' && (C) <= 'z' ? reg_class_from_letter[(C)-'a'] : NO_REGS )/* 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.	I: arithmetic operand -127..128, as used in add, sub, etc	K: shift operand 1,2,8 or 16	L: logical operand 0..255, as used in and, or, etc.	M: constant 1	N: constant 0  */#define CONST_OK_FOR_I(VALUE) (((int)(VALUE))>= -128 && ((int)(VALUE)) <= 127)#define CONST_OK_FOR_K(VALUE) ((VALUE)==1||(VALUE)==2||(VALUE)==8||(VALUE)==16)#define CONST_OK_FOR_L(VALUE) (((int)(VALUE))>=    0 && ((int)(VALUE)) <= 255)#define CONST_OK_FOR_M(VALUE) ((VALUE)==1)#define CONST_OK_FOR_N(VALUE) ((VALUE)==0)#define CONST_OK_FOR_LETTER_P(VALUE, C)		\     ((C) == 'I' ? CONST_OK_FOR_I (VALUE)	\    : (C) == 'K' ? CONST_OK_FOR_K (VALUE)	\    : (C) == 'L' ? CONST_OK_FOR_L (VALUE)	\    : (C) == 'M' ? CONST_OK_FOR_M (VALUE)	\    : (C) == 'N' ? CONST_OK_FOR_N (VALUE)	\    : 0)/* Similar, but for floating constants, and defining letters G and H.   Here VALUE is the CONST_DOUBLE rtx itself.  */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 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 SH 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)/* Stack layout; function entry, exit and calling.  *//* Define the number of registers that can hold parameters.   These three macros are used only in other macro definitions below.  */#define NPARM_REGS 4#define FIRST_PARM_REG 4#define FIRST_RET_REG  0/* Define this if pushing a word on the stack   makes the stack pointer a smaller address.  */#define STACK_GROWS_DOWNWARD/*  Define this macro if the addresses of local variable slots are at    negative offsets from the frame pointer.    The SH only has positive indexes, so grow the frame up.  *//* #define FRAME_GROWS_DOWNWARD *//* Offset from the frame pointer to the first local variable slot to   be 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.  */#define PUSH_ROUNDING(NPUSHED)  (((NPUSHED) + 3) & ~3)/* Offset of first parameter from the argument pointer register value.  */#define FIRST_PARM_OFFSET(FNDECL)  0/* 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 SH, the caller does not pop any of its arguments that were passed   on the stack.  */#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,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.  */#define FUNCTION_VALUE(VALTYPE, FUNC) \  gen_rtx (REG, TYPE_MODE (VALTYPE), FIRST_RET_REG)/* Define how to find the value returned by a library function   assuming the value has mode MODE.  */#define LIBCALL_VALUE(MODE)	gen_rtx (REG, MODE, FIRST_RET_REG)/* 1 if N is a possible register number for a function value.   On the SH, only r0 can return results.  */#define FUNCTION_VALUE_REGNO_P(REGNO)	((REGNO) == FIRST_RET_REG)/* 1 if N is a possible register number for function argument passing.  */#define FUNCTION_ARG_REGNO_P(REGNO) \  ((REGNO) >= FIRST_PARM_REG && (REGNO) < (NPARM_REGS + FIRST_PARM_REG))/* 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 SH, this is a single integer, which is a number of words   of arguments scanned so far (including the invisible argument,   if any, which holds the structure-value-address).   Thus NARGREGS or more means all following args should go on the stack.  */#define CUMULATIVE_ARGS  int#define ROUND_ADVANCE(SIZE) \  ((SIZE + UNITS_PER_WORD - 1) / UNITS_PER_WORD)/* Round a register number up to a proper boundary for an arg of mode   MODE.   The SH doesn't care about double alignment, so we only   round doubles to even regs when asked to explicitly.  */#define ROUND_REG(X, MODE) 					\  ((TARGET_ALIGN_DOUBLE 					\   && GET_MODE_UNIT_SIZE ((MODE)) > UNITS_PER_WORD) 		\   ? ((X) + ((X) & 1)) : (X))/* 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 SH, the offset always starts at 0: the first parm reg is always   the same reg.  */#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME) \  ((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) = (ROUND_REG ((CUM), (MODE))			\	   + ((MODE) != BLKmode				\	      ? ROUND_ADVANCE (GET_MODE_SIZE (MODE))	\	      : ROUND_ADVANCE (int_size_in_bytes (TYPE)))))/* 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 SH the first args are normally in registers   and the rest are pushed.  Any arg that starts within the first   NPARM_REGS words is at least partially passed in a register unless   its data type forbids.  */#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \  sh_function_arg (CUM, MODE, TYPE, NAMED)extern struct rtx_def *sh_function_arg();/* 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.   We sometimes split args.  */#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \  sh_function_arg_partial_nregs (CUM, MODE, TYPE, NAMED)extern int current_function_anonymous_args;/* Perform any needed actions needed for a function that is receiving a   variable number of arguments.  */#define SETUP_INCOMING_VARARGS(ASF, MODE, TYPE, PAS, ST) \  current_function_anonymous_args = 1;/* Call the function profiler with a given profile label.  */#define FUNCTION_PROFILER(STREAM,LABELNO)			\{								\	fprintf(STREAM, "	trapa	#5\n");			\ 	fprintf(STREAM, "	.align	2\n");			\	fprintf(STREAM, "	.long	LP%d\n", (LABELNO));	\}/* 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 1/* Generate the assembly code for function exit   Just dump out any accumulated constant table.  */#define FUNCTION_EPILOGUE(STREAM, SIZE)  function_epilogue (STREAM, SIZE)/* Output assembler code for a block containing the constant parts   of a trampoline, leaving space for the variable parts.   On the SH, the trampoline looks like   1 0000 D301     		mov.l	l1,r3   2 0002 DD02     	   	mov.l	l2,r13   3 0004 4D2B     		jmp	@r13   4 0006 200B     		or	r0,r0   5 0008 00000000 	l1:  	.long   function   6 000c 00000000 	l2:	.long   area  */#define TRAMPOLINE_TEMPLATE(FILE)  		\{						\  fprintf ((FILE), "	.word	0xd301\n");	\  fprintf ((FILE), "	.word	0xdd02\n");	\  fprintf ((FILE), "	.word	0x4d2b\n");	\

⌨️ 快捷键说明

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