📄 tm.texi
字号:
A C expression for the size in bits of the type @code{long double} onthe target machine. If you don't define this, the default is twowords.@findex DEFAULT_SIGNED_CHAR@item DEFAULT_SIGNED_CHARAn expression whose value is 1 or 0, according to whether the type@code{char} should be signed or unsigned by default. The user canalways override this default with the options @samp{-fsigned-char}and @samp{-funsigned-char}.@findex DEFAULT_SHORT_ENUMS@item DEFAULT_SHORT_ENUMSA C expression to determine whether to give an @code{enum} type only as many bytes as it takes to represent the range of possible valuesof that type. A nonzero value means to do that; a zero value means all@code{enum} types should be allocated like @code{int}.If you don't define the macro, the default is 0.@findex SIZE_TYPE@item SIZE_TYPEA C expression for a string describing the name of the data type to usefor size values. The typedef name @code{size_t} is defined using thecontents of the string.The string can contain more than one keyword. If so, separate them withspaces, and write first any length keyword, then @code{unsigned} ifappropriate, and finally @code{int}. The string must exactly match oneof the data type names defined in the function@code{init_decl_processing} in the file @file{c-decl.c}. You may notomit @code{int} or change the order---that would cause the compiler tocrash on startup.If you don't define this macro, the default is @code{"long unsignedint"}.@findex PTRDIFF_TYPE@item PTRDIFF_TYPEA C expression for a string describing the name of the data type to usefor the result of subtracting two pointers. The typedef name@code{ptrdiff_t} is defined using the contents of the string. See@code{SIZE_TYPE} above for more information.If you don't define this macro, the default is @code{"long int"}.@findex WCHAR_TYPE@item WCHAR_TYPEA C expression for a string describing the name of the data type to usefor wide characters. The typedef name @code{wchar_t} is defined usingthe contents of the string. See @code{SIZE_TYPE} above for moreinformation.If you don't define this macro, the default is @code{"int"}.@findex WCHAR_TYPE_SIZE@item WCHAR_TYPE_SIZEA C expression for the size in bits of the data type for widecharacters. This is used in @code{cpp}, which cannot make use of@code{WCHAR_TYPE}.@findex MAX_WCHAR_TYPE_SIZE@item MAX_WCHAR_TYPE_SIZEMaximum number for the size in bits of the data type for widecharacters. If this is undefined, the default is@code{WCHAR_TYPE_SIZE}. Otherwise, it is the constant value that is thelargest value that @code{WCHAR_TYPE_SIZE} can have at run-time. This isused in @code{cpp}.@findex OBJC_INT_SELECTORS@item OBJC_INT_SELECTORSDefine this macro if the type of Objective C selectors should be@code{int}.If this macro is not defined, then selectors should have the type@code{struct objc_selector *}.@findex OBJC_SELECTORS_WITHOUT_LABELS@item OBJC_SELECTORS_WITHOUT_LABELSDefine this macro if the compiler can group all the selectors togetherinto a vector and use just one label at the beginning of the vector.Otherwise, the compiler must give each selector its own assemblerlabel.On certain machines, it is important to have a separate label for eachselector because this enables the linker to eliminate duplicate selectors.@findex TARGET_BELL@item TARGET_BELLA C constant expression for the integer value for escape sequence@samp{\a}.@findex TARGET_TAB@findex TARGET_BS@findex TARGET_NEWLINE@item TARGET_BS@itemx TARGET_TAB@itemx TARGET_NEWLINEC constant expressions for the integer values for escape sequences@samp{\b}, @samp{\t} and @samp{\n}.@findex TARGET_VT@findex TARGET_FF@findex TARGET_CR@item TARGET_VT@itemx TARGET_FF@itemx TARGET_CRC constant expressions for the integer values for escape sequences@samp{\v}, @samp{\f} and @samp{\r}.@end table@node Registers@section Register Usage@cindex register usageThis section explains how to describe what registers the target machinehas, and how (in general) they can be used.The description of which registers a specific instruction can use isdone with register classes; see @ref{Register Classes}. For informationon using registers to access a stack frame, see @ref{Frame Registers}.For passing values in registers, see @ref{Register Arguments}.For returning values in registers, see @ref{Scalar Return}.@menu* Register Basics:: Number and kinds of registers.* Allocation Order:: Order in which registers are allocated.* Values in Registers:: What kinds of values each reg can hold.* Leaf Functions:: Renumbering registers for leaf functions.* Stack Registers:: Handling a register stack such as 80387.* Obsolete Register Macros:: Macros formerly used for the 80387.@end menu@node Register Basics@subsection Basic Characteristics of Registers@c prevent bad page break with this lineRegisters have various characteristics.@table @code@findex FIRST_PSEUDO_REGISTER@item FIRST_PSEUDO_REGISTERNumber of hardware registers known to the compiler. They receivenumbers 0 through @code{FIRST_PSEUDO_REGISTER-1}; thus, the firstpseudo register's number really is assigned the number@code{FIRST_PSEUDO_REGISTER}.@item FIXED_REGISTERS@findex FIXED_REGISTERS@cindex fixed registerAn initializer that says which registers are used for fixed purposesall throughout the compiled code and are therefore not available forgeneral allocation. These would include the stack pointer, the framepointer (except on machines where that can be used as a generalregister when no frame pointer is needed), the program counter onmachines where that is considered one of the addressable registers,and any other numbered register with a standard use.This information is expressed as a sequence of numbers, separated bycommas and surrounded by braces. The @var{n}th number is 1 ifregister @var{n} is fixed, 0 otherwise.The table initialized from this macro, and the table initialized bythe following one, may be overridden at run time either automatically,by the actions of the macro @code{CONDITIONAL_REGISTER_USAGE}, or bythe user with the command options @samp{-ffixed-@var{reg}},@samp{-fcall-used-@var{reg}} and @samp{-fcall-saved-@var{reg}}.@findex CALL_USED_REGISTERS@item CALL_USED_REGISTERS@cindex call-used register@cindex call-clobbered register@cindex call-saved registerLike @code{FIXED_REGISTERS} but has 1 for each register that isclobbered (in general) by function calls as well as for fixedregisters. This macro therefore identifies the registers that are notavailable for general allocation of values that must live acrossfunction calls.If a register has 0 in @code{CALL_USED_REGISTERS}, the compilerautomatically saves it on function entry and restores it on functionexit, if the register is used within the function.@findex CONDITIONAL_REGISTER_USAGE@findex fixed_regs@findex call_used_regs@item CONDITIONAL_REGISTER_USAGEZero or more C statements that may conditionally modify two variables@code{fixed_regs} and @code{call_used_regs} (both of type @code{char[]}) after they have been initialized from the two preceding macros.This is necessary in case the fixed or call-clobbered registers dependon target flags.You need not define this macro if it has no work to do.@cindex disabling certain registers@cindex controlling register usage If the usage of an entire class of registers depends on the targetflags, you may indicate this to GCC by using this macro to modify@code{fixed_regs} and @code{call_used_regs} to 1 for each of theregisters in the classes which should not be used by GCC. Also definethe macro @code{REG_CLASS_FROM_LETTER} to return @code{NO_REGS} if itis called with a letter for a class that shouldn't be used.(However, if this class is not included in @code{GENERAL_REGS} and allof the insn patterns whose constraints permit this class arecontrolled by target switches, then GCC will automatically avoid usingthese registers when the target switches are opposed to them.)@findex NON_SAVING_SETJMP@item NON_SAVING_SETJMPIf this macro is defined and has a nonzero value, it means that@code{setjmp} and related functions fail to save the registers, or that@code{longjmp} fails to restore them. To compensate, the compileravoids putting variables in registers in functions that use@code{setjmp}.@findex INCOMING_REGNO@item INCOMING_REGNO (@var{out})Define this macro if the target machine has register windows. This Cexpression returns the register number as seen by the called functioncorresponding to the register number @var{out} as seen by the callingfunction. Return @var{out} if register number @var{out} is not anoutbound register.@findex OUTGOING_REGNO@item OUTGOING_REGNO (@var{in})Define this macro if the target machine has register windows. This Cexpression returns the register number as seen by the calling functioncorresponding to the register number @var{in} as seen by the calledfunction. Return @var{in} if register number @var{in} is not an inboundregister.@ignore@findex PC_REGNUM@item PC_REGNUMIf the program counter has a register number, define this as thatregister number. Otherwise, do not define it.@end ignore@end table@node Allocation Order@subsection Order of Allocation of Registers@cindex order of register allocation@cindex register allocation order@c prevent bad page break with this lineRegisters are allocated in order.@table @code@findex REG_ALLOC_ORDER@item REG_ALLOC_ORDERIf defined, an initializer for a vector of integers, containing thenumbers of hard registers in the order in which GNU CC should preferto use them (from most preferred to least).If this macro is not defined, registers are used lowest numbered first(all else being equal).One use of this macro is on machines where the highest numberedregisters must always be saved and the save-multiple-registersinstruction supports only sequences of consecutive registers. On suchmachines, define @code{REG_ALLOC_ORDER} to be an initializer that liststhe highest numbered allocatable register first.@findex ORDER_REGS_FOR_LOCAL_ALLOC@item ORDER_REGS_FOR_LOCAL_ALLOCA C statement (sans semicolon) to choose the order in which to allocatehard registers for pseudo-registers local to a basic block.Store the desired register order in the array @code{reg_alloc_order}.Element 0 should be the register to allocate first; element 1, the nextregister; and so on.The macro body should not assume anything about the contents of@code{reg_alloc_order} before execution of the macro.On most machines, it is not necessary to define this macro.@end table@node Values in Registers@subsection How Values Fit in RegistersThis section discusses the macros that describe which kinds of values(specifically, which machine modes) each register can hold, and how manyconsecutive registers are needed for a given mode.@table @code@findex HARD_REGNO_NREGS@item HARD_REGNO_NREGS (@var{regno}, @var{mode})A C expression for the number of consecutive hard registers, startingat register number @var{regno}, required to hold a value of mode@var{mode}.On a machine where all registers are exactly one word, a suitabledefinition of this macro is@smallexample#define HARD_REGNO_NREGS(REGNO, MODE) \ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \ / UNITS_PER_WORD))@end smallexample@findex HARD_REGNO_MODE_OK@item HARD_REGNO_MODE_OK (@var{regno}, @var{mode})A C expression that is nonzero if it is permissible to store a valueof mode @var{mode} in hard register number @var{regno} (or in severalregisters starting with that one). For a machine where all registersare equivalent, a suitable definition is@smallexample#define HARD_REGNO_MODE_OK(REGNO, MODE) 1@end smallexampleIt is not necessary for this macro to check for the numbers of fixedregisters, because the allocation mechanism considers them to be alwaysoccupied.@cindex register pairsOn some machines, double-precision values must be kept in even/oddregister pairs. The way to implement that is to define this macroto reject odd register numbers for such modes.@ignore@c I think this is not true nowGNU CC assumes that it can always move values between registers and(suitably addressed) memory locations. If it is impossible to move avalue of a certain mode between memory and certain registers, then@code{HARD_REGNO_MODE_OK} must not allow this mode in those registers.@end ignore
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -