📄 tm.texi
字号:
@findex DEFAULT_VTABLE_THUNKS@item DEFAULT_VTABLE_THUNKSGNU CC supports two ways of implementing C++ vtables: traditional or withso-called ``thunks''. The flag @samp{-fvtable-thunk} chooses between them.Define this macro to be a C expression for the default value of that flag.If @code{DEFAULT_VTABLE_THUNKS} is 0, GNU CC uses the traditionalimplementation by default. The ``thunk'' implementation is more efficient(especially if you have provided an implementation of@code{ASM_OUTPUT_MI_THUNK}, see @ref{Function Entry}), but is not binarycompatible with code compiled using the traditional implementation. If you are writing a new ports, define @code{DEFAULT_VTABLE_THUNKS} to 1.If you do not define this macro, the default for @samp{-fvtable-thunk} is 0.@end table@node Type Layout@section Layout of Source Language Data TypesThese macros define the sizes and other characteristics of the standardbasic data types used in programs being compiled. Unlike the macros inthe previous section, these apply to specific features of C and relatedlanguages, rather than to fundamental aspects of storage layout.@table @code@findex INT_TYPE_SIZE@item INT_TYPE_SIZEA C expression for the size in bits of the type @code{int} on thetarget machine. If you don't define this, the default is one word.@findex MAX_INT_TYPE_SIZE@item MAX_INT_TYPE_SIZEMaximum number for the size in bits of the type @code{int} on the targetmachine. If this is undefined, the default is @code{INT_TYPE_SIZE}.Otherwise, it is the constant value that is the largest value that@code{INT_TYPE_SIZE} can have at run-time. This is used in @code{cpp}.@findex SHORT_TYPE_SIZE@item SHORT_TYPE_SIZEA C expression for the size in bits of the type @code{short} on thetarget machine. If you don't define this, the default is half a word.(If this would be less than one storage unit, it is rounded up to oneunit.)@findex LONG_TYPE_SIZE@item LONG_TYPE_SIZEA C expression for the size in bits of the type @code{long} on thetarget machine. If you don't define this, the default is one word.@findex MAX_LONG_TYPE_SIZE@item MAX_LONG_TYPE_SIZEMaximum number for the size in bits of the type @code{long} on thetarget machine. If this is undefined, the default is@code{LONG_TYPE_SIZE}. Otherwise, it is the constant value that is thelargest value that @code{LONG_TYPE_SIZE} can have at run-time. This isused in @code{cpp}.@findex LONG_LONG_TYPE_SIZE@item LONG_LONG_TYPE_SIZEA C expression for the size in bits of the type @code{long long} on thetarget machine. If you don't define this, the default is twowords. If you want to support GNU Ada on your machine, the value ofmacro must be at least 64.@findex CHAR_TYPE_SIZE@item CHAR_TYPE_SIZEA C expression for the size in bits of the type @code{char} on thetarget machine. If you don't define this, the default is one quarterof a word. (If this would be less than one storage unit, it is rounded upto one unit.)@findex MAX_CHAR_TYPE_SIZE@item MAX_CHAR_TYPE_SIZEMaximum number for the size in bits of the type @code{char} on thetarget machine. If this is undefined, the default is@code{CHAR_TYPE_SIZE}. Otherwise, it is the constant value that is thelargest value that @code{CHAR_TYPE_SIZE} can have at run-time. This isused in @code{cpp}.@findex FLOAT_TYPE_SIZE@item FLOAT_TYPE_SIZEA C expression for the size in bits of the type @code{float} on thetarget machine. If you don't define this, the default is one word.@findex DOUBLE_TYPE_SIZE@item DOUBLE_TYPE_SIZEA C expression for the size in bits of the type @code{double} on thetarget machine. If you don't define this, the default is twowords.@findex LONG_DOUBLE_TYPE_SIZE@item LONG_DOUBLE_TYPE_SIZEA 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 WIDEST_HARDWARE_FP_SIZE@item WIDEST_HARDWARE_FP_SIZEA C expression for the size in bits of the widest floating-point formatsupported by the hardware. If you define this macro, you must specify avalue less than or equal to the value of @code{LONG_DOUBLE_TYPE_SIZE}.If you do not define this macro, the value of @code{LONG_DOUBLE_TYPE_SIZE}is the default.@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} typeonly 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 usageIf 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.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -