📄 i386.h
字号:
To avoid clobbering a call-saved register unnecessarily, we renumber the pic register when possible. The change is visible after the prologue has been emitted. */#define REAL_PIC_OFFSET_TABLE_REGNUM 3#define PIC_OFFSET_TABLE_REGNUM \ (TARGET_64BIT || !flag_pic ? INVALID_REGNUM \ : reload_completed ? REGNO (pic_offset_table_rtx) \ : REAL_PIC_OFFSET_TABLE_REGNUM)#define GOT_SYMBOL_NAME "_GLOBAL_OFFSET_TABLE_"/* 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) \ ix86_return_in_memory (TYPE)/* This is overridden by <cygwin.h>. */#define MS_AGGREGATE_RETURN 0/* This is overridden by <netware.h>. */#define KEEP_AGGREGATE_RETURN_POINTER 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. 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. The flags and fpsr registers are in no class. */enum reg_class{ NO_REGS, AREG, DREG, CREG, BREG, SIREG, DIREG, AD_REGS, /* %eax/%edx for DImode */ Q_REGS, /* %eax %ebx %ecx %edx */ NON_Q_REGS, /* %esi %edi %ebp %esp */ INDEX_REGS, /* %eax %ebx %ecx %edx %esi %edi %ebp */ LEGACY_REGS, /* %eax %ebx %ecx %edx %esi %edi %ebp %esp */ GENERAL_REGS, /* %eax %ebx %ecx %edx %esi %edi %ebp %esp %r8 - %r15*/ FP_TOP_REG, FP_SECOND_REG, /* %st(0) %st(1) */ FLOAT_REGS, SSE_REGS, MMX_REGS, FP_TOP_SSE_REGS, FP_SECOND_SSE_REGS, FLOAT_SSE_REGS, FLOAT_INT_REGS, INT_SSE_REGS, FLOAT_INT_SSE_REGS, ALL_REGS, LIM_REG_CLASSES};#define N_REG_CLASSES ((int) LIM_REG_CLASSES)#define INTEGER_CLASS_P(CLASS) \ reg_class_subset_p ((CLASS), GENERAL_REGS)#define FLOAT_CLASS_P(CLASS) \ reg_class_subset_p ((CLASS), FLOAT_REGS)#define SSE_CLASS_P(CLASS) \ ((CLASS) == SSE_REGS)#define MMX_CLASS_P(CLASS) \ ((CLASS) == MMX_REGS)#define MAYBE_INTEGER_CLASS_P(CLASS) \ reg_classes_intersect_p ((CLASS), GENERAL_REGS)#define MAYBE_FLOAT_CLASS_P(CLASS) \ reg_classes_intersect_p ((CLASS), FLOAT_REGS)#define MAYBE_SSE_CLASS_P(CLASS) \ reg_classes_intersect_p (SSE_REGS, (CLASS))#define MAYBE_MMX_CLASS_P(CLASS) \ reg_classes_intersect_p (MMX_REGS, (CLASS))#define Q_CLASS_P(CLASS) \ reg_class_subset_p ((CLASS), Q_REGS)/* Give names of register classes as strings for dump file. */#define REG_CLASS_NAMES \{ "NO_REGS", \ "AREG", "DREG", "CREG", "BREG", \ "SIREG", "DIREG", \ "AD_REGS", \ "Q_REGS", "NON_Q_REGS", \ "INDEX_REGS", \ "LEGACY_REGS", \ "GENERAL_REGS", \ "FP_TOP_REG", "FP_SECOND_REG", \ "FLOAT_REGS", \ "SSE_REGS", \ "MMX_REGS", \ "FP_TOP_SSE_REGS", \ "FP_SECOND_SSE_REGS", \ "FLOAT_SSE_REGS", \ "FLOAT_INT_REGS", \ "INT_SSE_REGS", \ "FLOAT_INT_SSE_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 \{ { 0x00, 0x0 }, \ { 0x01, 0x0 }, { 0x02, 0x0 }, /* AREG, DREG */ \ { 0x04, 0x0 }, { 0x08, 0x0 }, /* CREG, BREG */ \ { 0x10, 0x0 }, { 0x20, 0x0 }, /* SIREG, DIREG */ \ { 0x03, 0x0 }, /* AD_REGS */ \ { 0x0f, 0x0 }, /* Q_REGS */ \ { 0x1100f0, 0x1fe0 }, /* NON_Q_REGS */ \ { 0x7f, 0x1fe0 }, /* INDEX_REGS */ \ { 0x1100ff, 0x0 }, /* LEGACY_REGS */ \ { 0x1100ff, 0x1fe0 }, /* GENERAL_REGS */ \ { 0x100, 0x0 }, { 0x0200, 0x0 },/* FP_TOP_REG, FP_SECOND_REG */\ { 0xff00, 0x0 }, /* FLOAT_REGS */ \{ 0x1fe00000,0x1fe000 }, /* SSE_REGS */ \{ 0xe0000000, 0x1f }, /* MMX_REGS */ \{ 0x1fe00100,0x1fe000 }, /* FP_TOP_SSE_REG */ \{ 0x1fe00200,0x1fe000 }, /* FP_SECOND_SSE_REG */ \{ 0x1fe0ff00,0x1fe000 }, /* FLOAT_SSE_REGS */ \ { 0x1ffff, 0x1fe0 }, /* FLOAT_INT_REGS */ \{ 0x1fe100ff,0x1fffe0 }, /* INT_SSE_REGS */ \{ 0x1fe1ffff,0x1fffe0 }, /* FLOAT_INT_SSE_REGS */ \{ 0xffffffff,0x1fffff } \}/* 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 GENERAL_REGNO_P(N) \ ((N) < 8 || REX_INT_REGNO_P (N))#define GENERAL_REG_P(X) \ (REG_P (X) && GENERAL_REGNO_P (REGNO (X)))#define ANY_QI_REG_P(X) (TARGET_64BIT ? GENERAL_REG_P(X) : QI_REG_P (X))#define NON_QI_REG_P(X) \ (REG_P (X) && REGNO (X) >= 4 && REGNO (X) < FIRST_PSEUDO_REGISTER)#define REX_INT_REGNO_P(N) ((N) >= FIRST_REX_INT_REG && (N) <= LAST_REX_INT_REG)#define REX_INT_REG_P(X) (REG_P (X) && REX_INT_REGNO_P (REGNO (X)))#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 ANY_FP_REG_P(X) (REG_P (X) && ANY_FP_REGNO_P (REGNO (X)))#define ANY_FP_REGNO_P(N) (FP_REGNO_P (N) || SSE_REGNO_P (N))#define SSE_REGNO_P(N) \ (((N) >= FIRST_SSE_REG && (N) <= LAST_SSE_REG) \ || ((N) >= FIRST_REX_SSE_REG && (N) <= LAST_REX_SSE_REG))#define REX_SSE_REGNO_P(N) \ ((N) >= FIRST_REX_SSE_REG && (N) <= LAST_REX_SSE_REG)#define SSE_REGNO(N) \ ((N) < 8 ? FIRST_SSE_REG + (N) : FIRST_REX_SSE_REG + (N) - 8)#define SSE_REG_P(N) (REG_P (N) && SSE_REGNO_P (REGNO (N)))#define SSE_FLOAT_MODE_P(MODE) \ ((TARGET_SSE && (MODE) == SFmode) || (TARGET_SSE2 && (MODE) == DFmode))#define MMX_REGNO_P(N) ((N) >= FIRST_MMX_REG && (N) <= LAST_MMX_REG)#define MMX_REG_P(XOP) (REG_P (XOP) && MMX_REGNO_P (REGNO (XOP)))#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)#define CC_REG_P(X) (REG_P (X) && CC_REGNO_P (REGNO (X)))#define CC_REGNO_P(X) ((X) == FLAGS_REG || (X) == FPSR_REG)/* The class value for index registers, and the one for base regs. */#define INDEX_REG_CLASS INDEX_REGS#define BASE_REG_CLASS GENERAL_REGS/* Unused letters: B TU W h jk vw z*//* Get reg_class from a letter such as appears in the machine description. */#define REG_CLASS_FROM_LETTER(C) \ ((C) == 'r' ? GENERAL_REGS : \ (C) == 'R' ? LEGACY_REGS : \ (C) == 'q' ? TARGET_64BIT ? GENERAL_REGS : Q_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) == 'x' ? TARGET_SSE ? SSE_REGS : NO_REGS : \ (C) == 'Y' ? TARGET_SSE2? SSE_REGS : NO_REGS : \ (C) == 'y' ? TARGET_MMX ? MMX_REGS : NO_REGS : \ (C) == 'A' ? AD_REGS : \ (C) == 'D' ? DIREG : \ (C) == 'S' ? SIREG : \ (C) == 'l' ? INDEX_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. I is for non-DImode shifts. J is for DImode shifts. K is for signed imm8 operands. L is for andsi as zero-extending move. M is for shifts that can be executed by the "lea" opcode. N is for immediate operands for out/in instructions (0-255) */#define CONST_OK_FOR_LETTER_P(VALUE, C) \ ((C) == 'I' ? (VALUE) >= 0 && (VALUE) <= 31 \ : (C) == 'J' ? (VALUE) >= 0 && (VALUE) <= 63 \ : (C) == 'K' ? (VALUE) >= -128 && (VALUE) <= 127 \ : (C) == 'L' ? (VALUE) == 0xff || (VALUE) == 0xffff \ : (C) == 'M' ? (VALUE) >= 0 && (VALUE) <= 3 \ : (C) == 'N' ? (VALUE) >= 0 && (VALUE) <= 255 \ : 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)/* A C expression that defines the optional machine-dependent constraint letters that can be used to segregate specific types of operands, usually memory references, for the target machine. Any letter that is not elsewhere defined and not matched by `REG_CLASS_FROM_LETTER' may be used. Normally this macro will not be defined. If it is required for a particular target machine, it should return 1 if VALUE corresponds to the operand type represented by the constraint letter C. If C is not defined as an extra constraint, the value returned should be 0 regardless of VALUE. */#define EXTRA_CONSTRAINT(VALUE, D) \ ((D) == 'e' ? x86_64_immediate_operand (VALUE, VOIDmode) \ : (D) == 'Z' ? x86_64_zext_immediate_operand (VALUE, VOIDmode) \ : (D) == 'C' ? standard_sse_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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -