OSDN Git Service

Add framework support for darwin.
[pf3gnuchains/gcc-fork.git] / gcc / doc / tm.texi
index d41a586..3ca5aca 100644 (file)
@@ -293,6 +293,18 @@ If this macro is not defined, the GCC driver provides a default that
 passes the string @option{-lgcc} to the linker.
 @end defmac
 
+@defmac REAL_LIBGCC_SPEC
+By default, if @code{ENABLE_SHARED_LIBGCC} is defined, the
+@code{LIBGCC_SPEC} is not directly used by the driver program but is
+instead modified to refer to different versions of @file{libgcc.a}
+depending on the values of the command line flags @code{-static},
+@code{-shared}, @code{-static-libgcc}, and @code{-shared-libgcc}.  On
+targets where these modifications are inappropriate, define
+@code{REAL_LIBGCC_SPEC} instead.  @code{REAL_LIBGCC_SPEC} tells the
+driver how to place a reference to @file{libgcc} on the link command
+line, but, unlike @code{LIBGCC_SPEC}, it is used unmodified.
+@end defmac
+
 @defmac STARTFILE_SPEC
 Another C string constant used much like @code{LINK_SPEC}.  The
 difference between the two is that @code{STARTFILE_SPEC} is used at
@@ -1535,14 +1547,6 @@ the size of that type.  If you don't define this, the default is the
 value of @code{LONG_TYPE_SIZE}.
 @end defmac
 
-@defmac MAX_LONG_TYPE_SIZE
-Maximum number for the size in bits of the type @code{long} on the
-target machine.  If this is undefined, the default is
-@code{LONG_TYPE_SIZE}.  Otherwise, it is the constant value that is the
-largest value that @code{LONG_TYPE_SIZE} can have at run-time.  This is
-used in @code{cpp}.
-@end defmac
-
 @defmac LONG_LONG_TYPE_SIZE
 A C expression for the size in bits of the type @code{long long} on the
 target machine.  If you don't define this, the default is two
@@ -1579,14 +1583,6 @@ the target machine.  If you don't define this, the default is two
 words.
 @end defmac
 
-@defmac MAX_LONG_DOUBLE_TYPE_SIZE
-Maximum number for the size in bits of the type @code{long double} on the
-target machine.  If this is undefined, the default is
-@code{LONG_DOUBLE_TYPE_SIZE}.  Otherwise, it is the constant value that is
-the largest value that @code{LONG_DOUBLE_TYPE_SIZE} can have at run-time.
-This is used in @code{cpp}.
-@end defmac
-
 @defmac TARGET_FLT_EVAL_METHOD
 A C expression for the value for @code{FLT_EVAL_METHOD} in @file{float.h},
 assuming, if applicable, that the floating-point control word is in its
@@ -1609,14 +1605,14 @@ always override this default with the options @option{-fsigned-char}
 and @option{-funsigned-char}.
 @end defmac
 
-@defmac DEFAULT_SHORT_ENUMS
-A C expression to determine whether to give an @code{enum} type
-only as many bytes as it takes to represent the range of possible values
-of that type.  A nonzero value means to do that; a zero value means all
+@deftypefn {Target Hook} bool TARGET_DEFAULT_SHORT_ENUMS (void)
+This target hook should return true if the compiler should give an
+@code{enum} type only as many bytes as it takes to represent the range
+of possible values of that type.  It should return false if all
 @code{enum} types should be allocated like @code{int}.
 
-If you don't define the macro, the default is 0.
-@end defmac
+The default is to return false.
+@end deftypefn
 
 @defmac SIZE_TYPE
 A C expression for a string describing the name of the data type to use
@@ -1659,22 +1655,6 @@ characters.  This is used in @code{cpp}, which cannot make use of
 @code{WCHAR_TYPE}.
 @end defmac
 
-@defmac MAX_WCHAR_TYPE_SIZE
-Maximum number for the size in bits of the data type for wide
-characters.  If this is undefined, the default is
-@code{WCHAR_TYPE_SIZE}.  Otherwise, it is the constant value that is the
-largest value that @code{WCHAR_TYPE_SIZE} can have at run-time.  This is
-used in @code{cpp}.
-@end defmac
-
-@defmac GCOV_TYPE_SIZE
-A C expression for the size in bits of the type used for gcov counters on the
-target machine.  If you don't define this, the default is one
-@code{LONG_TYPE_SIZE} in case it is greater or equal to 64-bit and
-@code{LONG_LONG_TYPE_SIZE} otherwise.  You may want to re-define the type to
-ensure atomicity for counters in multithreaded programs.
-@end defmac
-
 @defmac WINT_TYPE
 A C expression for a string describing the name of the data type to
 use for wide characters passed to @code{printf} and returned from
@@ -2873,13 +2853,13 @@ before we can access arbitrary stack frames.  You will seldom need to
 define this macro.
 @end defmac
 
-@defmac BUILTIN_SETJMP_FRAME_VALUE
-If defined, a C expression that contains an rtx that is used to store
+@deftypefn {Target Hook} bool TARGET_BUILTIN_SETJMP_FRAME_VALUE ()
+This target hook should return an rtx that is used to store
 the address of the current frame into the built in @code{setjmp} buffer.
 The default value, @code{virtual_stack_vars_rtx}, is correct for most
-machines.  One reason you may need to define this macro is if
+machines.  One reason you may need to define this target hook is if
 @code{hard_frame_pointer_rtx} is the appropriate value on your machine.
-@end defmac
+@end deftypefn
 
 @defmac RETURN_ADDR_RTX (@var{count}, @var{frameaddr})
 A C expression whose value is RTL representing the value of the return
@@ -3475,33 +3455,6 @@ which.
 @c above is overfull.  not sure what to do.  --mew 5feb93  did
 @c something, not sure if it looks good.  --mew 10feb93
 
-@defmac MAYBE_REG_PARM_STACK_SPACE
-@defmacx FINAL_REG_PARM_STACK_SPACE (@var{const_size}, @var{var_size})
-Define these macros in addition to the one above if functions might
-allocate stack space for arguments even when their values are passed
-in registers.  These should be used when the stack space allocated
-for arguments in registers is not a simple constant independent of the
-function declaration.
-
-The value of the first macro is the size, in bytes, of the area that
-we should initially assume would be reserved for arguments passed in registers.
-
-The value of the second macro is the actual size, in bytes, of the area
-that will be reserved for arguments passed in registers.  This takes two
-arguments: an integer representing the number of bytes of fixed sized
-arguments on the stack, and a tree representing the number of bytes of
-variable sized arguments on the stack.
-
-When these macros are defined, @code{REG_PARM_STACK_SPACE} will only be
-called for libcall functions, the current function, or for a function
-being called when it is known that such stack space must be allocated.
-In each case this value can be easily computed.
-
-When deciding whether a called function needs such stack space, and how
-much space to reserve, GCC uses these two macros instead of
-@code{REG_PARM_STACK_SPACE}.
-@end defmac
-
 @defmac OUTGOING_REG_PARM_STACK_SPACE
 Define this if it is the responsibility of the caller to allocate the area
 reserved for arguments passed in registers.
@@ -3725,7 +3678,7 @@ arguments are passed on the stack, there is no need to store anything in
 should not be empty, so use @code{int}.
 @end defmac
 
-@defmac INIT_CUMULATIVE_ARGS (@var{cum}, @var{fntype}, @var{libname}, @var{fndecl})
+@defmac INIT_CUMULATIVE_ARGS (@var{cum}, @var{fntype}, @var{libname}, @var{fndecl}, @var{n_named_args})
 A C statement (sans semicolon) for initializing the variable
 @var{cum} for the state at the beginning of the argument list.  The
 variable has type @code{CUMULATIVE_ARGS}.  The value of @var{fntype}
@@ -3734,7 +3687,10 @@ the args, or 0 if the args are to a compiler support library function.
 For direct calls that are not libcalls, @var{fndecl} contain the
 declaration node of the function.  @var{fndecl} is also set when
 @code{INIT_CUMULATIVE_ARGS} is used to find arguments for the function
-being compiled.
+being compiled.  @var{n_named_args} is set to the number of named
+arguments, including a structure return address if it is passed as a
+parameter, when making a call.  When processing incoming arguments,
+@var{n_named_args} is set to -1.
 
 When processing a call to a compiler support library function,
 @var{libname} identifies which one.  It is a @code{symbol_ref} rtx which
@@ -3998,7 +3954,9 @@ If not defined, this defaults to the value 1.
 This target hook should return the location of the structure value
 address (normally a @code{mem} or @code{reg}), or 0 if the address is
 passed as an ``invisible'' first argument.  Note that @var{fndecl} may
-be @code{NULL}, for libcalls.
+be @code{NULL}, for libcalls.  You do not need to define this target
+hook if the address is always passed as an ``invisible'' first
+argument.
 
 On some architectures the place where the structure value address
 is found by the called function is not the same place that the
@@ -4395,12 +4353,12 @@ below.
 Use this built-in function to save the argument registers in memory so
 that the varargs mechanism can access them.  Both ISO and traditional
 versions of @code{va_start} must use @code{__builtin_saveregs}, unless
-you use @code{SETUP_INCOMING_VARARGS} (see below) instead.
+you use @code{TARGET_SETUP_INCOMING_VARARGS} (see below) instead.
 
 On some machines, @code{__builtin_saveregs} is open-coded under the
-control of the macro @code{EXPAND_BUILTIN_SAVEREGS}.  On other machines,
-it calls a routine written in assembler language, found in
-@file{libgcc2.c}.
+control of the target hook @code{TARGET_EXPAND_BUILTIN_SAVEREGS}.  On
+other machines, it calls a routine written in assembler language,
+found in @file{libgcc2.c}.
 
 Code generated for the call to @code{__builtin_saveregs} appears at the
 beginning of the function, as opposed to where the call to
@@ -4525,7 +4483,7 @@ If you need to conditionally change ABIs so that one works with
 @code{TARGET_SETUP_INCOMING_VARARGS}, but the other works like neither
 @code{TARGET_SETUP_INCOMING_VARARGS} nor @code{TARGET_STRICT_ARGUMENT_NAMING} was
 defined, then define this hook to return @code{true} if
-@code{SETUP_INCOMING_VARARGS} is used, @code{false} otherwise.
+@code{TARGET_SETUP_INCOMING_VARARGS} is used, @code{false} otherwise.
 Otherwise, you should not define this hook.
 @end deftypefn
 
@@ -4689,7 +4647,7 @@ library routines.
 The default is to do nothing.  Most ports don't need to define this hook.
 @end deftypefn
 
-@defmac TARGET_FLOAT_LIB_COMPARE_RETURNS_BOOL (@var{mode}, @var{comparison})
+@defmac FLOAT_LIB_COMPARE_RETURNS_BOOL (@var{mode}, @var{comparison})
 This macro should return @code{true} if the library routine that
 implements the floating point comparison operator @var{comparison} in
 mode @var{mode} will return a boolean, and @var{false} if it will
@@ -5586,6 +5544,19 @@ to.  @var{verbose} is the verbose level provided by
 @option{-fsched-verbose-@var{n}}.
 @end deftypefn
 
+@deftypefn {Target Hook} void TARGET_SCHED_INIT_GLOBAL (FILE *@var{file}, int @var{verbose}, int @var{old_max_uid})
+This hook is executed by the scheduler after function level initializations.
+@var{file} is either a null pointer, or a stdio stream to write any debug output to.
+@var{verbose} is the verbose level provided by @option{-fsched-verbose-@var{n}}.
+@var{old_max_uid} is the maximum insn uid when scheduling begins.
+@end deftypefn
+
+@deftypefn {Target Hook} void TARGET_SCHED_FINISH_GLOBAL (FILE *@var{file}, int @var{verbose})
+This is the cleanup hook corresponding to TARGET_SCHED_INIT_GLOBAL.
+@var{file} is either a null pointer, or a stdio stream to write any debug output to.
+@var{verbose} is the verbose level provided by @option{-fsched-verbose-@var{n}}.
+@end deftypefn
+
 @deftypefn {Target Hook} int TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE (void)
 This hook is called many times during insn scheduling.  If the hook
 returns nonzero, the automaton based pipeline description is used for
@@ -5712,7 +5683,7 @@ zero.  The hook should return @code{NULL} if there are no more nop
 insns with indexes greater than given index.
 @end deftypefn
 
-@deftypefn {Target Hook} bool IS_COSTLY_DEPENDENCE (rtx @var{insn1}, rtx @var{insn2}, rtx @var{dep_link}, int @var{dep_cost}, int @var{distance})
+@deftypefn {Target Hook} bool TARGET_SCHED_IS_COSTLY_DEPENDENCE (rtx @var{insn1}, rtx @var{insn2}, rtx @var{dep_link}, int @var{dep_cost}, int @var{distance})
 This hook is used to define which dependences are considered costly by
 the target, so costly that it is not advisable to schedule the insns that
 are involved in the dependence too close to one another.  The parameters
@@ -5737,24 +5708,6 @@ not in cases of "costly dependences", which this hooks allows to define.
 Macros in the following table are generated by the program
 @file{genattr} and can be useful for writing the hooks.
 
-@defmac TRADITIONAL_PIPELINE_INTERFACE
-The macro definition is generated if there is a traditional pipeline
-description in @file{.md} file. You should also remember that to
-simplify the insn scheduler sources an empty traditional pipeline
-description interface is generated even if there is no a traditional
-pipeline description in the @file{.md} file.  The macro can be used to
-distinguish the two types of the traditional interface.
-@end defmac
-
-@defmac DFA_PIPELINE_INTERFACE
-The macro definition is generated if there is an automaton pipeline
-description in @file{.md} file.  You should also remember that to
-simplify the insn scheduler sources an empty automaton pipeline
-description interface is generated even if there is no an automaton
-pipeline description in the @file{.md} file.  The macro can be used to
-distinguish the two types of the automaton interface.
-@end defmac
-
 @defmac MAX_DFA_ISSUE_RATE
 The macro definition is generated in the automaton based pipeline
 description interface.  Its value is calculated from the automaton
@@ -5818,12 +5771,6 @@ does not have a special read-only data section, and does not put data
 in the text section.
 @end defmac
 
-@defmac SHARED_SECTION_ASM_OP
-If defined, a C expression whose value is a string, including spacing,
-containing the assembler operation to identify the following data as
-shared data.  If not defined, @code{DATA_SECTION_ASM_OP} will be used.
-@end defmac
-
 @defmac BSS_SECTION_ASM_OP
 If defined, a C expression whose value is a string, including spacing,
 containing the assembler operation to identify the following data as
@@ -7899,65 +7846,6 @@ to @var{stream}.  @var{function} is the @code{FUNCTION_DECL} node for
 the function.
 @end defmac
 
-@defmac DBX_OUTPUT_STANDARD_TYPES (@var{syms})
-Define this macro if you need to control the order of output of the
-standard data types at the beginning of compilation.  The argument
-@var{syms} is a @code{tree} which is a chain of all the predefined
-global symbols, including names of data types.
-
-Normally, DBX output starts with definitions of the types for integers
-and characters, followed by all the other predefined types of the
-particular language in no particular order.
-
-On some machines, it is necessary to output different particular types
-first.  To do this, define @code{DBX_OUTPUT_STANDARD_TYPES} to output
-those symbols in the necessary order.  Any predefined types that you
-don't explicitly output will be output afterward in no particular order.
-
-Be careful not to define this macro so that it works only for C@.  There
-are no global variables to access most of the built-in types, because
-another language may have another set of types.  The way to output a
-particular type is to look through @var{syms} to see if you can find it.
-Here is an example:
-
-@smallexample
-@{
-  tree decl;
-  for (decl = syms; decl; decl = TREE_CHAIN (decl))
-    if (!strcmp (IDENTIFIER_POINTER (DECL_NAME (decl)),
-                 "long int"))
-      dbxout_symbol (decl);
-  @dots{}
-@}
-@end smallexample
-
-@noindent
-This does nothing if the expected type does not exist.
-
-See the function @code{init_decl_processing} in @file{c-decl.c} to find
-the names to use for all the built-in C types.
-
-Here is another way of finding a particular type:
-
-@c this is still overfull.  --mew 10feb93
-@smallexample
-@{
-  tree decl;
-  for (decl = syms; decl; decl = TREE_CHAIN (decl))
-    if (TREE_CODE (decl) == TYPE_DECL
-        && (TREE_CODE (TREE_TYPE (decl))
-            == INTEGER_CST)
-        && TYPE_PRECISION (TREE_TYPE (decl)) == 16
-        && TYPE_UNSIGNED (TREE_TYPE (decl)))
-@group
-      /* @r{This must be @code{unsigned short}.}  */
-      dbxout_symbol (decl);
-  @dots{}
-@}
-@end group
-@end smallexample
-@end defmac
-
 @defmac NO_DBX_FUNCTION_END
 Some stabs encapsulation formats (in particular ECOFF), cannot handle the
 @code{.stabs "",N_FUN,,0,0,Lscope-function-1} gdb dbx extension construct.
@@ -8976,10 +8864,12 @@ without user intervention.  For instance, under Microsoft Windows
 symbols must be explicitly imported from shared libraries (DLLs).
 @end defmac
 
-@defmac MD_ASM_CLOBBERS (@var{clobbers})
-A C statement that adds to @var{clobbers} @code{STRING_CST} trees for
+@deftypefn {Target Hook} tree TARGET_MD_ASM_CLOBBERS (tree @var{clobbers})
+This target hook should add to @var{clobbers} @code{STRING_CST} trees for
 any hard regs the port wishes to automatically clobber for all asms.
-@end defmac
+It should return the result of the last @code{tree_cons} used to add a
+clobber.
+@end deftypefn
 
 @defmac MATH_LIBRARY
 Define this macro as a C string constant for the linker argument to link
@@ -9219,3 +9109,16 @@ more than this number of multiplications is implemented by calling the
 system library's @code{pow}, @code{powf} or @code{powl} routines.
 The default value places no upper bound on the multiplication count.
 @end defmac
+
+@deftypefn Macro void TARGET_EXTRA_INCLUDES (int @var{stdinc})
+This target hook should register any extra include files for the
+target.  The parameter @var{stdinc} indicates if normal include files
+are present.
+@end deftypefn
+
+@deftypefn Macro void TARGET_OPTF (char *@var{path})
+This target hook should register special include paths for the target.
+The parameter @var{path} is the include to register.  On Darwin
+systems, this is used for Framework includes, which have semantics
+that are different from @option{-I}.
+@end deftypefn