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

📄 i386.h

📁 gcc编译工具没有什么特别
💻 H
📖 第 1 页 / 共 5 页
字号:
/* 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.   Actually there are no two word move instructions for consecutive    registers.  And only registers 0-3 may have mov byte instructions   applied to them.   */#define HARD_REGNO_NREGS(REGNO, MODE)   \  (FP_REGNO_P (REGNO) ? 1 \   : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.   On the 80386, the first 4 cpu registers can hold any mode   while the floating point registers may hold only floating point.   Make it clear that the fp regs could not hold a 16-byte float.  *//* The casts to int placate a compiler on a microvax,   for cross-compiler testing.  */#define HARD_REGNO_MODE_OK(REGNO, MODE) \  ((REGNO) < 4 ? 1						\   : FP_REGNO_P (REGNO)						\   ? (((int) GET_MODE_CLASS (MODE) == (int) MODE_FLOAT		\       || (int) GET_MODE_CLASS (MODE) == (int) MODE_COMPLEX_FLOAT)	\      && GET_MODE_UNIT_SIZE (MODE) <= (LONG_DOUBLE_TYPE_SIZE == 96 ? 12 : 8))\   : (int) (MODE) != (int) QImode ? 1				\   : (reload_in_progress | reload_completed) == 1)/* 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)						\   || ((MODE1) == SImode && (MODE2) == HImode)			\   || ((MODE1) == HImode && (MODE2) == SImode))/* Specify the registers used for certain standard purposes.   The values of these macros are register numbers.  *//* on the 386 the pc register is %eip, and is not usable as a general   register.  The ordinary mov instructions won't work *//* #define PC_REGNUM  *//* Register to use for pushing function arguments.  */#define STACK_POINTER_REGNUM 7/* Base register for access to local variables of the function.  */#define FRAME_POINTER_REGNUM 6/* First floating point reg */#define FIRST_FLOAT_REG 8/* First & last stack-like regs */#define FIRST_STACK_REG FIRST_FLOAT_REG#define LAST_STACK_REG (FIRST_FLOAT_REG + 7)/* 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.  */#define FRAME_POINTER_REQUIRED (TARGET_OMIT_LEAF_FRAME_POINTER && !leaf_function_p ()) 	/* Base register for access to arguments of the function.  */#define ARG_POINTER_REGNUM 16/* Register in which static-chain is passed to a function.  */#define STATIC_CHAIN_REGNUM 2/* Register to hold the addressing base for position independent   code access to data items.  */#define PIC_OFFSET_TABLE_REGNUM 3/* Register in which address to store a structure value   arrives in the function.  On the 386, the prologue   copies this from the stack to register %eax.  */#define STRUCT_VALUE_INCOMING 0/* Place in which caller passes the structure value address.   0 means push the value on the stack like an argument.  */#define STRUCT_VALUE 0/* A C expression which can inhibit the returning of certain function   values in registers, based on the type of value.  A nonzero value   says to return the function value in memory, just as large   structures are always returned.  Here TYPE will be a C expression   of type `tree', representing the data type of the value.   Note that values of mode `BLKmode' must be explicitly handled by   this macro.  Also, the option `-fpcc-struct-return' takes effect   regardless of this macro.  On most systems, it is possible to   leave the macro undefined; this causes a default definition to be   used, whose value is the constant 1 for `BLKmode' values, and 0   otherwise.   Do not use this macro to indicate that structures and unions   should always be returned in memory.  You should instead use   `DEFAULT_PCC_STRUCT_RETURN' to indicate this.  */#define RETURN_IN_MEMORY(TYPE) \  ((TYPE_MODE (TYPE) == BLKmode) || int_size_in_bytes (TYPE) > 12)/* 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.   It might seem that class BREG is unnecessary, since no useful 386   opcode needs reg %ebx.  But some systems pass args to the OS in ebx,   and the "b" register constraint is useful in asms for syscalls.  */enum reg_class{  NO_REGS,  AREG, DREG, CREG, BREG,  AD_REGS,			/* %eax/%edx for DImode */  Q_REGS,			/* %eax %ebx %ecx %edx */  SIREG, DIREG,  INDEX_REGS,			/* %eax %ebx %ecx %edx %esi %edi %ebp */  GENERAL_REGS,			/* %eax %ebx %ecx %edx %esi %edi %ebp %esp */  FP_TOP_REG, FP_SECOND_REG,	/* %st(0) %st(1) */  FLOAT_REGS,  ALL_REGS, LIM_REG_CLASSES};#define N_REG_CLASSES (int) LIM_REG_CLASSES#define FLOAT_CLASS_P(CLASS) (reg_class_subset_p (CLASS, FLOAT_REGS))/* Give names of register classes as strings for dump file.   */#define REG_CLASS_NAMES \{  "NO_REGS",				\   "AREG", "DREG", "CREG", "BREG",	\   "AD_REGS",				\   "Q_REGS",				\   "SIREG", "DIREG",			\   "INDEX_REGS",			\   "GENERAL_REGS",			\   "FP_TOP_REG", "FP_SECOND_REG",	\   "FLOAT_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},							\     {0x1},    {0x2},  {0x4},	 {0x8},	/* AREG, DREG, CREG, BREG */	\     {0x3},			/* AD_REGS */			\     {0xf},			/* Q_REGS */			\    {0x10},   {0x20},		/* SIREG, DIREG */		\ {0x7f},				/* INDEX_REGS */		\ {0x100ff},			/* GENERAL_REGS */		\  {0x0100}, {0x0200},		/* FP_TOP_REG, FP_SECOND_REG */	\  {0xff00},			/* FLOAT_REGS */		\ {0x1ffff}}/* 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) (regclass_map[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 1#define QI_REG_P(X) \  (REG_P (X) && REGNO (X) < 4)#define NON_QI_REG_P(X) \  (REG_P (X) && REGNO (X) >= 4 && REGNO (X) < FIRST_PSEUDO_REGISTER)#define FP_REG_P(X) (REG_P (X) && FP_REGNO_P (REGNO (X)))#define FP_REGNO_P(n) ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG)  #define STACK_REG_P(xop) (REG_P (xop) &&		       	\			  REGNO (xop) >= FIRST_STACK_REG &&	\			  REGNO (xop) <= LAST_STACK_REG)#define NON_STACK_REG_P(xop) (REG_P (xop) && ! STACK_REG_P (xop))#define STACK_TOP_P(xop) (REG_P (xop) && REGNO (xop) == FIRST_STACK_REG)/* 1 if register REGNO can magically overlap other regs.   Note that nonzero values work only in very special circumstances. *//* #define OVERLAPPING_REGNO_P(REGNO) FP_REGNO_P (REGNO) *//* The class value for index registers, and the one for base regs.  */#define INDEX_REG_CLASS INDEX_REGS#define BASE_REG_CLASS GENERAL_REGS/* Get reg_class from a letter such as appears in the machine description.  */#define REG_CLASS_FROM_LETTER(C)	\  ((C) == 'r' ? GENERAL_REGS :					\   (C) == 'q' ? Q_REGS :					\   (C) == 'f' ? (TARGET_80387 || TARGET_FLOAT_RETURNS_IN_80387	\		 ? FLOAT_REGS					\		 : NO_REGS) :					\   (C) == 't' ? (TARGET_80387 || TARGET_FLOAT_RETURNS_IN_80387	\		 ? FP_TOP_REG					\		 : NO_REGS) :					\   (C) == 'u' ? (TARGET_80387 || TARGET_FLOAT_RETURNS_IN_80387	\		 ? FP_SECOND_REG				\		 : NO_REGS) :					\   (C) == 'a' ? AREG :						\   (C) == 'b' ? BREG :						\   (C) == 'c' ? CREG :						\   (C) == 'd' ? DREG :						\   (C) == 'A' ? AD_REGS :					\   (C) == 'D' ? DIREG :						\   (C) == 'S' ? SIREG : 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 is for non-DImode shifts.   J is for DImode shifts.   K and L are for an `andsi' optimization.   M is for shifts that can be executed by the "lea" opcode.   */#define CONST_OK_FOR_LETTER_P(VALUE, C)  \  ((C) == 'I' ? (VALUE) >= 0 && (VALUE) <= 31 :	\   (C) == 'J' ? (VALUE) >= 0 && (VALUE) <= 63 :	\   (C) == 'K' ? (VALUE) == 0xff :		\   (C) == 'L' ? (VALUE) == 0xffff :		\   (C) == 'M' ? (VALUE) >= 0 && (VALUE) <= 3 :	\   (C) == 'N' ? (VALUE) >= 0 && (VALUE) <= 255 :\   (C) == 'O' ? (VALUE) >= 0 && (VALUE) <= 32 :	\   0)/* Similar, but for floating constants, and defining letters G and H.   Here VALUE is the CONST_DOUBLE rtx itself.  We allow constants even if   TARGET_387 isn't set, because the stack register converter may need to   load 0.0 into the function value register.  */#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)  \  ((C) == 'G' ? standard_80387_constant_p (VALUE) : 0)/* Place additional restrictions on the register class to use when it   is necessary to be able to hold a value of mode MODE in a reload   register for which class CLASS would ordinarily be used. */#define LIMIT_RELOAD_CLASS(MODE, CLASS) \  ((MODE) == QImode && ((CLASS) == ALL_REGS || (CLASS) == GENERAL_REGS) \   ? Q_REGS : (CLASS))/* 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 the 80386 series, we prevent floating constants from being   reloaded into floating registers (since no move-insn can do that)   and we ensure that QImodes aren't reloaded into the esi or edi reg.  *//* Put float CONST_DOUBLE in the constant pool instead of fp regs.   QImode must go into class Q_REGS.   Narrow ALL_REGS to GENERAL_REGS.  This supports allowing movsf and   movdf to do mem-to-mem moves through integer regs. */#define PREFERRED_RELOAD_CLASS(X,CLASS)					\  (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != VOIDmode		\   ? (standard_80387_constant_p (X)					\      ? reg_class_subset_p (CLASS, FLOAT_REGS) ? CLASS : FLOAT_REGS	\      : NO_REGS)							\   : GET_MODE (X) == QImode && ! reg_class_subset_p (CLASS, Q_REGS) ? Q_REGS \   : ((CLASS) == ALL_REGS						\      && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT) ? GENERAL_REGS	\   : (CLASS))/* If we are copying between general and FP registers, we need a memory   location.  */#define SECONDARY_MEMORY_NEEDED(CLASS1,CLASS2,MODE) \  ((FLOAT_CLASS_P (CLASS1) && ! FLOAT_CLASS_P (CLASS2))	\   || (! FLOAT_CLASS_P (CLASS1) && FLOAT_CLASS_P (CLASS2)))/* Return the maximum number of consecutive registers   needed to represent mode MODE in a register of class CLASS.  *//* On the 80386, 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)	\ (FLOAT_CLASS_P (CLASS) ? 1 :		\  ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))/* A C expression whose value is nonzero if pseudos that have been   assigned to registers of class CLASS would likely be spilled   because registers of CLASS are needed for spill registers.   The default value of this macro returns 1 if CLASS has exactly one   register and zero otherwise.  On most machines, this default   should be used.  Only define this macro to some other expression   if pseudo allocated by `local-alloc.c' end up in memory because   their hard registers were needed for spill registers.  If this   macro returns nonzero for those classes, those pseudos will only   be allocated by `global.c', which knows how to reallocate the   pseudo to another register.  If there would not be another   register available for reallocation, you should not change the   definition of this macro since the only effect of such a   definition would be to slow down register allocation.  */#define CLASS_LIKELY_SPILLED_P(CLASS)					\  (((CLASS) == AREG)							\   || ((CLASS) == DREG)							\

⌨️ 快捷键说明

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