📄 tm.texi
字号:
@item PCC_BITFIELD_TYPE_MATTERSDefine this if you wish to imitate the way many other C compilers handlealignment of bitfields and the structures that contain them.The behavior is that the type written for a bitfield (@code{int},@code{short}, or other integer type) imposes an alignment for theentire structure, as if the structure really did contain an ordinaryfield of that type. In addition, the bitfield is placed within thestructure so that it would fit within such a field, not crossing aboundary for it.Thus, on most machines, a bitfield whose type is written as @code{int}would not cross a four-byte boundary, and would force four-bytealignment for the whole structure. (The alignment used may not be fourbytes; it is controlled by the other alignment parameters.)If the macro is defined, its definition should be a C expression;a nonzero value for the expression enables this behavior.Note that if this macro is not defined, or its value is zero, somebitfields may cross more than one alignment boundary. The compiler cansupport such references if there are @samp{insv}, @samp{extv}, and@samp{extzv} insns that can directly reference memory.The other known way of making bitfields work is to define@code{STRUCTURE_SIZE_BOUNDARY} as large as @code{BIGGEST_ALIGNMENT}.Then every structure can be accessed with fullwords.Unless the machine has bitfield instructions or you define@code{STRUCTURE_SIZE_BOUNDARY} that way, you must define@code{PCC_BITFIELD_TYPE_MATTERS} to have a nonzero value.If your aim is to make GNU CC use the same conventions for laying outbitfields as are used by another compiler, here is how to investigatewhat the other compiler does. Compile and run this program:@examplestruct foo1@{ char x; char :0; char y;@};struct foo2@{ char x; int :0; char y;@};main ()@{ printf ("Size of foo1 is %d\n", sizeof (struct foo1)); printf ("Size of foo2 is %d\n", sizeof (struct foo2)); exit (0);@}@end exampleIf this prints 2 and 5, then the compiler's behavior is what you wouldget from @code{PCC_BITFIELD_TYPE_MATTERS}.@findex BITFIELD_NBYTES_LIMITED@item BITFIELD_NBYTES_LIMITEDLike PCC_BITFIELD_TYPE_MATTERS except that its effect is limited toaligning a bitfield within the structure.@findex ROUND_TYPE_SIZE@item ROUND_TYPE_SIZE (@var{struct}, @var{size}, @var{align})Define this macro as an expression for the overall size of a structure (given by @var{struct} as a tree node) when the size computed from thefields is @var{size} and the alignment is @var{align}.The default is to round @var{size} up to a multiple of @var{align}.@findex ROUND_TYPE_ALIGN@item ROUND_TYPE_ALIGN (@var{struct}, @var{computed}, @var{specified})Define this macro as an expression for the alignment of a structure (given by @var{struct} as a tree node) if the alignment computed in theusual way is @var{computed} and the alignment explicitly specified was@var{specified}.The default is to use @var{specified} if it is larger; otherwise, usethe smaller of @var{computed} and @code{BIGGEST_ALIGNMENT}@findex MAX_FIXED_MODE_SIZE@item MAX_FIXED_MODE_SIZEAn integer expression for the size in bits of the largest integermachine mode that should actually be used. All integer machine modes ofthis size or smaller can be used for structures and unions with theappropriate sizes. If this macro is undefined, @code{GET_MODE_BITSIZE(DImode)} is assumed.@findex CHECK_FLOAT_VALUE@item CHECK_FLOAT_VALUE (@var{mode}, @var{value})A C statement to validate the value @var{value} (of type@code{double}) for mode @var{mode}. This means that you check whether@var{value} fits within the possible range of values for mode@var{mode} on this target machine. The mode @var{mode} is always@code{SFmode} or @code{DFmode}.@findex errorIf @var{value} is not valid, you should call @code{error} to print anerror message and then assign some valid value to @var{value}.Allowing an invalid value to go through the compiler can produceincorrect assembler code which may even cause Unix assemblers tocrash.This macro need not be defined if there is no work for it to do.@findex TARGET_FLOAT_FORMAT@item TARGET_FLOAT_FORMATA code distinguishing the floating point format of the target machine.There are three defined values:@table @code@findex IEEE_FLOAT_FORMAT@item IEEE_FLOAT_FORMATThis code indicates IEEE floating point. It is the default; there is noneed to define this macro when the format is IEEE.@findex VAX_FLOAT_FORMAT@item VAX_FLOAT_FORMATThis code indicates the peculiar format used on the Vax.@findex UNKNOWN_FLOAT_FORMAT@item UNKNOWN_FLOAT_FORMATThis code indicates any other format.@end tableThe value of this macro is compared with @code{HOST_FLOAT_FORMAT}(@pxref{Config}) to determine whether the target machine has the sameformat as the host machine. If any other formats are actually in use onsupported machines, new codes should be defined for them.@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 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 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.@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 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 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 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@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 register
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -