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

📄 tm.texi

📁 GUN开源阻止下的编译器GCC
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
@enumerate@itemAny prefixes specified by the user with @samp{-B}.@itemThe environment variable @code{GCC_EXEC_PREFIX}, if any.@itemThe directories specified by the environment variable @code{COMPILER_PATH}.@itemThe macro @code{STANDARD_EXEC_PREFIX}.@item@file{/usr/lib/gcc/}.@itemThe macro @code{MD_EXEC_PREFIX}, if any.@end enumerateHere is the order of prefixes tried for startfiles:@enumerate@itemAny prefixes specified by the user with @samp{-B}.@itemThe environment variable @code{GCC_EXEC_PREFIX}, if any.@itemThe directories specified by the environment variable @code{LIBRARY_PATH}(native only, cross compilers do not use this).@itemThe macro @code{STANDARD_EXEC_PREFIX}.@item@file{/usr/lib/gcc/}.@itemThe macro @code{MD_EXEC_PREFIX}, if any.@itemThe macro @code{MD_STARTFILE_PREFIX}, if any.@itemThe macro @code{STANDARD_STARTFILE_PREFIX}.@item@file{/lib/}.@item@file{/usr/lib/}.@end enumerate@node Run-time Target@section Run-time Target Specification@cindex run-time target specification@cindex predefined macros@cindex target specifications@c prevent bad page break with this lineHere are run-time target specifications.@table @code@findex CPP_PREDEFINES@item CPP_PREDEFINESDefine this to be a string constant containing @samp{-D} options todefine the predefined macros that identify this machine and system.These macros will be predefined unless the @samp{-ansi} option isspecified.In addition, a parallel set of macros are predefined, whose names aremade by appending @samp{__} at the beginning and at the end.  These@samp{__} macros are permitted by the ANSI standard, so they arepredefined regardless of whether @samp{-ansi} is specified.For example, on the Sun, one can use the following value:@smallexample"-Dmc68000 -Dsun -Dunix"@end smallexampleThe result is to define the macros @code{__mc68000__}, @code{__sun__}and @code{__unix__} unconditionally, and the macros @code{mc68000},@code{sun} and @code{unix} provided @samp{-ansi} is not specified.@findex extern int target_flags@item extern int target_flags;This declaration should be present.@cindex optional hardware or system features@cindex features, optional, in system conventions@item TARGET_@dots{}This series of macros is to allow compiler command arguments toenable or disable the use of optional features of the target machine.For example, one machine description serves both the 68000 andthe 68020; a command argument tells the compiler whether it shoulduse 68020-only instructions or not.  This command argument worksby means of a macro @code{TARGET_68020} that tests a bit in@code{target_flags}.Define a macro @code{TARGET_@var{featurename}} for each such option.Its definition should test a bit in @code{target_flags}; for example:@smallexample#define TARGET_68020 (target_flags & 1)@end smallexampleOne place where these macros are used is in the condition-expressionsof instruction patterns.  Note how @code{TARGET_68020} appearsfrequently in the 68000 machine description file, @file{m68k.md}.Another place they are used is in the definitions of the othermacros in the @file{@var{machine}.h} file.@findex TARGET_SWITCHES@item TARGET_SWITCHESThis macro defines names of command options to set and clearbits in @code{target_flags}.  Its definition is an initializerwith a subgrouping for each command option.Each subgrouping contains a string constant, that defines the optionname, and a number, which contains the bits to set in@code{target_flags}.  A negative number says to clear bits instead;the negative of the number is which bits to clear.  The actual optionname is made by appending @samp{-m} to the specified name.One of the subgroupings should have a null string.  The number inthis grouping is the default value for @code{target_flags}.  Anytarget options act starting with that value.Here is an example which defines @samp{-m68000} and @samp{-m68020}with opposite meanings, and picks the latter as the default:@smallexample#define TARGET_SWITCHES \  @{ @{ "68020", 1@},      \    @{ "68000", -1@},     \    @{ "", 1@}@}@end smallexample@findex TARGET_OPTIONS@item TARGET_OPTIONSThis macro is similar to @code{TARGET_SWITCHES} but defines names of commandoptions that have values.  Its definition is an initializer with asubgrouping for each command option. Each subgrouping contains a string constant, that defines the fixed partof the option name, and the address of a variable.  The variable, type@code{char *}, is set to the variable part of the given option if the fixedpart matches.  The actual option name is made by appending @samp{-m} to thespecified name. Here is an example which defines @samp{-mshort-data-@var{number}}.  If thegiven option is @samp{-mshort-data-512}, the variable @code{m88k_short_data}will be set to the string @code{"512"}. @smallexampleextern char *m88k_short_data;#define TARGET_OPTIONS \ @{ @{ "short-data-", &m88k_short_data @} @}@end smallexample@findex TARGET_VERSION@item TARGET_VERSIONThis macro is a C statement to print on @code{stderr} a stringdescribing the particular machine description choice.  Every machinedescription should define @code{TARGET_VERSION}.  For example:@smallexample#ifdef MOTOROLA#define TARGET_VERSION \  fprintf (stderr, " (68k, Motorola syntax)");#else#define TARGET_VERSION \  fprintf (stderr, " (68k, MIT syntax)");#endif@end smallexample@findex OVERRIDE_OPTIONS@item OVERRIDE_OPTIONSSometimes certain combinations of command options do not make sense ona particular target machine.  You can define a macro@code{OVERRIDE_OPTIONS} to take account of this.  This macro, ifdefined, is executed once just after all the command options have beenparsed.Don't use this macro to turn on various extra optimizations for@samp{-O}.  That is what @code{OPTIMIZATION_OPTIONS} is for.@findex OPTIMIZATION_OPTIONS@item OPTIMIZATION_OPTIONS (@var{level})Some machines may desire to change what optimizations are performed forvarious optimization levels.   This macro, if defined, is executed oncejust after the optimization level is determined and before the remainderof the command options have been parsed.  Values set in this macro areused as the default values for the other command line options.@var{level} is the optimization level specified; 2 if @samp{-O2} isspecified, 1 if @samp{-O} is specified, and 0 if neither is specified.You should not use this macro to change options that are notmachine-specific.  These should uniformly selected by the sameoptimization level on all supported machines.  Use this macro to enablemachbine-specific optimizations.@strong{Do not examine @code{write_symbols} inthis macro!} The debugging options are not supposed to alter thegenerated code.@findex CAN_DEBUG_WITHOUT_FP@item CAN_DEBUG_WITHOUT_FPDefine this macro if debugging can be performed even without a framepointer.  If this macro is defined, GNU CC will turn on the@samp{-fomit-frame-pointer} option whenever @samp{-O} is specified.@end table@node Storage Layout@section Storage Layout@cindex storage layoutNote that the definitions of the macros in this table which are sizes oralignments measured in bits do not need to be constant.  They can be Cexpressions that refer to static variables, such as the @code{target_flags}.@xref{Run-time Target}.@table @code@findex BITS_BIG_ENDIAN@item BITS_BIG_ENDIANDefine this macro to have the value 1 if the most significant bit in abyte has the lowest number; otherwise define it to have the value zero.This means that bit-field instructions count from the most significantbit.  If the machine has no bit-field instructions, then this must stillbe defined, but it doesn't matter which value it is defined to.  Thismacro need not be a constant.This macro does not affect the way structure fields are packed intobytes or words; that is controlled by @code{BYTES_BIG_ENDIAN}.@findex BYTES_BIG_ENDIAN@item BYTES_BIG_ENDIANDefine this macro to have the value 1 if the most significant byte in aword has the lowest number.  This macro need not be a constant.@findex WORDS_BIG_ENDIAN@item WORDS_BIG_ENDIANDefine this macro to have the value 1 if, in a multiword object, themost significant word has the lowest number.  This applies to bothmemory locations and registers; GNU CC fundamentally assumes that theorder of words in memory is the same as the order in registers.  Thismacro need not be a constant.@findex LIBGCC2_WORDS_BIG_ENDIAN@item LIBGCC2_WORDS_BIG_ENDIANDefine this macro if WORDS_BIG_ENDIAN is not constant.  This must be aconstant value with the same meaning as WORDS_BIG_ENDIAN, which will beused only when compiling libgcc2.c.  Typically the value will be setbased on preprocessor defines.@findex FLOAT_WORDS_BIG_ENDIAN@item FLOAT_WORDS_BIG_ENDIANDefine this macro to have the value 1 if @code{DFmode}, @code{XFmode} or@code{TFmode} floating point numbers are stored in memory with the wordcontaining the sign bit at the lowest address; otherwise define it tohave the value 0.  This macro need not be a constant.You need not define this macro if the ordering is the same as formulti-word integers.@findex BITS_PER_UNIT@item BITS_PER_UNITDefine this macro to be the number of bits in an addressable storageunit (byte); normally 8.@findex BITS_PER_WORD@item BITS_PER_WORDNumber of bits in a word; normally 32.@findex MAX_BITS_PER_WORD@item MAX_BITS_PER_WORDMaximum number of bits in a word.  If this is undefined, the default is@code{BITS_PER_WORD}.  Otherwise, it is the constant value that is thelargest value that @code{BITS_PER_WORD} can have at run-time.@findex UNITS_PER_WORD@item UNITS_PER_WORDNumber of storage units in a word; normally 4.@findex MIN_UNITS_PER_WORD@item MIN_UNITS_PER_WORDMinimum number of units in a word.  If this is undefined, the default is@code{UNITS_PER_WORD}.  Otherwise, it is the constant value that is thesmallest value that @code{UNITS_PER_WORD} can have at run-time.@findex POINTER_SIZE@item POINTER_SIZEWidth of a pointer, in bits.  You must specify a value no wider than thewidth of @code{Pmode}.  If it is not equal to the width of @code{Pmode},you must define @code{POINTERS_EXTEND_UNSIGNED}.@findex POINTERS_EXTEND_UNSIGNED@item POINTERS_EXTEND_UNSIGNEDA C expression whose value is nonzero if pointers that need to be extended from being @code{POINTER_SIZE} bits wide to @code{Pmode}are sign-extended and zero if they are zero-extended.You need not define this macro if the @code{POINTER_SIZE} is equalto the width of @code{Pmode}.@findex PROMOTE_MODE@item PROMOTE_MODE (@var{m}, @var{unsignedp}, @var{type})A macro to update @var{m} and @var{unsignedp} when an object whose typeis @var{type} and which has the specified mode and signedness is to bestored in a register.  This macro is only called when @var{type} is ascalar type.On most RISC machines, which only have operations that operate on a fullregister, define this macro to set @var{m} to @code{word_mode} if@var{m} is an integer mode narrower than @code{BITS_PER_WORD}.  In mostcases, only integer modes should be widened because wider-precisionfloating-point operations are usually more expensive than their narrowercounterparts.For most machines, the macro definition does not change @var{unsignedp}.However, some machines, have instructions that preferentially handleeither signed or unsigned quantities of certain modes.  For example, onthe DEC Alpha, 32-bit loads from memory and 32-bit add instructionssign-extend the result to 64 bits.  On such machines, set@var{unsignedp} according to which kind of extension is more efficient.

⌨️ 快捷键说明

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