OSDN Git Service

* optc-save-gen.awk: New. Based on optc-gen.awk. Don't generate
[pf3gnuchains/gcc-fork.git] / gcc / doc / tm.texi
index e3325b0..68d1bb0 100644 (file)
@@ -91,6 +91,14 @@ form part of the @code{targetm} structure, it is documented below as a
 from being defined in the @file{.h} file to being part of the
 @code{targetm} structure.
 
+Similarly, there is a @code{targetcm} variable for hooks that are
+specific to front ends for C-family languages, documented as ``C
+Target Hook''.  This is declared in @file{c-family/c-target.h}, the
+initializer @code{TARGETCM_INITIALIZER} in
+@file{c-family/c-target-def.h}.  If targets initialize @code{targetcm}
+themselves, they should set @code{target_has_targetcm=yes} in
+@file{config.gcc}; otherwise a default definition is used.
+
 @node Driver
 @section Controlling the Compilation Driver, @file{gcc}
 @cindex driver
@@ -524,7 +532,7 @@ Any prefixes specified by the user with @option{-B}.
 
 @item
 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 
+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
@@ -532,16 +540,16 @@ The directories specified by the environment variable @code{COMPILER_PATH}.
 
 @item
 The macro @code{STANDARD_EXEC_PREFIX}, if the compiler has been installed
-in the configured-time @var{prefix}. 
+in the configured-time @var{prefix}.
 
 @item
-The location @file{/usr/libexec/gcc/}, but only if this is a native compiler. 
+The location @file{/usr/libexec/gcc/}, but only if this is a native compiler.
 
 @item
-The location @file{/usr/lib/gcc/}, but only if this is a native compiler. 
+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 
+The macro @code{MD_EXEC_PREFIX}, if defined, but only if this is a native
 compiler.
 @end enumerate
 
@@ -561,21 +569,21 @@ The directories specified by the environment variable @code{LIBRARY_PATH}
 
 @item
 The macro @code{STANDARD_EXEC_PREFIX}, but only if the toolchain is installed
-in the configured @var{prefix} or this is a native compiler. 
+in the configured @var{prefix} or this is a native compiler.
 
 @item
 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 
+The macro @code{MD_EXEC_PREFIX}, if defined, but only if this is a native
 compiler.
 
 @item
-The macro @code{MD_STARTFILE_PREFIX}, if defined, but only if this is a 
+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{MD_STARTFILE_PREFIX_1}, if defined, but only if this is a 
+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
@@ -664,24 +672,21 @@ Its default setting is 0.
 @cindex optional hardware or system features
 @cindex features, optional, in system conventions
 
-@deftypefn {Target Hook} bool TARGET_HANDLE_OPTION (size_t @var{code}, const char *@var{arg}, int @var{value})
+@deftypefn {Target Hook} bool TARGET_HANDLE_OPTION (struct gcc_options *@var{opts}, struct gcc_options *@var{opts_set}, const struct cl_decoded_option *@var{decoded}, unsigned int @var{loc})
 This hook is called whenever the user specifies one of the
 target-specific options described by the @file{.opt} definition files
 (@pxref{Options}).  It has the opportunity to do some option-specific
 processing and should return true if the option is valid.  The default
 definition does nothing but return true.
 
-@var{code} specifies the @code{OPT_@var{name}} enumeration value
-associated with the selected option; @var{name} is just a rendering of
-the option name in which non-alphanumeric characters are replaced by
-underscores.  @var{arg} specifies the string argument and is null if
-no argument was given.  If the option is flagged as a @code{UInteger}
-(@pxref{Option properties}), @var{value} is the numeric value of the
-argument.  Otherwise @var{value} is 1 if the positive form of the
-option was used and 0 if the ``no-'' form was.
+@var{decoded} specifies the option and its arguments.  @var{opts} and
+@var{opts_set} are the @code{gcc_options} structures to be used for
+storing option state, and @var{loc} is the location at which the
+option was passed (@code{UNKNOWN_LOCATION} except for options passed
+via attributes).
 @end deftypefn
 
-@deftypefn {Target Hook} bool TARGET_HANDLE_C_OPTION (size_t @var{code}, const char *@var{arg}, int @var{value})
+@deftypefn {Target Hook} bool TARGET_HANDLE_C_OPTION (size_t @var{code}, const char *@var{arg}, int @var{value})
 This target hook is called whenever the user specifies one of the
 target-specific C language family options described by the @file{.opt}
 definition files(@pxref{Options}).  It has the opportunity to do some
@@ -695,34 +700,18 @@ only available in the C (and related language) front ends, then you
 should use @code{TARGET_HANDLE_C_OPTION} instead.
 @end deftypefn
 
-@deftypefn {Target Hook} tree TARGET_OBJC_CONSTRUCT_STRING_OBJECT (tree @var{string})
+@deftypefn {Target Hook} tree TARGET_OBJC_CONSTRUCT_STRING_OBJECT (tree @var{string})
 Targets may provide a string object type that can be used within and between C, C++ and their respective Objective-C dialects. A string object might, for example, embed encoding and length information. These objects are considered opaque to the compiler and handled as references. An ideal implementation makes the composition of the string object match that of the Objective-C @code{NSString} (@code{NXString} for GNUStep), allowing efficient interworking between C-only and Objective-C code. If a target implements string objects then this hook should return a reference to such an object constructed from the normal `C' string representation provided in @var{string}. At present, the hook is used by Objective-C only, to obtain a common-format string object when the target provides one.
 @end deftypefn
 
-@deftypefn {Target Hook} bool TARGET_STRING_OBJECT_REF_TYPE_P (const_tree @var{stringref})
+@deftypefn {Target Hook} bool TARGET_STRING_OBJECT_REF_TYPE_P (const_tree @var{stringref})
 If a target implements string objects then this hook should return @code{true} if @var{stringref} is a valid reference to such an object.
 @end deftypefn
 
-@deftypefn {Target Hook} void TARGET_CHECK_STRING_OBJECT_FORMAT_ARG (tree @var{format_arg}, tree @var{args_list})
+@deftypefn {Target Hook} void TARGET_CHECK_STRING_OBJECT_FORMAT_ARG (tree @var{format_arg}, tree @var{args_list})
 If a target implements string objects then this hook should should  provide a facility to check the function arguments in @var{args_list}  against the format specifiers in @var{format_arg} where the type of  @var{format_arg} is one recognized as a valid string reference type.
 @end deftypefn
 
-@defmac TARGET_VERSION
-This macro is a C statement to print on @code{stderr} a string
-describing the particular machine description choice.  Every machine
-description 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
-@end defmac
-
 @deftypefn {Target Hook} void TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE (void)
 This target function is similar to the hook @code{TARGET_OPTION_OVERRIDE}
 but is called when the optimize level is changed via an attribute or
@@ -973,6 +962,8 @@ which an incoming parameter is copied, or the outgoing result is computed;
 then the hook should return the same mode as @code{promote_mode}, though
 the signedness may be different.
 
+@var{type} can be NULL when promoting function arguments of libcalls.
+
 The default is to not promote arguments and return values.  You can
 also define the hook to @code{default_promote_function_mode_always_promote}
 if you would like to apply the same rules given by @code{PROMOTE_MODE}.
@@ -2343,7 +2334,7 @@ either a floating point (coprocessor) register or a general register for a
 certain operand, you should define a class @code{FLOAT_OR_GENERAL_REGS}
 which includes both of them.  Otherwise you will get suboptimal code,
 or even internal compiler errors when reload cannot find a register in the
-the class computed via @code{reg_class_subunion}.
+class computed via @code{reg_class_subunion}.
 
 You must also specify certain redundant information about the register
 classes: for each class, which classes contain it and which ones are
@@ -2533,7 +2524,7 @@ instruction for loading an immediate value into a floating-point
 register, so @code{TARGET_PREFERRED_RELOAD_CLASS} returns @code{NO_REGS} when
 @var{x} is a floating-point constant.  If the constant can't be loaded
 into any kind of register, code generation will be better if
-@code{LEGITIMATE_CONSTANT_P} makes the constant illegitimate instead
+@code{TARGET_LEGITIMATE_CONSTANT_P} makes the constant illegitimate instead
 of using @code{TARGET_PREFERRED_RELOAD_CLASS}.
 
 If an insn has pseudos in it after register allocation, reload will go
@@ -2570,8 +2561,8 @@ instruction for loading an immediate value into a floating-point
 register, so @code{PREFERRED_RELOAD_CLASS} returns @code{NO_REGS} when
 @var{x} is a floating-point constant.  If the constant can't be loaded
 into any kind of register, code generation will be better if
-@code{LEGITIMATE_CONSTANT_P} makes the constant illegitimate instead
-of using @code{PREFERRED_RELOAD_CLASS}.
+@code{TARGET_LEGITIMATE_CONSTANT_P} makes the constant illegitimate instead
+of using @code{TARGET_PREFERRED_RELOAD_CLASS}.
 
 If an insn has pseudos in it after register allocation, reload will go
 through the alternatives and call repeatedly @code{PREFERRED_RELOAD_CLASS}
@@ -2857,36 +2848,6 @@ as below:
 @end smallexample
 @end defmac
 
-@deftypefn {Target Hook} {const reg_class_t *} TARGET_IRA_COVER_CLASSES (void)
-Return an array of cover classes for the Integrated Register Allocator
-(@acronym{IRA}).  Cover classes are a set of non-intersecting register
-classes covering all hard registers used for register allocation
-purposes.  If a move between two registers in the same cover class is
-possible, it should be cheaper than a load or store of the registers.
-The array is terminated by a @code{LIM_REG_CLASSES} element.
-
-The order of cover classes in the array is important.  If two classes
-have the same cost of usage for a pseudo, the class occurred first in
-the array is chosen for the pseudo.
-
-This hook is called once at compiler startup, after the command-line
-options have been processed. It is then re-examined by every call to
-@code{target_reinit}.
-
-The default implementation returns @code{IRA_COVER_CLASSES}, if defined,
-otherwise there is no default implementation.  You must define either this
-macro or @code{IRA_COVER_CLASSES} in order to use the integrated register
-allocator with Chaitin-Briggs coloring. If the macro is not defined,
-the only available coloring algorithm is Chow's priority coloring.
-
-This hook must not be modified from @code{NULL} to non-@code{NULL} or
-vice versa by command-line option processing.
-@end deftypefn
-
-@defmac IRA_COVER_CLASSES
-See the documentation for @code{TARGET_IRA_COVER_CLASSES}.
-@end defmac
-
 @node Old Constraints
 @section Obsolete Macros for Defining Constraints
 @cindex defining constraints, obsolete method
@@ -3983,25 +3944,22 @@ This section describes the macros which let you control how various
 types of arguments are passed in registers or how they are arranged in
 the stack.
 
-@defmac FUNCTION_ARG (@var{cum}, @var{mode}, @var{type}, @var{named})
-A C expression that controls whether a function argument is passed
-in a register, and which register.
+@deftypefn {Target Hook} rtx TARGET_FUNCTION_ARG (CUMULATIVE_ARGS *@var{ca}, enum machine_mode @var{mode}, const_tree @var{type}, bool @var{named})
+Return an RTX indicating whether a function argument is passed in a
+register and if so, which register.
 
-The arguments are @var{cum}, which summarizes all the previous
+The arguments are @var{ca}, which summarizes all the previous
 arguments; @var{mode}, the machine mode of the argument; @var{type},
 the data type of the argument as a tree node or 0 if that is not known
 (which happens for C support library functions); and @var{named},
-which is 1 for an ordinary argument and 0 for nameless arguments that
-correspond to @samp{@dots{}} in the called function's prototype.
-@var{type} can be an incomplete type if a syntax error has previously
-occurred.
+which is @code{true} for an ordinary argument and @code{false} for
+nameless arguments that correspond to @samp{@dots{}} in the called
+function's prototype.  @var{type} can be an incomplete type if a
+syntax error has previously occurred.
 
-The value of the expression is usually either a @code{reg} RTX for the
-hard register in which to pass the argument, or zero to pass the
-argument on the stack.
-
-For machines like the VAX and 68000, where normally all arguments are
-pushed, zero suffices as a definition.
+The return value is usually either a @code{reg} RTX for the hard
+register in which to pass the argument, or zero to pass the argument
+on the stack.
 
 The value of the expression can also be a @code{parallel} RTX@.  This is
 used when an argument is passed in multiple locations.  The mode of the
@@ -4017,26 +3975,27 @@ As a special exception the first @code{expr_list} in the @code{parallel}
 RTX may have a first operand of zero.  This indicates that the entire
 argument is also stored on the stack.
 
-The last time this macro is called, it is called with @code{MODE ==
+The last time this hook is called, it is called with @code{MODE ==
 VOIDmode}, and its result is passed to the @code{call} or @code{call_value}
 pattern as operands 2 and 3 respectively.
 
 @cindex @file{stdarg.h} and register arguments
-The usual way to make the ISO library @file{stdarg.h} work on a machine
-where some arguments are usually passed in registers, is to cause
-nameless arguments to be passed on the stack instead.  This is done
-by making @code{FUNCTION_ARG} return 0 whenever @var{named} is 0.
-
-@cindex @code{TARGET_MUST_PASS_IN_STACK}, and @code{FUNCTION_ARG}
-@cindex @code{REG_PARM_STACK_SPACE}, and @code{FUNCTION_ARG}
+The usual way to make the ISO library @file{stdarg.h} work on a
+machine where some arguments are usually passed in registers, is to
+cause nameless arguments to be passed on the stack instead.  This is
+done by making @code{TARGET_FUNCTION_ARG} return 0 whenever
+@var{named} is @code{false}.
+
+@cindex @code{TARGET_MUST_PASS_IN_STACK}, and @code{TARGET_FUNCTION_ARG}
+@cindex @code{REG_PARM_STACK_SPACE}, and @code{TARGET_FUNCTION_ARG}
 You may use the hook @code{targetm.calls.must_pass_in_stack}
 in the definition of this macro to determine if this argument is of a
 type that must be passed in the stack.  If @code{REG_PARM_STACK_SPACE}
-is not defined and @code{FUNCTION_ARG} returns nonzero for such an
+is not defined and @code{TARGET_FUNCTION_ARG} returns nonzero for such an
 argument, the compiler will abort.  If @code{REG_PARM_STACK_SPACE} is
 defined, the argument will be computed in the stack and then loaded into
 a register.
-@end defmac
+@end deftypefn
 
 @deftypefn {Target Hook} bool TARGET_MUST_PASS_IN_STACK (enum machine_mode @var{mode}, const_tree @var{type})
 This target hook should return @code{true} if we should not pass @var{type}
@@ -4045,20 +4004,21 @@ definition that is usually appropriate, refer to @file{expr.h} for additional
 documentation.
 @end deftypefn
 
-@defmac FUNCTION_INCOMING_ARG (@var{cum}, @var{mode}, @var{type}, @var{named})
-Define this macro if the target machine has ``register windows'', so
+@deftypefn {Target Hook} rtx TARGET_FUNCTION_INCOMING_ARG (CUMULATIVE_ARGS *@var{ca}, enum machine_mode @var{mode}, const_tree @var{type}, bool @var{named})
+Define this hook if the target machine has ``register windows'', so
 that the register in which a function sees an arguments is not
 necessarily the same as the one in which the caller passed the
 argument.
 
-For such machines, @code{FUNCTION_ARG} computes the register in which
-the caller passes the value, and @code{FUNCTION_INCOMING_ARG} should
-be defined in a similar fashion to tell the function being called
-where the arguments will arrive.
+For such machines, @code{TARGET_FUNCTION_ARG} computes the register in
+which the caller passes the value, and
+@code{TARGET_FUNCTION_INCOMING_ARG} should be defined in a similar
+fashion to tell the function being called where the arguments will
+arrive.
 
-If @code{FUNCTION_INCOMING_ARG} is not defined, @code{FUNCTION_ARG}
-serves both purposes.
-@end defmac
+If @code{TARGET_FUNCTION_INCOMING_ARG} is not defined,
+@code{TARGET_FUNCTION_ARG} serves both purposes.
+@end deftypefn
 
 @deftypefn {Target Hook} int TARGET_ARG_PARTIAL_BYTES (CUMULATIVE_ARGS *@var{cum}, enum machine_mode @var{mode}, tree @var{type}, bool @var{named})
 This target hook returns the number of bytes at the beginning of an
@@ -4074,9 +4034,9 @@ structure) crosses that boundary, its first few words must be passed
 in registers and the rest must be pushed.  This macro tells the
 compiler when this occurs, and how many bytes should go in registers.
 
-@code{FUNCTION_ARG} for these arguments should return the first
+@code{TARGET_FUNCTION_ARG} for these arguments should return the first
 register to be used by the caller for this argument; likewise
-@code{FUNCTION_INCOMING_ARG}, for the called function.
+@code{TARGET_FUNCTION_INCOMING_ARG}, for the called function.
 @end deftypefn
 
 @deftypefn {Target Hook} bool TARGET_PASS_BY_REFERENCE (CUMULATIVE_ARGS *@var{cum}, enum machine_mode @var{mode}, const_tree @var{type}, bool @var{named})
@@ -4105,10 +4065,10 @@ The default version of this hook always returns false.
 @end deftypefn
 
 @defmac CUMULATIVE_ARGS
-A C type for declaring a variable that is used as the first argument of
-@code{FUNCTION_ARG} and other related values.  For some target machines,
-the type @code{int} suffices and can hold the number of bytes of
-argument so far.
+A C type for declaring a variable that is used as the first argument
+of @code{TARGET_FUNCTION_ARG} and other related values.  For some
+target machines, the type @code{int} suffices and can hold the number
+of bytes of argument so far.
 
 There is no need to record in @code{CUMULATIVE_ARGS} anything about the
 arguments that have been passed on the stack.  The compiler has other
@@ -4170,17 +4130,17 @@ argument @var{libname} exists for symmetry with
 @c --mew 5feb93   i switched the order of the sentences.  --mew 10feb93
 @end defmac
 
-@defmac FUNCTION_ARG_ADVANCE (@var{cum}, @var{mode}, @var{type}, @var{named})
-A C statement (sans semicolon) to update the summarizer variable
-@var{cum} to advance past an argument in the argument list.  The
-values @var{mode}, @var{type} and @var{named} describe that argument.
-Once this is done, the variable @var{cum} is suitable for analyzing
-the @emph{following} argument with @code{FUNCTION_ARG}, etc.
+@deftypefn {Target Hook} void TARGET_FUNCTION_ARG_ADVANCE (CUMULATIVE_ARGS *@var{ca}, enum machine_mode @var{mode}, const_tree @var{type}, bool @var{named})
+This hook updates the summarizer variable pointed to by @var{ca} to
+advance past an argument in the argument list.  The values @var{mode},
+@var{type} and @var{named} describe that argument.  Once this is done,
+the variable @var{cum} is suitable for analyzing the @emph{following}
+argument with @code{TARGET_FUNCTION_ARG}, etc.
 
-This macro need not do anything if the argument in question was passed
+This hook need not do anything if the argument in question was passed
 on the stack.  The compiler knows how to track the amount of stack space
 used for arguments without any special help.
-@end defmac
+@end deftypefn
 
 @defmac FUNCTION_ARG_OFFSET (@var{mode}, @var{type})
 If defined, a C expression that is the number of bytes to add to the
@@ -4319,6 +4279,34 @@ insns involving vector mode @var{mode}.  At the very least, it
 must have move patterns for this mode.
 @end deftypefn
 
+@deftypefn {Target Hook} bool TARGET_ARRAY_MODE_SUPPORTED_P (enum machine_mode @var{mode}, unsigned HOST_WIDE_INT @var{nelems})
+Return true if GCC should try to use a scalar mode to store an array
+of @var{nelems} elements, given that each element has mode @var{mode}.
+Returning true here overrides the usual @code{MAX_FIXED_MODE} limit
+and allows GCC to use any defined integer mode.
+
+One use of this hook is to support vector load and store operations
+that operate on several homogeneous vectors.  For example, ARM NEON
+has operations like:
+
+@smallexample
+int8x8x3_t vld3_s8 (const int8_t *)
+@end smallexample
+
+where the return type is defined as:
+
+@smallexample
+typedef struct int8x8x3_t
+@{
+  int8x8_t val[3];
+@} int8x8x3_t;
+@end smallexample
+
+If this hook allows @code{val} to have a scalar mode, then
+@code{int8x8x3_t} can have the same mode.  GCC can then store
+@code{int8x8x3_t}s in registers rather than forcing them onto the stack.
+@end deftypefn
+
 @deftypefn {Target Hook} bool TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P (enum machine_mode @var{mode})
 Define this to return nonzero for machine modes for which the port has
 small register classes.  If this target hook returns nonzero for a given
@@ -4351,6 +4339,10 @@ to return a nonzero value when it is required, the compiler will run out
 of spill registers and print a fatal error message.
 @end deftypefn
 
+@deftypevr {Target Hook} {unsigned int} TARGET_FLAGS_REGNUM
+If the target has a dedicated flags register, and it needs to use the post-reload comparison elimination pass, then this value should be set appropriately.
+@end deftypevr
+
 @node Scalar Return
 @subsection How Scalar Function Values Are Returned
 @cindex return values in registers
@@ -4376,7 +4368,7 @@ On many machines, only @code{TYPE_MODE (@var{ret_type})} is relevant.
 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
+multiple places.  See @code{TARGET_FUNCTION_ARG} for an explanation of the
 @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
@@ -4421,10 +4413,10 @@ compiled.
 
 @deftypefn {Target Hook} rtx TARGET_LIBCALL_VALUE (enum machine_mode @var{mode}, const_rtx @var{fun})
 Define this hook if the back-end needs to know the name of the libcall
-function in order to determine where the result should be returned.  
+function in order to determine where the result should be returned.
 
 The mode of the result is given by @var{mode} and the name of the called
-library function is given by @var{fun}.  The hook should return an RTX 
+library function is given by @var{fun}.  The hook should return an RTX
 representing the place where the library function result will be returned.
 
 If this hook is not defined, then LIBCALL_VALUE will be used.
@@ -5067,7 +5059,7 @@ not generate any instructions in this case.
 Define this hook to return @code{true} if the location where a function
 argument is passed depends on whether or not it is a named argument.
 
-This hook controls how the @var{named} argument to @code{FUNCTION_ARG}
+This hook controls how the @var{named} argument to @code{TARGET_FUNCTION_ARG}
 is set for varargs and stdarg functions.  If this hook returns
 @code{true}, the @var{named} argument is always true for named
 arguments, and false for unnamed arguments.  If it returns @code{false},
@@ -5153,12 +5145,12 @@ when it is called.
 If the target defines @code{TARGET_ASM_TRAMPOLINE_TEMPLATE}, then the
 first thing this hook should do is emit a block move into @var{m_tramp}
 from the memory block returned by @code{assemble_trampoline_template}.
-Note that the block move need only cover the constant parts of the 
+Note that the block move need only cover the constant parts of the
 trampoline.  If the target isolates the variable parts of the trampoline
 to the end, not all @code{TRAMPOLINE_SIZE} bytes need be copied.
 
 If the target requires any other actions, such as flushing caches or
-enabling stack execution, these actions should be performed after 
+enabling stack execution, these actions should be performed after
 initializing the trampoline proper.
 @end deftypefn
 
@@ -5362,7 +5354,7 @@ A C expression that is 1 if the RTX @var{x} is a constant which
 is a valid address.  On most machines the default definition of
 @code{(CONSTANT_P (@var{x}) && GET_CODE (@var{x}) != CONST_DOUBLE)}
 is acceptable, but a few machines are more restrictive as to which
-constant addresses are supported. 
+constant addresses are supported.
 @end defmac
 
 @defmac CONSTANT_P (@var{x})
@@ -5573,13 +5565,13 @@ These are obsolete macros, replaced by the
 @code{TARGET_MODE_DEPENDENT_ADDRESS_P} target hook.
 @end defmac
 
-@defmac LEGITIMATE_CONSTANT_P (@var{x})
-A C expression that is nonzero if @var{x} is a legitimate constant for
-an immediate operand on the target machine.  You can assume that
-@var{x} satisfies @code{CONSTANT_P}, so you need not check this.  In fact,
-@samp{1} is a suitable definition for this macro on machines where
-anything @code{CONSTANT_P} is valid.
-@end defmac
+@deftypefn {Target Hook} bool TARGET_LEGITIMATE_CONSTANT_P (enum machine_mode @var{mode}, rtx @var{x})
+This hook returns true if @var{x} is a legitimate constant for a
+@var{mode}-mode immediate operand on the target machine.  You can assume that
+@var{x} satisfies @code{CONSTANT_P}, so you need not check this.
+
+The default definition returns true.
+@end deftypefn
 
 @deftypefn {Target Hook} rtx TARGET_DELEGITIMIZE_ADDRESS (rtx @var{x})
 This hook is used to undo the possibly obfuscating effects of the
@@ -5591,10 +5583,12 @@ the semantics of these opaque @code{UNSPEC}s by converting them back
 into their original form.
 @end deftypefn
 
-@deftypefn {Target Hook} bool TARGET_CANNOT_FORCE_CONST_MEM (rtx @var{x})
+@deftypefn {Target Hook} bool TARGET_CANNOT_FORCE_CONST_MEM (enum machine_mode @var{mode}, rtx @var{x})
 This hook should return true if @var{x} is of a form that cannot (or
-should not) be spilled to the constant pool.  The default version of
-this hook returns false.
+should not) be spilled to the constant pool.  @var{mode} is the mode
+of @var{x}.
+
+The default version of this hook returns false.
 
 The primary reason to define this hook is to prevent reload from
 deciding that a non-legitimate constant would be better reloaded
@@ -5674,7 +5668,7 @@ preserved (e.g.@: used only by a reduction computation). Otherwise, the
 
 @deftypefn {Target Hook} int TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST (enum vect_cost_for_stmt @var{type_of_cost}, tree @var{vectype}, int @var{misalign})
 Returns cost of different scalar or vector statements for vectorization cost model.
-For vector memory operations the cost may depend on type (@var{vectype}) and 
+For vector memory operations the cost may depend on type (@var{vectype}) and
 misalignment value (@var{misalign}).
 @end deftypefn
 
@@ -6177,13 +6171,13 @@ are the same as to this target hook.
 @end deftypefn
 
 @defmac BRANCH_COST (@var{speed_p}, @var{predictable_p})
-A C expression for the cost of a branch instruction.  A value of 1 is the
-default; other values are interpreted relative to that. Parameter @var{speed_p}
-is true when the branch in question should be optimized for speed.  When
-it is false, @code{BRANCH_COST} should be returning value optimal for code size
-rather then performance considerations.  @var{predictable_p} is true for well
-predictable branches. On many architectures the @code{BRANCH_COST} can be
-reduced then.
+A C expression for the cost of a branch instruction.  A value of 1 is
+the default; other values are interpreted relative to that. Parameter
+@var{speed_p} is true when the branch in question should be optimized
+for speed.  When it is false, @code{BRANCH_COST} should return a value
+optimal for code size rather than performance.  @var{predictable_p} is
+true for well-predicted branches. On many architectures the
+@code{BRANCH_COST} can be reduced then.
 @end defmac
 
 Here are additional macros which do not specify precise relative costs,
@@ -6272,7 +6266,7 @@ than @code{CLEAR_RATIO}.
 @defmac SET_RATIO (@var{speed})
 The threshold of number of scalar move insns, @emph{below} which a sequence
 of insns should be generated to set memory to a constant value, instead of
-a block set insn or a library call.  
+a block set insn or a library call.
 Increasing the value will always make code faster, but
 eventually incurs high cost in increased code size.
 
@@ -6284,8 +6278,8 @@ If you don't define this, it defaults to the value of @code{MOVE_RATIO}.
 
 @defmac SET_BY_PIECES_P (@var{size}, @var{alignment})
 A C expression used to determine whether @code{store_by_pieces} will be
-used to set a chunk of memory to a constant value, or whether some 
-other mechanism will be used.  Used by @code{__builtin_memset} when 
+used to set a chunk of memory to a constant value, or whether some
+other mechanism will be used.  Used by @code{__builtin_memset} when
 storing values other than constant zero.
 Defaults to 1 if @code{move_by_pieces_ninsns} returns less
 than @code{SET_RATIO}.
@@ -6859,8 +6853,8 @@ data.
 @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
-uninitialized global data.  If not defined, and neither
-@code{ASM_OUTPUT_BSS} nor @code{ASM_OUTPUT_ALIGNED_BSS} are defined,
+uninitialized global data.  If not defined, and
+@code{ASM_OUTPUT_ALIGNED_BSS} not defined,
 uninitialized global data will be output in the data section if
 @option{-fno-common} is passed, otherwise @code{ASM_OUTPUT_COMMON} will be
 used.
@@ -7136,7 +7130,7 @@ must modify the definition of @samp{movsi} to do something appropriate
 when the source operand contains a symbolic address.  You may also
 need to alter the handling of switch statements so that they use
 relative addresses.
-@c i rearranged the order of the macros above to try to force one of 
+@c i rearranged the order of the macros above to try to force one of
 @c them to the next line, to eliminate an overfull hbox. --mew 10feb93
 
 @defmac PIC_OFFSET_TABLE_REGNUM
@@ -7324,7 +7318,7 @@ this section is associated.
 @deftypefn {Target Hook} {section *} TARGET_ASM_FUNCTION_SECTION (tree @var{decl}, enum node_frequency @var{freq}, bool @var{startup}, bool @var{exit})
 Return preferred text (sub)section for function @var{decl}.
 Main purpose of this function is to separate cold, normal and hot
-functions. @var{startup} is true when function is known to be used only 
+functions. @var{startup} is true when function is known to be used only
 at startup (from static constructors or it is @code{main()}).
 @var{exit} is true when function is known to be used only at exit
 (from static destructors).
@@ -7636,20 +7630,19 @@ in place of both @code{ASM_OUTPUT_COMMON} and
 the variable's decl in order to chose what to output.
 @end defmac
 
-@defmac ASM_OUTPUT_BSS (@var{stream}, @var{decl}, @var{name}, @var{size}, @var{rounded})
+@defmac ASM_OUTPUT_ALIGNED_BSS (@var{stream}, @var{decl}, @var{name}, @var{size}, @var{alignment})
 A C statement (sans semicolon) to output to the stdio stream
 @var{stream} the assembler definition of uninitialized global @var{decl} named
-@var{name} whose size is @var{size} bytes.  The variable @var{rounded}
-is the size rounded up to whatever alignment the caller wants.
+@var{name} whose size is @var{size} bytes.  The variable @var{alignment}
+is the alignment specified as the number of bits.
 
-Try to use function @code{asm_output_bss} defined in @file{varasm.c} when
-defining this macro.  If unable, use the expression
+Try to use function @code{asm_output_aligned_bss} defined in file
+@file{varasm.c} when defining this macro.  If unable, use the expression
 @code{assemble_name (@var{stream}, @var{name})} to output the name itself;
 before and after that, output the additional assembler syntax for defining
 the name, and a newline.
 
-There are two ways of handling global BSS@.  One is to define either
-this macro or its aligned counterpart, @code{ASM_OUTPUT_ALIGNED_BSS}.
+There are two ways of handling global BSS@.  One is to define this macro.
 The other is to have @code{TARGET_ASM_SELECT_SECTION} return a
 switchable BSS section (@pxref{TARGET_HAVE_SWITCHABLE_BSS_SECTIONS}).
 You do not need to do both.
@@ -7661,17 +7654,6 @@ not support global BSS, the front end may choose to make globals
 common in order to save space in the object file.
 @end defmac
 
-@defmac ASM_OUTPUT_ALIGNED_BSS (@var{stream}, @var{decl}, @var{name}, @var{size}, @var{alignment})
-Like @code{ASM_OUTPUT_BSS} except takes the required alignment as a
-separate, explicit argument.  If you define this macro, it is used in
-place of @code{ASM_OUTPUT_BSS}, and gives you more flexibility in
-handling the required alignment of the variable.  The alignment is specified
-as the number of bits.
-
-Try to use function @code{asm_output_aligned_bss} defined in file
-@file{varasm.c} when defining this macro.
-@end defmac
-
 @defmac ASM_OUTPUT_LOCAL (@var{stream}, @var{name}, @var{size}, @var{rounded})
 A C statement (sans semicolon) to output to the stdio stream
 @var{stream} the assembler definition of a local-common-label named
@@ -10551,14 +10533,14 @@ given mode.
 @defmac CLZ_DEFINED_VALUE_AT_ZERO (@var{mode}, @var{value})
 @defmacx CTZ_DEFINED_VALUE_AT_ZERO (@var{mode}, @var{value})
 A C expression that indicates whether the architecture defines a value
-for @code{clz} or @code{ctz} with a zero operand.  
+for @code{clz} or @code{ctz} with a zero operand.
 A result of @code{0} indicates the value is undefined.
 If the value is defined for only the RTL expression, the macro should
 evaluate to @code{1}; if the value applies also to the corresponding optab
 entry (which is normally the case if it expands directly into
-the corresponding RTL), then the macro should evaluate to @code{2}.  
+the corresponding RTL), then the macro should evaluate to @code{2}.
 In the cases where the value is defined, @var{value} should be set to
-this value.  
+this value.
 
 If this macro is not defined, the value of @code{clz} or
 @code{ctz} at zero is assumed to be undefined.
@@ -10591,7 +10573,7 @@ to @code{Pmode}.
 @defmac FUNCTION_MODE
 An alias for the machine mode used for memory references to functions
 being called, in @code{call} RTL expressions.  On most CISC machines,
-where an instruction can begin at any byte address, this should be 
+where an instruction can begin at any byte address, this should be
 @code{QImode}.  On most RISC machines, where all instructions have fixed
 size and alignment, this should be a mode with the same size and alignment
 as the machine instruction words - typically @code{SImode} or @code{HImode}.
@@ -10978,7 +10960,7 @@ passed along.
 @end deftypefn
 
 @deftypefn {Target Hook} void TARGET_SET_CURRENT_FUNCTION (tree @var{decl})
-The compiler invokes this hook whenever it changes its current function 
+The compiler invokes this hook whenever it changes its current function
 context (@code{cfun}).  You can define this function if
 the back end needs to perform any initialization or reset actions on a
 per-function basis.  For example, it may be used to implement function
@@ -11192,21 +11174,21 @@ the front end.
 
 @deftypefn {Target Hook} {const char *} TARGET_INVALID_PARAMETER_TYPE (const_tree @var{type})
 If defined, this macro returns the diagnostic message when it is
-invalid for functions to include parameters of type @var{type}, 
+invalid for functions to include parameters of type @var{type},
 or @code{NULL} if validity should be determined by
 the front end.  This is currently used only by the C and C++ front ends.
 @end deftypefn
 
 @deftypefn {Target Hook} {const char *} TARGET_INVALID_RETURN_TYPE (const_tree @var{type})
 If defined, this macro returns the diagnostic message when it is
-invalid for functions to have return type @var{type}, 
+invalid for functions to have return type @var{type},
 or @code{NULL} if validity should be determined by
 the front end.  This is currently used only by the C and C++ front ends.
 @end deftypefn
 
 @deftypefn {Target Hook} tree TARGET_PROMOTED_TYPE (const_tree @var{type})
-If defined, this target hook returns the type to which values of 
-@var{type} should be promoted when they appear in expressions, 
+If defined, this target hook returns the type to which values of
+@var{type} should be promoted when they appear in expressions,
 analogous to the integer promotions, or @code{NULL_TREE} to use the
 front end's normal promotion rules.  This hook is useful when there are
 target-specific types with special promotion rules.
@@ -11214,10 +11196,10 @@ This is currently used only by the C and C++ front ends.
 @end deftypefn
 
 @deftypefn {Target Hook} tree TARGET_CONVERT_TO_TYPE (tree @var{type}, tree @var{expr})
-If defined, this hook returns the result of converting @var{expr} to 
-@var{type}.  It should return the converted expression, 
+If defined, this hook returns the result of converting @var{expr} to
+@var{type}.  It should return the converted expression,
 or @code{NULL_TREE} to apply the front end's normal conversion rules.
-This hook is useful when there are target-specific types with special 
+This hook is useful when there are target-specific types with special
 conversion rules.
 This is currently used only by the C and C++ front ends.
 @end deftypefn
@@ -11235,7 +11217,7 @@ NeXT runtime. By default, OBJC_JBLEN is defined to an innocuous value.
 
 @defmac LIBGCC2_UNWIND_ATTRIBUTE
 Define this macro if any target-specific attributes need to be attached
-to the functions in @file{libgcc} that provide low-level support for 
+to the functions in @file{libgcc} that provide low-level support for
 call stack unwinding.  It is used in declarations in @file{unwind-generic.h}
 and the associated definitions of those functions.
 @end defmac