📄 tm.texi
字号:
Do not define this macro if it would never modify @var{m}.@findex PROMOTE_FUNCTION_ARGS@item PROMOTE_FUNCTION_ARGSDefine this macro if the promotion described by @code{PROMOTE_MODE}should also be done for outgoing function arguments. @findex PROMOTE_FUNCTION_RETURN@item PROMOTE_FUNCTION_RETURNDefine this macro if the promotion described by @code{PROMOTE_MODE}should also be done for the return value of functions.If this macro is defined, @code{FUNCTION_VALUE} must perform the samepromotions done by @code{PROMOTE_MODE}.@findex PROMOTE_FOR_CALL_ONLY@item PROMOTE_FOR_CALL_ONLYDefine this macro if the promotion described by @code{PROMOTE_MODE}should @emph{only} be performed for outgoing function arguments orfunction return values, as specified by @code{PROMOTE_FUNCTION_ARGS}and @code{PROMOTE_FUNCTION_RETURN}, respectively.@findex PARM_BOUNDARY@item PARM_BOUNDARYNormal alignment required for function parameters on the stack, inbits. All stack parameters receive at least this much alignmentregardless of data type. On most machines, this is the same as thesize of an integer.@findex STACK_BOUNDARY@item STACK_BOUNDARYDefine this macro if you wish to preserve a certain alignment forthe stack pointer. The definition is a C expressionfor the desired alignment (measured in bits).@cindex @code{PUSH_ROUNDING}, interaction with @code{STACK_BOUNDARY}If @code{PUSH_ROUNDING} is not defined, the stack will always be alignedto the specified boundary. If @code{PUSH_ROUNDING} is defined and specifies aless strict alignment than @code{STACK_BOUNDARY}, the stack may bemomentarily unaligned while pushing arguments.@findex FUNCTION_BOUNDARY@item FUNCTION_BOUNDARYAlignment required for a function entry point, in bits.@findex BIGGEST_ALIGNMENT@item BIGGEST_ALIGNMENTBiggest alignment that any data type can require on this machine, in bits.@findex BIGGEST_FIELD_ALIGNMENT@item BIGGEST_FIELD_ALIGNMENTBiggest alignment that any structure field can require on this machine,in bits. If defined, this overrides @code{BIGGEST_ALIGNMENT} forstructure fields only.@findex MAX_OFILE_ALIGNMENT@item MAX_OFILE_ALIGNMENTBiggest alignment supported by the object file format of this machine.Use this macro to limit the alignment which can be specified using the@code{__attribute__ ((aligned (@var{n})))} construct. If not defined,the default value is @code{BIGGEST_ALIGNMENT}.@findex DATA_ALIGNMENT@item DATA_ALIGNMENT (@var{type}, @var{basic-align})If defined, a C expression to compute the alignment for a staticvariable. @var{type} is the data type, and @var{basic-align} is thealignment that the object would ordinarily have. The value of thismacro is used instead of that alignment to align the object.If this macro is not defined, then @var{basic-align} is used.@findex strcpyOne use of this macro is to increase alignment of medium-size data tomake it all fit in fewer cache lines. Another is to cause characterarrays to be word-aligned so that @code{strcpy} calls that copyconstants to character arrays can be done inline.@findex CONSTANT_ALIGNMENT@item CONSTANT_ALIGNMENT (@var{constant}, @var{basic-align})If defined, a C expression to compute the alignment given to a constantthat is being placed in memory. @var{constant} is the constant and@var{basic-align} is the alignment that the object would ordinarilyhave. The value of this macro is used instead of that alignment toalign the object.If this macro is not defined, then @var{basic-align} is used.The typical use of this macro is to increase alignment for stringconstants to be word aligned so that @code{strcpy} calls that copyconstants can be done inline.@findex EMPTY_FIELD_BOUNDARY@item EMPTY_FIELD_BOUNDARYAlignment in bits to be given to a structure bit field that follows anempty field such as @code{int : 0;}.Note that @code{PCC_BITFIELD_TYPE_MATTERS} also affects the alignmentthat results from an empty field.@findex STRUCTURE_SIZE_BOUNDARY@item STRUCTURE_SIZE_BOUNDARYNumber of bits which any structure or union's size must be a multiple of.Each structure or union's size is rounded up to a multiple of this.If you do not define this macro, the default is the same as@code{BITS_PER_UNIT}.@findex STRICT_ALIGNMENT@item STRICT_ALIGNMENTDefine this macro to be the value 1 if instructions will fail to workif given data not on the nominal alignment. If instructions will merelygo slower in that case, define this macro as 0.@findex PCC_BITFIELD_TYPE_MATTERS@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}, @var{overflow})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 alwaysa mode of class @code{MODE_FLOAT}. @var{overflow} is nonzero ifthe value is already known to be out of range.If @var{value} is not valid or if @var{overflow} is nonzero, you shouldset @var{overflow} to 1 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 to crash.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.The ordering of the component words of floating point values stored inmemory is controlled by @code{FLOAT_WORDS_BIG_ENDIAN} for the targetmachine and @code{HOST_FLOAT_WORDS_BIG_ENDIAN} for the host.@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_SIZE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -