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

📄 i960.h

📁 GUN开源阻止下的编译器GCC
💻 H
📖 第 1 页 / 共 4 页
字号:
   library functions.  */#define CONSTANT_ALIGNMENT(EXP, ALIGN) \  (TREE_CODE (EXP) == STRING_CST	\   && i960_object_bytes_bitalign (int_size_in_bytes (TREE_TYPE (EXP))) > (ALIGN) \   ? i960_object_bytes_bitalign (int_size_in_bytes (TREE_TYPE (EXP)))	    \   : (ALIGN))/* Make XFmode floating point quantities be 128 bit aligned.  */#define DATA_ALIGNMENT(TYPE, ALIGN)					\  (TREE_CODE (TYPE) == ARRAY_TYPE					\   && TYPE_MODE (TREE_TYPE (TYPE)) == XFmode				\   && (ALIGN) < 128 ? 128 : (ALIGN))/* Macros to determine size of aggregates (structures and unions   in C).  Normally, these may be defined to simply return the maximum   alignment and simple rounded-up size, but on some machines (like   the i960), the total size of a structure is based on a non-trivial   rounding method.  */#define ROUND_TYPE_ALIGN(TYPE, COMPUTED, SPECIFIED)		\  ((TREE_CODE (TYPE) == REAL_TYPE && TYPE_MODE (TYPE) == XFmode)	   \   ? 128  /* Put 80 bit floating point elements on 128 bit boundaries.  */ \   : ((!TARGET_OLD_ALIGN && TREE_CODE (TYPE) == RECORD_TYPE)		   \      ? i960_round_align (MAX ((COMPUTED), (SPECIFIED)), TYPE_SIZE (TYPE)) \      : MAX ((COMPUTED), (SPECIFIED))))#define ROUND_TYPE_SIZE(TYPE, COMPUTED, SPECIFIED)		\  ((TREE_CODE (TYPE) == REAL_TYPE && TYPE_MODE (TYPE) == XFmode)	\   ? build_int_2 (128, 0) : (COMPUTED))/* Standard register usage.  *//* Number of actual hardware registers.   The hardware registers are assigned numbers for the compiler   from 0 to just below FIRST_PSEUDO_REGISTER.   All registers that the compiler knows about must be given numbers,   even those that are not normally considered general registers.   Registers 0-15 are the global registers (g0-g15).   Registers 16-31 are the local registers (r0-r15).   Register 32-35 are the fp registers (fp0-fp3).   Register 36 is the condition code register.   Register 37 is unused.  */#define FIRST_PSEUDO_REGISTER 38/* 1 for registers that have pervasive standard uses and are not available   for the register allocator.  On 80960, this includes the frame pointer   (g15), the previous FP (r0), the stack pointer (r1), the return   instruction pointer (r2), and the argument pointer (g14).  */#define FIXED_REGISTERS  \ {0, 0, 0, 0, 0, 0, 0, 0,	\  0, 0, 0, 0, 0, 0, 1, 1,	\  1, 1, 1, 0, 0, 0, 0, 0,	\  0, 0, 0, 0, 0, 0, 0, 0,	\  0, 0, 0, 0, 1, 1}/* 1 for registers not available across function calls.   These must include the FIXED_REGISTERS and also any   registers that can be used without being saved.   The latter must include the registers where values are returned   and the register where structure-value addresses are passed.   Aside from that, you can include as many other registers as you like.  *//* On the 80960, note that:	g0..g3 are used for return values,	g0..g7 may always be used for parameters,	g8..g11 may be used for parameters, but are preserved if they aren't,	g12 is always preserved, but otherwise unused,	g13 is the struct return ptr if used, or temp, but may be trashed,	g14 is the leaf return ptr or the arg block ptr otherwise zero,		must be reset to zero before returning if it was used,	g15 is the frame pointer,	r0 is the previous FP,	r1 is the stack pointer,	r2 is the return instruction pointer,	r3-r15 are always available,	r3 is clobbered by calls in functions that use the arg pointer	r4-r11 may be clobbered by the mcount call when profiling	r4-r15 if otherwise unused may be used for preserving global registers	fp0..fp3 are never available.  */#define CALL_USED_REGISTERS  \ {1, 1, 1, 1, 1, 1, 1, 1,	\  0, 0, 0, 0, 0, 1, 1, 1,	\  1, 1, 1, 0, 0, 0, 0, 0,	\  0, 0, 0, 0, 0, 0, 0, 0,	\  1, 1, 1, 1, 1, 1}/* If no fp unit, make all of the fp registers fixed so that they can't   be used.  */#define	CONDITIONAL_REGISTER_USAGE	\  if (! TARGET_NUMERICS) {						\     fixed_regs[32] = fixed_regs[33] = fixed_regs[34] = fixed_regs[35] = 1;\  }									\/* Return number of consecutive hard regs needed starting at reg REGNO   to hold something of mode MODE.   This is ordinarily the length in words of a value of mode MODE   but can be less for certain modes in special long registers.   On 80960, ordinary registers hold 32 bits worth, but can be ganged   together to hold double or extended precision floating point numbers,   and the floating point registers hold any size floating point number */#define HARD_REGNO_NREGS(REGNO, MODE)   \  ((REGNO) < 32							\   ? (((MODE) == VOIDmode)					\      ? 1 : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) \   : ((REGNO) < FIRST_PSEUDO_REGISTER) ? 1 : 0)/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.   On 80960, the cpu registers can hold any mode but the float registers   can only hold SFmode, DFmode, or XFmode.  */extern unsigned int hard_regno_mode_ok[FIRST_PSEUDO_REGISTER];#define HARD_REGNO_MODE_OK(REGNO, MODE) \  ((hard_regno_mode_ok[REGNO] & (1 << (int) (MODE))) != 0)/* Value is 1 if it is a good idea to tie two pseudo registers   when one has mode MODE1 and one has mode MODE2.   If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,   for any hard reg, then this must be 0 for correct output.  */#define MODES_TIEABLE_P(MODE1, MODE2) \  ((MODE1) == (MODE2) || GET_MODE_CLASS (MODE1) == GET_MODE_CLASS (MODE2))/* Specify the registers used for certain standard purposes.   The values of these macros are register numbers.  *//* 80960 pc isn't overloaded on a register that the compiler knows about.  *//* #define PC_REGNUM  *//* Register to use for pushing function arguments.  */#define STACK_POINTER_REGNUM 17/* Actual top-of-stack address is same as   the contents of the stack pointer register.  */#define STACK_POINTER_OFFSET (-current_function_outgoing_args_size)/* Base register for access to local variables of the function.  */#define FRAME_POINTER_REGNUM 15/* Value should be nonzero if functions must have frame pointers.   Zero means the frame pointer need not be set up (and parms   may be accessed via the stack pointer) in functions that seem suitable.   This is computed in `reload', in reload1.c.  *//* ??? It isn't clear to me why this is here.  Perhaps because of a bug (since   fixed) in the definition of INITIAL_FRAME_POINTER_OFFSET which would have   caused this to fail.  */#define FRAME_POINTER_REQUIRED (! leaf_function_p ())/* C statement to store the difference between the frame pointer   and the stack pointer values immediately after the function prologue.   Since the stack grows upward on the i960, this must be a negative number.   This includes the 64 byte hardware register save area and the size of   the frame.  */#define INITIAL_FRAME_POINTER_OFFSET(VAR) \  do { (VAR) = - (64 + compute_frame_size (get_frame_size ())); } while (0)/* Base register for access to arguments of the function.  */#define ARG_POINTER_REGNUM 14/* Register in which static-chain is passed to a function.   On i960, we use r3.  */#define STATIC_CHAIN_REGNUM 19 /* Functions which return large structures get the address   to place the wanted value at in g13.  */#define STRUCT_VALUE_REGNUM 13 /* The order in which to allocate registers.  */#define	REG_ALLOC_ORDER	\{  4, 5, 6, 7, 0, 1, 2, 3, 13,	 /* g4, g5, g6, g7, g0, g1, g2, g3, g13  */ \  20, 21, 22, 23, 24, 25, 26, 27,/* r4, r5, r6, r7, r8, r9, r10, r11  */    \  28, 29, 30, 31, 19, 8, 9, 10,	 /* r12, r13, r14, r15, r3, g8, g9, g10  */ \  11, 12,			 /* g11, g12  */			    \  32, 33, 34, 35,		 /* fp0, fp1, fp2, fp3  */		    \  /* We can't actually allocate these.  */				    \  16, 17, 18, 14, 15, 36, 37}	 /* r0, r1, r2, g14, g15, cc  *//* 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 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) > -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.

⌨️ 快捷键说明

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