⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tm.texi

📁 理解和实践操作系统的一本好书
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
@end defmac@deftypefn {Target Hook} bool TARGET_ALIGN_ANON_BITFIELDS (void)When @code{PCC_BITFIELD_TYPE_MATTERS} is true this hook will determinewhether unnamed bitfields affect the alignment of the containingstructure.  The hook should return true if the structure should inheritthe alignment requirements of an unnamed bitfield's type.@end deftypefn@deftypefn {Target Hook} bool TARGET_NARROW_VOLATILE_BITFIELDS (void)This target hook should return @code{true} if accesses to volatile bitfieldsshould use the narrowest mode possible.  It should return @code{false} ifthese accesses should use the bitfield container type.The default is @code{!TARGET_STRICT_ALIGN}.@end deftypefn@defmac MEMBER_TYPE_FORCES_BLK (@var{field}, @var{mode})Return 1 if a structure or array containing @var{field} should be accessed using@code{BLKMODE}.If @var{field} is the only field in the structure, @var{mode} is itsmode, otherwise @var{mode} is VOIDmode.  @var{mode} is provided in thecase where structures of one field would require the structure's mode toretain the field's mode.Normally, this is not needed.@end defmac@defmac ROUND_TYPE_ALIGN (@var{type}, @var{computed}, @var{specified})Define this macro as an expression for the alignment of a type (givenby @var{type} as a tree node) if the alignment computed in the usualway 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}@end defmac@defmac 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.@end defmac@defmac STACK_SAVEAREA_MODE (@var{save_level})If defined, an expression of type @code{enum machine_mode} thatspecifies the mode of the save area operand of a@code{save_stack_@var{level}} named pattern (@pxref{Standard Names}).@var{save_level} is one of @code{SAVE_BLOCK}, @code{SAVE_FUNCTION}, or@code{SAVE_NONLOCAL} and selects which of the three named patterns ishaving its mode specified.You need not define this macro if it always returns @code{Pmode}.  Youwould most commonly define this macro if the@code{save_stack_@var{level}} patterns need to support both a 32- and a64-bit mode.@end defmac@defmac STACK_SIZE_MODEIf defined, an expression of type @code{enum machine_mode} thatspecifies the mode of the size increment operand of an@code{allocate_stack} named pattern (@pxref{Standard Names}).You need not define this macro if it always returns @code{word_mode}.You would most commonly define this macro if the @code{allocate_stack}pattern needs to support both a 32- and a 64-bit mode.@end defmac@deftypefn {Target Hook} {enum machine_mode} TARGET_LIBGCC_CMP_RETURN_MODE ()This target hook should return the mode to be used for the return valueof compare instructions expanded to libgcc calls.  If not defined@code{word_mode} is returned which is the right choice for a majority oftargets.@end deftypefn@deftypefn {Target Hook} {enum machine_mode} TARGET_LIBGCC_SHIFT_COUNT_MODE ()This target hook should return the mode to be used for the shift count operandof shift instructions expanded to libgcc calls.  If not defined@code{word_mode} is returned which is the right choice for a majority oftargets.@end deftypefn@defmac TARGET_FLOAT_FORMATA code distinguishing the floating point format of the target machine.There are two defined values:@ftable @code@item IEEE_FLOAT_FORMATThis code indicates IEEE floating point.  It is the default; there is noneed to define @code{TARGET_FLOAT_FORMAT} when the format is IEEE@.@item VAX_FLOAT_FORMATThis code indicates the ``F float'' (for @code{float}) and ``D float''or ``G float'' formats (for @code{double}) used on the VAX and PDP-11@.@end ftableIf your target uses a floating point format other than these, you mustdefine a new @var{name}_FLOAT_FORMAT code for it, and add support forit to @file{real.c}.The ordering of the component words of floating point values stored inmemory is controlled by @code{FLOAT_WORDS_BIG_ENDIAN}.@end defmac@defmac MODE_HAS_NANS (@var{mode})When defined, this macro should be true if @var{mode} has a NaNrepresentation.  The compiler assumes that NaNs are not equal toanything (including themselves) and that addition, subtraction,multiplication and division all return NaNs when one operand isNaN@.By default, this macro is true if @var{mode} is a floating-pointmode and the target floating-point format is IEEE@.@end defmac@defmac MODE_HAS_INFINITIES (@var{mode})This macro should be true if @var{mode} can represent infinity.  Atpresent, the compiler uses this macro to decide whether @samp{x - x}is always defined.  By default, the macro is true when @var{mode}is a floating-point mode and the target format is IEEE@.@end defmac@defmac MODE_HAS_SIGNED_ZEROS (@var{mode})True if @var{mode} distinguishes between positive and negative zero.The rules are expected to follow the IEEE standard:@itemize @bullet@item@samp{x + x} has the same sign as @samp{x}.@itemIf the sum of two values with opposite sign is zero, the result ispositive for all rounding modes expect towards @minus{}infinity, forwhich it is negative.@itemThe sign of a product or quotient is negative when exactly oneof the operands is negative.@end itemizeThe default definition is true if @var{mode} is a floating-pointmode and the target format is IEEE@.@end defmac@defmac MODE_HAS_SIGN_DEPENDENT_ROUNDING (@var{mode})If defined, this macro should be true for @var{mode} if it has atleast one rounding mode in which @samp{x} and @samp{-x} can berounded to numbers of different magnitude.  Two such modes aretowards @minus{}infinity and towards +infinity.The default definition of this macro is true if @var{mode} isa floating-point mode and the target format is IEEE@.@end defmac@defmac ROUND_TOWARDS_ZEROIf defined, this macro should be true if the prevailing roundingmode is towards zero.  A true value has the following effects:@itemize @bullet@item@code{MODE_HAS_SIGN_DEPENDENT_ROUNDING} will be false for all modes.@item@file{libgcc.a}'s floating-point emulator will round towards zerorather than towards nearest.@itemThe compiler's floating-point emulator will round towards zero afterdoing arithmetic, and when converting from the internal float format tothe target format.@end itemizeThe macro does not affect the parsing of string literals.  When theprimary rounding mode is towards zero, library functions like@code{strtod} might still round towards nearest, and the compiler'sparser should behave like the target's @code{strtod} where possible.Not defining this macro is equivalent to returning zero.@end defmac@defmac LARGEST_EXPONENT_IS_NORMAL (@var{size})This macro should return true if floats with @var{size}bits do not have a NaN or infinity representation, but use the largestexponent for normal numbers instead.Defining this macro to true for @var{size} causes @code{MODE_HAS_NANS}and @code{MODE_HAS_INFINITIES} to be false for @var{size}-bit modes.It also affects the way @file{libgcc.a} and @file{real.c} emulatefloating-point arithmetic.The default definition of this macro returns false for all sizes.@end defmac@deftypefn {Target Hook} bool TARGET_VECTOR_OPAQUE_P (tree @var{type})This target hook should return @code{true} a vector is opaque.  Thatis, if no cast is needed when copying a vector value of type@var{type} into another vector lvalue of the same size.  Vector opaquetypes cannot be initialized.  The default is that there are no suchtypes.@end deftypefn@deftypefn {Target Hook} bool TARGET_MS_BITFIELD_LAYOUT_P (tree @var{record_type})This target hook returns @code{true} if bit-fields in the given@var{record_type} are to be laid out following the rules of MicrosoftVisual C/C++, namely: (i) a bit-field won't share the same storageunit with the previous bit-field if their underlying types havedifferent sizes, and the bit-field will be aligned to the highestalignment of the underlying types of itself and of the previousbit-field; (ii) a zero-sized bit-field will affect the alignment ofthe whole enclosing structure, even if it is unnamed; except that(iii) a zero-sized bit-field will be disregarded unless it followsanother bit-field of nonzero size.  If this hook returns @code{true},other macros that control bit-field layout are ignored.When a bit-field is inserted into a packed record, the whole sizeof the underlying type is used by one or more same-size adjacentbit-fields (that is, if its long:3, 32 bits is used in the record,and any additional adjacent long bit-fields are packed into the samechunk of 32 bits.  However, if the size changes, a new field of thatsize is allocated).  In an unpacked record, this is the same as usingalignment, but not equivalent when packing.If both MS bit-fields and @samp{__attribute__((packed))} are used,the latter will take precedence.  If @samp{__attribute__((packed))} isused on a single field when MS bit-fields are in use, it will takeprecedence for that field, but the alignment of the rest of the structuremay affect its placement.@end deftypefn@deftypefn {Target Hook} {bool} TARGET_DECIMAL_FLOAT_SUPPORTED_P (void)Returns true if the target supports decimal floating point.@end deftypefn@deftypefn {Target Hook} {bool} TARGET_FIXED_POINT_SUPPORTED_P (void)Returns true if the target supports fixed-point arithmetic.@end deftypefn@deftypefn {Target Hook} void TARGET_EXPAND_TO_RTL_HOOK (void)This hook is called just before expansion into rtl, allowing the targetto perform additional initializations or analysis before the expansion.For example, the rs6000 port uses it to allocate a scratch stack slotfor use in copying SDmode values between memory and floating pointregisters whenever the function being expanded has any SDmodeusage.@end deftypefn@deftypefn {Target Hook} void TARGET_INSTANTIATE_DECLS (void)This hook allows the backend to perform additional instantiations on rtlthat are not actually in any insns yet, but will be later.@end deftypefn@deftypefn {Target Hook} {const char *} TARGET_MANGLE_TYPE (tree @var{type})If your target defines any fundamental types, or any types your targetuses should be mangled differently from the default, define this hookto return the appropriate encoding for these types as part of a C++mangled name.  The @var{type} argument is the tree structure representingthe type to be mangled.  The hook may be applied to trees which arenot target-specific fundamental types; it should return @code{NULL}for all such types, as well as arguments it does not recognize.  If thereturn value is not @code{NULL}, it must point to a statically-allocatedstring constant.Target-specific fundamental types might be new fundamental types orqualified versions of ordinary fundamental types.  Encode newfundamental types as @samp{@w{u @var{n} @var{name}}}, where @var{name}is the name used for the type in source code, and @var{n} is thelength of @var{name} in decimal.  Encode qualified versions ofordinary types as @samp{@w{U @var{n} @var{name} @var{code}}}, where@var{name} is the name used for the type qualifier in source code,@var{n} is the length of @var{name} as above, and @var{code} is thecode used to represent the unqualified version of this type.  (See@code{write_builtin_type} in @file{cp/mangle.c} for the list ofcodes.)  In both cases the spaces are for clarity; do not include anyspaces in your string.This hook is applied to types prior to typedef resolution.  If the mangledname for a particular type depends only on that type's main variant, youcan perform typedef resolution yourself using @code{TYPE_MAIN_VARIANT}before mangling.The default version of this hook always returns @code{NULL}, which isappropriate for a target that does not define any new fundamentaltypes.@end deftypefn@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.@defmac 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.@end defmac@defmac 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.)@end defmac@defmac 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.@end defmac@defmac ADA_LONG_TYPE_SIZEOn some machines, the size used for the Ada equivalent of the ty

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -