diff options
Diffstat (limited to 'gcc/tm.texi')
-rw-r--r-- | gcc/tm.texi | 147 |
1 files changed, 106 insertions, 41 deletions
diff --git a/gcc/tm.texi b/gcc/tm.texi index c5407a2..e3337d9 100644 --- a/gcc/tm.texi +++ b/gcc/tm.texi @@ -320,7 +320,7 @@ used, or when the compiler is built as a cross compiler. @findex INIT_ENVIRONMENT @item INIT_ENVIRONMENT -Define this macro as a C string constant if you with to set environment +Define this macro as a C string constant if you wish to set environment variables for programs called by the driver, such as the assembler and loader. The driver passes the value of this macro to @code{putenv} to initialize the necessary environment variables. @@ -354,11 +354,17 @@ try when searching for header files. Cross compilers do not use this macro and do not search either @file{/usr/include} or its replacement. +@findex STANDARD_INCLUDE_COMPONENT +@item STANDARD_INCLUDE_COMPONENT +The ``component'' corresponding to @code{STANDARD_INCLUDE_DIR}. +See @code{INCLUDE_DEFAULTS}, below, for the description of components. +If you do not define this macro, no component is used. + @findex INCLUDE_DEFAULTS @item INCLUDE_DEFAULTS Define this macro if you wish to override the entire default search path -for include files. The default search path includes -@code{GCC_INCLUDE_DIR}, @code{LOCAL_INCLUDE_DIR}, +for include files. For a native compiler, the default search path +usually consists of @code{GCC_INCLUDE_DIR}, @code{LOCAL_INCLUDE_DIR}, @code{SYSTEM_INCLUDE_DIR}, @code{GPLUSPLUS_INCLUDE_DIR}, and @code{STANDARD_INCLUDE_DIR}. In addition, @code{GPLUSPLUS_INCLUDE_DIR} and @code{GCC_INCLUDE_DIR} are defined automatically by @file{Makefile}, @@ -366,19 +372,28 @@ and specify private search areas for GCC. The directory @code{GPLUSPLUS_INCLUDE_DIR} is used only for C++ programs. The definition should be an initializer for an array of structures. -Each array element should have two elements: the directory name (a -string constant) and a flag for C++-only directories. Mark the end of -the array with a null element. For example, here is the definition used -for VMS: +Each array element should have four elements: the directory name (a +string constant), the component name, and flag for C++-only directories, +and a flag showing that the includes in the directory don't need to be +wrapped in @code{extern @samp{C}} when compiling C++. Mark the end of +the array with a null element. + +The component name denotes what GNU package the include file is part of, +if any, in all upper-case letters. For example, it might be @samp{GCC} +or @samp{BINUTILS}. If the package is part of the a vendor-supplied +operating system, code the component name as @samp{0}. + + +For example, here is the definition used for VAX/VMS: @example #define INCLUDE_DEFAULTS \ @{ \ - @{ "GNU_GXX_INCLUDE:", 1@}, \ - @{ "GNU_CC_INCLUDE:", 0@}, \ - @{ "SYS$SYSROOT:[SYSLIB.]", 0@}, \ - @{ ".", 0@}, \ - @{ 0, 0@} \ + @{ "GNU_GXX_INCLUDE:", "G++", 1, 1@}, \ + @{ "GNU_CC_INCLUDE:", "GCC", 0, 0@}, \ + @{ "SYS$SYSROOT:[SYSLIB.]", 0, 0, 0@}, \ + @{ ".", 0, 0, 0@}, \ + @{ 0, 0, 0, 0@} \ @} @end example @end table @@ -982,6 +997,20 @@ supported machines, new codes should be defined for them. The ordering of the component words of floating point values stored in memory is controlled by @code{FLOAT_WORDS_BIG_ENDIAN} for the target machine and @code{HOST_FLOAT_WORDS_BIG_ENDIAN} for the host. + +@findex DEFAULT_VTABLE_THUNKS +@item DEFAULT_VTABLE_THUNKS +GNU CC supports two ways of implementing C++ vtables: traditional or with +so-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 traditional +implementation 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 binary +compatible 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 @@ -1064,6 +1093,14 @@ A C expression for the size in bits of the type @code{long double} on the target machine. If you don't define this, the default is two words. +@findex WIDEST_HARDWARE_FP_SIZE +@item WIDEST_HARDWARE_FP_SIZE +A C expression for the size in bits of the widest floating-point format +supported by the hardware. If you define this macro, you must specify a +value 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_CHAR An expression whose value is 1 or 0, according to whether the type @@ -1375,30 +1412,21 @@ are equivalent, a suitable definition is #define HARD_REGNO_MODE_OK(REGNO, MODE) 1 @end smallexample -It is not necessary for this macro to check for the numbers of fixed -registers, because the allocation mechanism considers them to be always -occupied. +You need not include code to check for the numbers of fixed registers, +because the allocation mechanism considers them to be always occupied. @cindex register pairs On some machines, double-precision values must be kept in even/odd -register pairs. The way to implement that is to define this macro -to reject odd register numbers for such modes. - -@ignore -@c I think this is not true now -GNU CC assumes that it can always move values between registers and -(suitably addressed) memory locations. If it is impossible to move a -value of a certain mode between memory and certain registers, then -@code{HARD_REGNO_MODE_OK} must not allow this mode in those registers. -@end ignore +register pairs. You can implement that by defining this macro to reject +odd register numbers for such modes. The minimum requirement for a mode to be OK in a register is that the @samp{mov@var{mode}} instruction pattern support moves between the -register and any other hard register for which the mode is OK; and that -moving a value into the register and back out not alter it. +register and other hard register in the same class and that moving a +value into the register and back out not alter it. -Since the same instruction used to move @code{SImode} will work for all -narrower integer modes, it is not necessary on any machine for +Since the same instruction used to move @code{word_mode} will work for +all narrower integer modes, it is not necessary on any machine for @code{HARD_REGNO_MODE_OK} to distinguish between these modes, provided you define patterns @samp{movhi}, etc., to take advantage of this. This is useful because of the interaction between @code{HARD_REGNO_MODE_OK} @@ -1436,14 +1464,19 @@ be used unless some pattern's constraint asks for one. @findex MODES_TIEABLE_P @item MODES_TIEABLE_P (@var{mode1}, @var{mode2}) -A C expression that is nonzero if it is desirable to choose register -allocation so as to avoid move instructions between a value of mode -@var{mode1} and a value of mode @var{mode2}. +A C expression that is nonzero if a value of mode +@var{mode1} is accessable in mode @var{mode2} without copying. If @code{HARD_REGNO_MODE_OK (@var{r}, @var{mode1})} and -@code{HARD_REGNO_MODE_OK (@var{r}, @var{mode2})} are ever different -for any @var{r}, then @code{MODES_TIEABLE_P (@var{mode1}, -@var{mode2})} must be zero. +@code{HARD_REGNO_MODE_OK (@var{r}, @var{mode2})} are always the same for +any @var{r}, then @code{MODES_TIEABLE_P (@var{mode1}, @var{mode2})} +should be nonzero. If they differ for any @var{r}, you should define +this macro to return zero unless some other mechanism ensures the +accessability of the value in a narrower mode. + +You should define this macro to return nonzero in as many cases as +possible since doing so will allow GNU CC to perform better register +allocation. @end table @node Leaf Functions @@ -2136,6 +2169,10 @@ the prologue. @var{frameaddr} is the frame pointer of the @var{count} frame, or the frame pointer of the @var{count} @minus{} 1 frame if @code{RETURN_ADDR_IN_PREVIOUS_FRAME} is defined. +The value of the expression must always be the correct address when +@var{count} is zero, but may be @code{NULL_RTX} if there is not way to +determine the return address of other frames. + @findex RETURN_ADDR_IN_PREVIOUS_FRAME @item RETURN_ADDR_IN_PREVIOUS_FRAME Define this if the return address of a particular stack frame is accessed @@ -4691,7 +4728,7 @@ Decode @var{sym_name} and store the real name part in @var{var}, sans the characters that encode section info. Define this macro if @code{ENCODE_SECTION_INFO} alters the symbol's name string. -@findex UNIQUE_SECTION_P (@var{decl}) +@findex UNIQUE_SECTION_P @item UNIQUE_SECTION_P (@var{decl}) A C expression which evaluates to true if @var{decl} should be placed into a unique section for some target-specific reason. If you do not @@ -4871,6 +4908,14 @@ the stdio stream @var{stream}. This macro need not be defined if the standard form of output for the file format in use is appropriate. +@findex OUTPUT_QUOTED_STRING +@item OUTPUT_QUOTED_STRING (@var{stream}, @var{name}) +A C statement to output the string @var{string} to the stdio stream +@var{stream}. If you do not call the function @code{output_quoted_string} +in your config files, GNU CC will only call it to output filenames to +the assembler source. So you can use it to canonicalize the format +of the filename using this macro. + @findex ASM_OUTPUT_SOURCE_LINE @item ASM_OUTPUT_SOURCE_LINE (@var{stream}, @var{line}) A C statement to output DBX or SDB debugging information before code @@ -5127,6 +5172,15 @@ place of @code{ASM_OUTPUT_COMMON}, and gives you more flexibility in handling the required alignment of the variable. The alignment is specified as the number of bits. +@findex ASM_OUTPUT_ALIGNED_DECL_COMMON +@item ASM_OUTPUT_ALIGNED_DECL_COMMON (@var{stream}, @var{decl}, @var{name}, @var{size}, @var{alignment}) +Like @code{ASM_OUTPUT_ALIGNED_COMMON} except that @var{decl} of the +variable to be output, if there is one, or @code{NULL_TREE} if there +is not corresponding variable. If you define this macro, GNU CC wil use it +in place of both @code{ASM_OUTPUT_COMMON} and +@code{ASM_OUTPUT_ALIGNED_COMMON}. Define this macro when you need to see +the variable's decl in order to chose what to output. + @findex ASM_OUTPUT_SHARED_COMMON @item ASM_OUTPUT_SHARED_COMMON (@var{stream}, @var{name}, @var{size}, @var{rounded}) If defined, it is similar to @code{ASM_OUTPUT_COMMON}, except that it @@ -5151,7 +5205,8 @@ variables are output. This macro exists to properly support languages like @code{c++} which do not have @code{common} data. However, this macro currently is not defined for all targets. If this macro and @code{ASM_OUTPUT_ALIGNED_BSS} are not defined then @code{ASM_OUTPUT_COMMON} -or @code{ASM_OUTPUT_ALIGNED_COMMON} is used. +or @code{ASM_OUTPUT_ALIGNED_COMMON} or +@code{ASM_OUTPUT_ALIGNED_DECL_COMMON} is used. @findex ASM_OUTPUT_ALIGNED_BSS @item ASM_OUTPUT_ALIGNED_BSS (@var{stream}, @var{decl}, @var{name}, @var{size}, @var{alignment}) @@ -5192,6 +5247,16 @@ place of @code{ASM_OUTPUT_LOCAL}, and gives you more flexibility in handling the required alignment of the variable. The alignment is specified as the number of bits. +@findex ASM_OUTPUT_ALIGNED_DECL_LOCAL +@item ASM_OUTPUT_ALIGNED_DECL_LOCAL (@var{stream}, @var{decl}, @var{name}, @var{size}, @var{alignment}) +Like @code{ASM_OUTPUT_ALIGNED_DECL} except that @var{decl} of the +variable to be output, if there is one, or @code{NULL_TREE} if there +is not corresponding variable. If you define this macro, GNU CC wil use it +in place of both @code{ASM_OUTPUT_DECL} and +@code{ASM_OUTPUT_ALIGNED_DECL}. Define this macro when you need to see +the variable's decl in order to chose what to output. + + @findex ASM_OUTPUT_SHARED_LOCAL @item ASM_OUTPUT_SHARED_LOCAL (@var{stream}, @var{name}, @var{size}, @var{rounded}) If defined, it is similar to @code{ASM_OUTPUT_LOCAL}, except that it @@ -5300,15 +5365,15 @@ format provides support for this concept, such as the @samp{COMDAT} section flags in the Microsoft Windows PE/COFF format, and this support requires changes to @var{decl}, such as putting it in a separate section. -@findex SUPPORTS_WEAK -@item SUPPORTS_WEAK +@findex SUPPORTS_ONE_ONLY +@item SUPPORTS_ONE_ONLY A C expression which evaluates to true if the target supports one-only semantics. If you don't define this macro, @file{varasm.c} provides a default definition. If @code{MAKE_DECL_ONE_ONLY} is defined, the default definition is @samp{1}; otherwise, it is @samp{0}. Define this macro if -you want to control weak symbol support with a compiler flag, or if +you want to control one-only symbol support with a compiler flag, or if setting the @code{DECL_ONE_ONLY} flag is enough to mark a declaration to be emitted as one-only. @@ -7092,7 +7157,7 @@ and @code{INIT_SECTION_ASM_OP} is not defined, a default Define this if your @code{exit} function needs to do something besides calling an external function @code{_cleanup} before terminating with @code{_exit}. The @code{EXIT_BODY} macro is -only needed if netiher @code{HAVE_ATEXIT} nor +only needed if neither @code{HAVE_ATEXIT} nor @code{INIT_SECTION_ASM_OP} are defined. @findex INSN_SETS_ARE_DELAYED |