OSDN Git Service

2007-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
[pf3gnuchains/gcc-fork.git] / gcc / doc / tm.texi
index 0896ab8..77c83f4 100644 (file)
@@ -1,5 +1,5 @@
 @c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,
-@c 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+@c 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 @c This is part of the GCC manual.
 @c For copying conditions, see the file gcc.texi.
 
@@ -615,19 +615,26 @@ Here is the order of prefixes tried for exec files:
 Any prefixes specified by the user with @option{-B}.
 
 @item
-The environment variable @code{GCC_EXEC_PREFIX}, if any.
+The environment variable @code{GCC_EXEC_PREFIX} or, if @code{GCC_EXEC_PREFIX}
+is not set and the compiler has not been installed in the configure-time 
+@var{prefix}, the location in which the compiler has actually been installed.
 
 @item
 The directories specified by the environment variable @code{COMPILER_PATH}.
 
 @item
-The macro @code{STANDARD_EXEC_PREFIX}.
+The macro @code{STANDARD_EXEC_PREFIX}, if the compiler has been installed
+in the configured-time @var{prefix}. 
 
 @item
-@file{/usr/lib/gcc/}.
+The location @file{/usr/libexec/gcc/}, but only if this is a native compiler. 
 
 @item
-The macro @code{MD_EXEC_PREFIX}, if any.
+The location @file{/usr/lib/gcc/}, but only if this is a native compiler. 
+
+@item
+The macro @code{MD_EXEC_PREFIX}, if defined, but only if this is a native 
+compiler.
 @end enumerate
 
 Here is the order of prefixes tried for startfiles:
@@ -637,31 +644,45 @@ Here is the order of prefixes tried for startfiles:
 Any prefixes specified by the user with @option{-B}.
 
 @item
-The environment variable @code{GCC_EXEC_PREFIX}, if any.
+The environment variable @code{GCC_EXEC_PREFIX} or its automatically determined
+value based on the installed toolchain location.
 
 @item
 The directories specified by the environment variable @code{LIBRARY_PATH}
 (or port-specific name; native only, cross compilers do not use this).
 
 @item
-The macro @code{STANDARD_EXEC_PREFIX}.
+The macro @code{STANDARD_EXEC_PREFIX}, but only if the toolchain is installed
+in the configured @var{prefix} or this is a native compiler. 
 
 @item
-@file{/usr/lib/gcc/}.
+The location @file{/usr/lib/gcc/}, but only if this is a native compiler.
 
 @item
-The macro @code{MD_EXEC_PREFIX}, if any.
+The macro @code{MD_EXEC_PREFIX}, if defined, but only if this is a native 
+compiler.
 
 @item
-The macro @code{MD_STARTFILE_PREFIX}, if any.
+The macro @code{MD_STARTFILE_PREFIX}, if defined, but only if this is a 
+native compiler, or we have a target system root.
 
 @item
-The macro @code{STANDARD_STARTFILE_PREFIX}.
+The macro @code{MD_STARTFILE_PREFIX_1}, if defined, but only if this is a 
+native compiler, or we have a target system root.
 
 @item
+The macro @code{STANDARD_STARTFILE_PREFIX}, with any sysroot modifications.
+If this path is relative it will be prefixed by @code{GCC_EXEC_PREFIX} and
+the machine suffix or @code{STANDARD_EXEC_PREFIX} and the machine suffix.
+
+@item
+The macro @code{STANDARD_STARTFILE_PREFIX_1}, but only if this is a native
+compiler, or we have a target system root. The default for this macro is
 @file{/lib/}.
 
 @item
+The macro @code{STANDARD_STARTFILE_PREFIX_2}, but only if this is a native
+compiler, or we have a target system root. The default for this macro is
 @file{/usr/lib/}.
 @end enumerate
 
@@ -2365,8 +2386,9 @@ that expression may examine the mode of the memory reference in
 @var{mode}.  You should define this macro if the mode of the memory
 reference affects whether a register may be used as a base register.  If
 you define this macro, the compiler will use it instead of
-@code{REGNO_OK_FOR_BASE_P}.  The mode may be @code{VOIDmode} for addresses
-that appear outside a @code{MEM}, i.e. as an @code{address_operand}.
+@code{REGNO_OK_FOR_BASE_P}.  The mode may be @code{VOIDmode} for
+addresses that appear outside a @code{MEM}, i.e., as an
+@code{address_operand}.
 
 @end defmac
 
@@ -2383,14 +2405,15 @@ Use of this macro is deprecated; please use the more general
 @end defmac
 
 @defmac REGNO_MODE_CODE_OK_FOR_BASE_P (@var{num}, @var{mode}, @var{outer_code}, @var{index_code})
-A C expression that is just like @code{REGNO_MODE_OK_FOR_BASE_P}, except that
-that expression may examine the context in which the register appears in the
-memory reference.  @var{outer_code} is the code of the immediately enclosing
-expression (@code{MEM} if at the top level of the address, @code{ADDRESS} for
-something that occurs in an @code{address_operand}).  @var{index_code} is the
-code of the corresponding index expression if @var{outer_code} is @code{PLUS};
+A C expression that is just like @code{REGNO_MODE_OK_FOR_BASE_P}, except
+that that expression may examine the context in which the register
+appears in the memory reference.  @var{outer_code} is the code of the
+immediately enclosing expression (@code{MEM} if at the top level of the
+address, @code{ADDRESS} for something that occurs in an
+@code{address_operand}).  @var{index_code} is the code of the
+corresponding index expression if @var{outer_code} is @code{PLUS};
 @code{SCRATCH} otherwise.  The mode may be @code{VOIDmode} for addresses
-that appear outside a @code{MEM}, i.e. as an @code{address_operand}.
+that appear outside a @code{MEM}, i.e., as an @code{address_operand}.
 @end defmac
 
 @defmac REGNO_OK_FOR_INDEX_P (@var{num})
@@ -4086,7 +4109,12 @@ place regardless of mode.)  The value of the expression is usually a
 @code{reg} RTX for the hard register where the return value is stored.
 The value can also be a @code{parallel} RTX, if the return value is in
 multiple places.  See @code{FUNCTION_ARG} for an explanation of the
-@code{parallel} form.
+@code{parallel} form.   Note that the callee will populate every
+location specified in the @code{parallel}, but if the first element of
+the @code{parallel} contains the whole return value, callers will use
+that element as the canonical location and ignore the others.  The m68k
+port uses this type of @code{parallel} to return pointers in both
+@samp{%a0} (the canonical location) and @samp{%d0}.
 
 If @code{TARGET_PROMOTE_FUNCTION_RETURN} returns true, you must apply
 the same promotion rules specified in @code{PROMOTE_MODE} if
@@ -5035,6 +5063,18 @@ number of existing systems lacks support for these functions in the runtime so
 they needs this macro to be redefined to 0.
 @end defmac
 
+@cindex sincos math function, implicit usage
+@defmac TARGET_HAS_SINCOS
+When this macro is nonzero, GCC will implicitly optimize calls to @code{sin}
+and @code{cos} with the same argument to a call to @code{sincos}.  The
+default is zero.  The target has to provide the following functions:
+@smallexample
+void sincos(double x, double *sin, double *cos);
+void sincosf(float x, float *sin, float *cos);
+void sincosl(long double x, long double *sin, long double *cos);
+@end smallexample
+@end defmac
+
 @defmac NEXT_OBJC_RUNTIME
 Define this macro to generate code for Objective-C message sending using
 the calling convention of the NeXT system.  This calling convention
@@ -5229,7 +5269,7 @@ the address has become legitimate.
 
 @findex copy_rtx
 If you want to change only a part of @var{x}, one standard way of doing
-this is to use @code{copy_rtx}.  Note, however, that is unshares only a
+this is to use @code{copy_rtx}.  Note, however, that it unshares only a
 single level of rtl.  Thus, if the part to be changed is not at the
 top level, you'll need to replace first the top level.
 It is not necessary for this macro to come up with a legitimate
@@ -5295,7 +5335,7 @@ address @var{addr} as an argument returns a mask @var{m} that can be
 used to extract from two vectors the relevant data that resides in
 @var{addr} in case @var{addr} is not properly aligned.
 
-The autovectrizer, when vectorizing a load operation from an address
+The autovectorizer, when vectorizing a load operation from an address
 @var{addr} that may be unaligned, will generate two vector loads from
 the two aligned addresses around @var{addr}. It then generates a
 @code{REALIGN_LOAD} operation to extract the relevant data from the
@@ -7160,6 +7200,14 @@ The default implementation relies on a proper definition of
 @code{GLOBAL_ASM_OP}.
 @end deftypefn
 
+@deftypefn {Target Hook} void TARGET_ASM_GLOBALIZE_DECL_NAME (FILE *@var{stream}, tree @var{decl})
+This target hook is a function to output to the stdio stream
+@var{stream} some commands that will make the name associated with @var{decl}
+global; that is, available for reference from other files.
+
+The default implementation uses the TARGET_ASM_GLOBALIZE_LABEL target hook.
+@end deftypefn
+
 @defmac ASM_WEAKEN_LABEL (@var{stream}, @var{name})
 A C statement (sans semicolon) to output to the stdio stream
 @var{stream} some commands that will make the label @var{name} weak;
@@ -8740,7 +8788,7 @@ Returns the absolute value of @var{x}.
 @deftypefn Macro REAL_VALUE_TYPE REAL_VALUE_TRUNCATE (REAL_VALUE_TYPE @var{mode}, enum machine_mode @var{x})
 Truncates the floating point value @var{x} to fit in @var{mode}.  The
 return value is still a full-size @code{REAL_VALUE_TYPE}, but it has an
-appropriate bit pattern to be output asa floating constant whose
+appropriate bit pattern to be output as a floating constant whose
 precision accords with mode @var{mode}.
 @end deftypefn
 
@@ -9080,6 +9128,12 @@ classes whose virtual table will be emitted in only one translation
 unit will not be COMDAT.
 @end deftypefn
 
+@deftypefn {Target Hook} bool TARGET_CXX_LIBRARY_RTTI_COMDAT (void)
+This hook returns true (the default) if the RTTI information for
+the basic types which is defined in the C++ runtime should always
+be COMDAT, false if it should not be COMDAT.
+@end deftypefn
+
 @deftypefn {Target Hook} bool TARGET_CXX_USE_AEABI_ATEXIT (void)
 This hook returns true if @code{__aeabi_atexit} (as defined by the ARM EABI)
 should be used to register static destructors when @option{-fuse-cxa-atexit}