📄 i386.h
字号:
SUBTARGET_EXTRA_SPECS/* target machine storage layout *//* Define for XFmode or TFmode extended real floating point support. The XFmode is specified by i386 ABI, while TFmode may be faster due to alignment and simplifications in the address calculations. */#define LONG_DOUBLE_TYPE_SIZE (TARGET_128BIT_LONG_DOUBLE ? 128 : 96)#define MAX_LONG_DOUBLE_TYPE_SIZE 128#ifdef __x86_64__#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128#else#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 96#endif/* Set the value of FLT_EVAL_METHOD in float.h. When using only the FPU, assume that the fpcw is set to extended precision; when using only SSE, rounding is correct; when using both SSE and the FPU, the rounding precision is indeterminate, since either may be chosen apparently at random. */#define TARGET_FLT_EVAL_METHOD \ (TARGET_MIX_SSE_I387 ? -1 : TARGET_SSE_MATH ? 1 : 2)#define SHORT_TYPE_SIZE 16#define INT_TYPE_SIZE 32#define FLOAT_TYPE_SIZE 32#define LONG_TYPE_SIZE BITS_PER_WORD#define MAX_WCHAR_TYPE_SIZE 32#define DOUBLE_TYPE_SIZE 64#define LONG_LONG_TYPE_SIZE 64#if defined (TARGET_BI_ARCH) || TARGET_64BIT_DEFAULT#define MAX_BITS_PER_WORD 64#define MAX_LONG_TYPE_SIZE 64#else#define MAX_BITS_PER_WORD 32#define MAX_LONG_TYPE_SIZE 32#endif/* Define this if most significant byte of a word is the lowest numbered. *//* That is true on the 80386. */#define BITS_BIG_ENDIAN 0/* Define this if most significant byte of a word is the lowest numbered. *//* That is not true on the 80386. */#define BYTES_BIG_ENDIAN 0/* Define this if most significant word of a multiword number is the lowest numbered. *//* Not true for 80386 */#define WORDS_BIG_ENDIAN 0/* Width of a word, in units (bytes). */#define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4)#ifdef IN_LIBGCC2#define MIN_UNITS_PER_WORD (TARGET_64BIT ? 8 : 4)#else#define MIN_UNITS_PER_WORD 4#endif/* Allocation boundary (in *bits*) for storing arguments in argument list. */#define PARM_BOUNDARY BITS_PER_WORD/* Boundary (in *bits*) on which stack pointer should be aligned. */#define STACK_BOUNDARY BITS_PER_WORD/* Boundary (in *bits*) on which the stack pointer preferrs to be aligned; the compiler cannot rely on having this alignment. */#define PREFERRED_STACK_BOUNDARY ix86_preferred_stack_boundary/* As of July 2001, many runtimes to not align the stack properly when entering main. This causes expand_main_function to forcably align the stack, which results in aligned frames for functions called from main, though it does nothing for the alignment of main itself. */#define FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN \ (ix86_preferred_stack_boundary > STACK_BOUNDARY && !TARGET_64BIT)/* Minimum allocation boundary for the code of a function. */#define FUNCTION_BOUNDARY 8/* C++ stores the virtual bit in the lowest bit of function pointers. */#define TARGET_PTRMEMFUNC_VBIT_LOCATION ptrmemfunc_vbit_in_pfn/* Alignment of field after `int : 0' in a structure. */#define EMPTY_FIELD_BOUNDARY BITS_PER_WORD/* Minimum size in bits of the largest boundary to which any and all fundamental data types supported by the hardware might need to be aligned. No data type wants to be aligned rounder than this. Pentium+ preferrs DFmode values to be aligned to 64 bit boundary and Pentium Pro XFmode values at 128 bit boundaries. */#define BIGGEST_ALIGNMENT 128/* Decide whether a variable of mode MODE should be 128 bit aligned. */#define ALIGN_MODE_128(MODE) \ ((MODE) == XFmode || (MODE) == TFmode || SSE_REG_MODE_P (MODE))/* The published ABIs say that doubles should be aligned on word boundaries, so lower the aligment for structure fields unless -malign-double is set. *//* ??? Blah -- this macro is used directly by libobjc. Since it supports no vector modes, cut out the complexity and fall back on BIGGEST_FIELD_ALIGNMENT. */#ifdef IN_TARGET_LIBS#ifdef __x86_64__#define BIGGEST_FIELD_ALIGNMENT 128#else#define BIGGEST_FIELD_ALIGNMENT 32#endif#else#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \ x86_field_alignment (FIELD, COMPUTED)#endif/* If defined, a C expression to compute the alignment given to a constant that is being placed in memory. EXP is the constant and ALIGN is the alignment that the object would ordinarily have. The value of this macro is used instead of that alignment to align the object. If this macro is not defined, then ALIGN is used. The typical use of this macro is to increase alignment for string constants to be word aligned so that `strcpy' calls that copy constants can be done inline. */#define CONSTANT_ALIGNMENT(EXP, ALIGN) ix86_constant_alignment ((EXP), (ALIGN))/* If defined, a C expression to compute the alignment for a static variable. TYPE is the data type, and ALIGN is the alignment that the object would ordinarily have. The value of this macro is used instead of that alignment to align the object. If this macro is not defined, then ALIGN is used. One use of this macro is to increase alignment of medium-size data to make it all fit in fewer cache lines. Another is to cause character arrays to be word-aligned so that `strcpy' calls that copy constants to character arrays can be done inline. */#define DATA_ALIGNMENT(TYPE, ALIGN) ix86_data_alignment ((TYPE), (ALIGN))/* If defined, a C expression to compute the alignment for a local variable. TYPE is the data type, and ALIGN is the alignment that the object would ordinarily have. The value of this macro is used instead of that alignment to align the object. If this macro is not defined, then ALIGN is used. One use of this macro is to increase alignment of medium-size data to make it all fit in fewer cache lines. */#define LOCAL_ALIGNMENT(TYPE, ALIGN) ix86_local_alignment ((TYPE), (ALIGN))/* If defined, a C expression that gives the alignment boundary, in bits, of an argument with the specified mode and type. If it is not defined, `PARM_BOUNDARY' is used for all arguments. */#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ ix86_function_arg_boundary ((MODE), (TYPE))/* Set this nonzero if move instructions will actually fail to work when given unaligned data. */#define STRICT_ALIGNMENT 0/* If bit field type is int, don't let it cross an int, and give entire struct the alignment of an int. *//* Required on the 386 since it doesn't have bit-field insns. */#define PCC_BITFIELD_TYPE_MATTERS 1/* Standard register usage. *//* This processor has special stack-like registers. See reg-stack.c for details. */#define STACK_REGS#define IS_STACK_MODE(MODE) \ ((MODE) == DFmode || (MODE) == SFmode || (MODE) == XFmode \ || (MODE) == TFmode)/* 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. In the 80386 we give the 8 general purpose registers the numbers 0-7. We number the floating point registers 8-15. Note that registers 0-7 can be accessed as a short or int, while only 0-3 may be used with byte `mov' instructions. Reg 16 does not correspond to any hardware register, but instead appears in the RTL as an argument pointer prior to reload, and is eliminated during reloading in favor of either the stack or frame pointer. */#define FIRST_PSEUDO_REGISTER 53/* Number of hardware registers that go into the DWARF-2 unwind info. If not defined, equals FIRST_PSEUDO_REGISTER. */#define DWARF_FRAME_REGISTERS 17/* 1 for registers that have pervasive standard uses and are not available for the register allocator. On the 80386, the stack pointer is such, as is the arg pointer. The value is an mask - bit 1 is set for fixed registers for 32bit target, while 2 is set for fixed registers for 64bit. Proper value is computed in the CONDITIONAL_REGISTER_USAGE. */#define FIXED_REGISTERS \/*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7*/ \{ 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, \/*arg,flags,fpsr,dir,frame*/ \ 3, 3, 3, 3, 3, \/*xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7*/ \ 0, 0, 0, 0, 0, 0, 0, 0, \/*mmx0,mmx1,mmx2,mmx3,mmx4,mmx5,mmx6,mmx7*/ \ 0, 0, 0, 0, 0, 0, 0, 0, \/* r8, r9, r10, r11, r12, r13, r14, r15*/ \ 1, 1, 1, 1, 1, 1, 1, 1, \/*xmm8,xmm9,xmm10,xmm11,xmm12,xmm13,xmm14,xmm15*/ \ 1, 1, 1, 1, 1, 1, 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. The value is an mask - bit 1 is set for call used for 32bit target, while 2 is set for call used for 64bit. Proper value is computed in the CONDITIONAL_REGISTER_USAGE.*/#define CALL_USED_REGISTERS \/*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7*/ \{ 3, 3, 3, 0, 2, 2, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, \/*arg,flags,fpsr,dir,frame*/ \ 3, 3, 3, 3, 3, \/*xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7*/ \ 3, 3, 3, 3, 3, 3, 3, 3, \/*mmx0,mmx1,mmx2,mmx3,mmx4,mmx5,mmx6,mmx7*/ \ 3, 3, 3, 3, 3, 3, 3, 3, \/* r8, r9, r10, r11, r12, r13, r14, r15*/ \ 3, 3, 3, 3, 1, 1, 1, 1, \/*xmm8,xmm9,xmm10,xmm11,xmm12,xmm13,xmm14,xmm15*/ \ 3, 3, 3, 3, 3, 3, 3, 3} \/* Order in which to allocate registers. Each register must be listed once, even those in FIXED_REGISTERS. List frame pointer late and fixed registers last. Note that, in general, we prefer registers listed in CALL_USED_REGISTERS, keeping the others available for storage of persistent values. The ORDER_REGS_FOR_LOCAL_ALLOC actually overwrite the order, so this is just empty initializer for array. */#define REG_ALLOC_ORDER \{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,\ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, \ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, \ 48, 49, 50, 51, 52 }/* ORDER_REGS_FOR_LOCAL_ALLOC is a macro which permits reg_alloc_order to be rearranged based on a particular function. When using sse math, we want to allocase SSE before x87 registers and vice vera. */#define ORDER_REGS_FOR_LOCAL_ALLOC x86_order_regs_for_local_alloc ()/* Macro to conditionally modify fixed_regs/call_used_regs. */#define CONDITIONAL_REGISTER_USAGE \do { \ int i; \ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) \ { \ fixed_regs[i] = (fixed_regs[i] & (TARGET_64BIT ? 2 : 1)) != 0; \ call_used_regs[i] = (call_used_regs[i] \ & (TARGET_64BIT ? 2 : 1)) != 0; \ } \ if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM) \ { \ fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ } \ if (! TARGET_MMX) \ { \ int i; \ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) \ if (TEST_HARD_REG_BIT (reg_class_contents[(int)MMX_REGS], i)) \ fixed_regs[i] = call_used_regs[i] = 1; \ } \ if (! TARGET_SSE) \ { \ int i; \ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) \ if (TEST_HARD_REG_BIT (reg_class_contents[(int)SSE_REGS], i)) \ fixed_regs[i] = call_used_regs[i] = 1; \ } \ if (! TARGET_80387 && ! TARGET_FLOAT_RETURNS_IN_80387) \ { \ int i; \ HARD_REG_SET x; \ COPY_HARD_REG_SET (x, reg_class_contents[(int)FLOAT_REGS]); \ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) \ if (TEST_HARD_REG_BIT (x, i)) \ fixed_regs[i] = call_used_regs[i] = 1; \ } \ } while (0)/* 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.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -