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

📄 i960.h

📁 gcc编译工具没有什么特别
💻 H
📖 第 1 页 / 共 5 页
字号:
   For any two classes, it is very desirable that there be another   class that represents their union.  */   /* The 80960 has four kinds of registers, global, local, floating point,   and condition code.  The cc register is never allocated, so no class   needs to be defined for it.  */enum reg_class { NO_REGS, GLOBAL_REGS, LOCAL_REGS, LOCAL_OR_GLOBAL_REGS,  FP_REGS, ALL_REGS, LIM_REG_CLASSES };/* 'r' includes floating point registers if TARGET_NUMERICS.  'd' never   does.  */#define	GENERAL_REGS	((TARGET_NUMERICS) ? ALL_REGS : LOCAL_OR_GLOBAL_REGS)#define N_REG_CLASSES (int) LIM_REG_CLASSES/* Give names of register classes as strings for dump file.  */#define REG_CLASS_NAMES							\{ "NO_REGS", "GLOBAL_REGS", "LOCAL_REGS", "LOCAL_OR_GLOBAL_REGS",	\  "FP_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	\{ {0, 0}, {0x0ffff, 0}, {0xffff0000, 0}, {-1,0}, {0, -1}, {-1,-1}}/* 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.  */#define REGNO_REG_CLASS(REGNO)	\  ((REGNO) < 16 ? GLOBAL_REGS	\   : (REGNO) < 32 ? LOCAL_REGS	\   : (REGNO) < 36 ? FP_REGS	\   : NO_REGS)/* The class value for index registers, and the one for base regs.   There is currently no difference between base and index registers on the   i960, but this distinction may one day be useful.  */#define INDEX_REG_CLASS LOCAL_OR_GLOBAL_REGS#define BASE_REG_CLASS LOCAL_OR_GLOBAL_REGS/* Get reg_class from a letter such as appears in the machine description.   'f' is a floating point register (fp0..fp3)   'l' is a local register (r0-r15)   'b' is a global register (g0-g15)   'd' is any local or global register   'r' or 'g' are pre-defined to the class GENERAL_REGS.  *//* 'l' and 'b' are probably never used.  Note that 'd' and 'r' are *not*   the same thing, since 'r' may include the fp registers.  */#define REG_CLASS_FROM_LETTER(C) \  (((C) == 'f') && (TARGET_NUMERICS) ? FP_REGS : ((C) == 'l' ? LOCAL_REGS : \    (C) == 'b' ? GLOBAL_REGS : ((C) == 'd' ? LOCAL_OR_GLOBAL_REGS : 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.   For 80960:	'I' is used for literal values 0..31   	'J' means literal 0	'K' means 0..-31.  */#define CONST_OK_FOR_LETTER_P(VALUE, C)  				\  ((C) == 'I' ? (((unsigned) (VALUE)) <= 31)				\   : (C) == 'J' ? ((VALUE) == 0)					\   : (C) == 'K' ? ((VALUE) >= -31 && (VALUE) <= 0)			\   : (C) == 'M' ? ((VALUE) >= -32 && (VALUE) <= 0)			\   : 0)/* Similar, but for floating constants, and defining letters G and H.   Here VALUE is the CONST_DOUBLE rtx itself.   For the 80960, G is 0.0 and H is 1.0.  */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)				\  ((TARGET_NUMERICS) &&							\   (((C) == 'G' && (VALUE) == CONST0_RTX (GET_MODE (VALUE)))		\    || ((C) == 'H' && ((VALUE) == CONST1_RTX (GET_MODE (VALUE))))))/* 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 960, can't load constant into floating-point reg except   0.0 or 1.0.   Any hard reg is ok as a src operand of a reload insn.  */#define PREFERRED_RELOAD_CLASS(X,CLASS)			\  (GET_CODE (X) == REG && REGNO (X) < FIRST_PSEUDO_REGISTER	\   ? (CLASS)							\   : ((CLASS) == FP_REGS && CONSTANT_P (X)			\      && (X) != CONST0_RTX (DFmode) && (X) != CONST1_RTX (DFmode)\      && (X) != CONST0_RTX (SFmode) && (X) != CONST1_RTX (SFmode)\      ? NO_REGS							\      : (CLASS) == ALL_REGS ? LOCAL_OR_GLOBAL_REGS : (CLASS)))#define SECONDARY_RELOAD_CLASS(CLASS,MODE,IN) \  secondary_reload_class (CLASS, MODE, IN)/* Return the maximum number of consecutive registers   needed to represent mode MODE in a register of class CLASS.  *//* On 80960, this is the size of MODE in words,   except in the FP regs, where a single reg is always enough.  */#define CLASS_MAX_NREGS(CLASS, MODE)					\  ((CLASS) == FP_REGS ? 1 : HARD_REGNO_NREGS (0, (MODE)))/* 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 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.   The i960 has a 64 byte register save area, plus possibly some extra   bytes allocated for varargs functions.  */#define STARTING_FRAME_OFFSET 64/* If we generate an insn to push BYTES bytes,   this says how many the stack pointer really advances by.   On 80960, don't define this because there are no push insns.  *//* #define PUSH_ROUNDING(BYTES) BYTES *//* Offset of first parameter from the argument pointer register value.  */#define FIRST_PARM_OFFSET(FNDECL) 0/* When a parameter is passed in a register, no stack space is   allocated for it.  However, when args are passed in the   stack, space is allocated for every register parameter.  */#define MAYBE_REG_PARM_STACK_SPACE 48#define FINAL_REG_PARM_STACK_SPACE(CONST_SIZE, VAR_SIZE)	\  i960_final_reg_parm_stack_space (CONST_SIZE, VAR_SIZE);#define REG_PARM_STACK_SPACE(DECL) i960_reg_parm_stack_space (DECL)#define OUTGOING_REG_PARM_STACK_SPACE/* Keep the stack pointer constant throughout the function.  */#define ACCUMULATE_OUTGOING_ARGS/* Value is 1 if returning from a function call automatically   pops the arguments described by the number-of-args field in the 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.  */#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0/* 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), 0)/* 1 if N is a possible register number for a function value   as seen by the caller.   On 80960, returns are in g0..g3 */#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)/* 1 if N is a possible register number for function argument passing.   On 80960, parameters are passed in g0..g11 */#define FUNCTION_ARG_REGNO_P(N) ((N) < 12)/* Perform any needed actions needed for a function that is receiving a   variable number of arguments.    CUM is as above.   MODE and TYPE are the mode and type of the current parameter.   PRETEND_SIZE is a variable that should be set to the amount of stack   that must be pushed by the prolog to pretend that our caller pushed   it.   Normally, this macro will push all remaining incoming registers on the   stack and set PRETEND_SIZE to the length of the registers pushed.  */#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \  i960_setup_incoming_varargs(&CUM,MODE,TYPE,&PRETEND_SIZE,NO_RTL)/* 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 80960, this is two integers, which count the number of register   parameters and the number of stack parameters seen so far.  */struct cum_args { int ca_nregparms; int ca_nstackparms; };#define CUMULATIVE_ARGS struct cum_args/* Define the number of registers that can hold parameters.   This macro is used only in macro definitions below and/or i960.c.  */#define NPARM_REGS 12/* Define how to round to the next parameter boundary.   This macro is used only in macro definitions below and/or i960.c.  */#define ROUND_PARM(X, MULTIPLE_OF)	\  ((((X) + (MULTIPLE_OF) - 1) / (MULTIPLE_OF)) * MULTIPLE_OF)/* 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 80960, the offset always starts at 0; the first parm reg is g0.  */#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT)	\  ((CUM).ca_nregparms = 0, (CUM).ca_nstackparms = 0)/* Update the data in CUM to advance over an argument   of mode MODE and data type TYPE.   CUM should be advanced to align with the data type accessed and   also the size of that data type in # of regs.   (TYPE is null for libcalls where that information may not be available.)  */#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)	\  i960_function_arg_advance(&CUM, MODE, TYPE, NAMED)/* Indicate the alignment boundary for an argument of the specified mode and   type.  */#define FUNCTION_ARG_BOUNDARY(MODE, TYPE)				\  (((TYPE) != 0)							\   ? ((TYPE_ALIGN (TYPE) <= PARM_BOUNDARY)				\      ? PARM_BOUNDARY							\      : TYPE_ALIGN (TYPE))						\   : ((GET_MODE_ALIGNMENT (MODE) <= PARM_BOUNDARY)			\      ? PARM_BOUNDARY							\      : GET_MODE_ALIGNMENT (MODE)))/* Determine where to put an argument 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).  */extern struct rtx_def *i960_function_arg ();#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED)	\  i960_function_arg(&CUM, MODE, TYPE, NAMED)/* 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(TYPE, FUNC) \  gen_rtx (REG, TYPE_MODE (TYPE), 0)/* Force aggregates and objects larger than 16 bytes to be returned in memory,   since we only have 4 registers available for return values.  */#define RETURN_IN_MEMORY(TYPE) \  (TYPE_MODE (TYPE) == BLKmode || int_size_in_bytes (TYPE) > 16)/* 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/* For an arg passed partly in registers and partly in memory,   this is the number of registers used.   This never happens on 80960.  */#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0/* Output the label for a function definition.  This handles leaf functions and a few other things for the i960.  */#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)	\  i960_function_name_declare (FILE, NAME, DECL)/* This macro generates the assembly code for function entry.   FILE is a stdio stream to output the code to.   SIZE is an int: how many units of temporary storage to allocate.   Refer to the array `regs_ever_live' to determine which registers   to save; `regs_ever_live[I]' is nonzero if register number I   is ever used in the function.  This macro is responsible for   knowing which registers should not be saved even if used.  */#define FUNCTION_PROLOGUE(FILE, SIZE) i960_function_prologue ((FILE), (SIZE))/* Output assembler code to FILE to increment profiler label # LABELNO   for profiling a function entry.  */#define FUNCTION_PROFILER(FILE, LABELNO)	\  output_function_profiler ((FILE), (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/* This macro generates the assembly code for function exit,   on machines that need it.  If FUNCTION_EPILOGUE is not defined   then individual return instructions are generated for each   return statement.  Args are same as for FUNCTION_PROLOGUE.   The function epilogue should not depend on the current stack pointer!   It should use the frame pointer only.  This is mandatory because   of alloca; we also take advantage of it to omit stack adjustments   before returning.  */#define FUNCTION_EPILOGUE(FILE, SIZE) i960_function_epilogue (FILE, SIZE)/* Addressing modes, and classification of registers for them.  *//* #define HAVE_POST_INCREMENT 0 *//* #define HAVE_POST_DECREMENT 0 */

⌨️ 快捷键说明

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