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

📄 i960.h

📁 linux下的gcc编译器
💻 H
📖 第 1 页 / 共 4 页
字号:
/* Define this to set long double type size to use in libgcc2.c, which can   not depend on target_flags.  */#if defined(__LONG_DOUBLE_64__)#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64#else#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128#endif/* Allocation boundary (in *bits*) for storing pointers in memory.  */#define POINTER_BOUNDARY 32/* Allocation boundary (in *bits*) for storing arguments in argument list.  */#define PARM_BOUNDARY 32/* Boundary (in *bits*) on which stack pointer should be aligned.  */#define STACK_BOUNDARY 128/* Allocation boundary (in *bits*) for the code of a function.  */#define FUNCTION_BOUNDARY 128/* Alignment of field after `int : 0' in a structure.  */#define EMPTY_FIELD_BOUNDARY 32/* This makes zero-length anonymous fields lay the next field   at a word boundary.  It also makes the whole struct have   at least word alignment if there are any bitfields at all.  */#define PCC_BITFIELD_TYPE_MATTERS 1/* Every structure's size must be a multiple of this.  */#define STRUCTURE_SIZE_BOUNDARY 8/* No data type wants to be aligned rounder than this.   Extended precision floats gets 4-word alignment.  */#define BIGGEST_ALIGNMENT 128/* Define this if move instructions will actually fail to work   when given unaligned data.   80960 will work even with unaligned data, but it is slow.  */#define STRICT_ALIGNMENT TARGET_STRICT_ALIGN/* Specify alignment for string literals (which might be higher than the   base type's minimal alignment requirement.  This allows strings to be   aligned on word boundaries, and optimizes calls to the str* and mem*   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))/* 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) \  i960_round_align (MAX ((COMPUTED), (SPECIFIED)), TYPE)/* 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 the static chain if needed, otherwise is preserved	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 TFmode.  */#define HARD_REGNO_MODE_OK(REGNO, MODE) hard_regno_mode_ok ((REGNO), (MODE))/* 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.  *//* ??? Must check current_function_has_nonlocal_goto, otherwise frame pointer  elimination messes up nonlocal goto sequences.  I think this works for other  targets because they use indirect jumps for the return which disables fp  elimination.  */#define FRAME_POINTER_REQUIRED \  (! leaf_function_p () || current_function_has_nonlocal_goto)/* 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..  */#define ELIMINABLE_REGS	 {{FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}}/* Given FROM and TO register numbers, say whether this elimination is allowed.   Frame pointer elimination is automatically handled.  */#define CAN_ELIMINATE(FROM, TO) 1/* Define the offset between two registers, one to be eliminated, and   the other its replacement, at the start of a routine.   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_ELIMINATION_OFFSET(FROM, TO, OFFSET)			\  do { (OFFSET) = - (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 g12.  We can't use any local register, because we need   a register that can be set before a call or before a jump.  */#define STATIC_CHAIN_REGNUM 12 /* 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) >= -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

⌨️ 快捷键说明

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