additional options.
@end defmac
-@defmac SWITCH_CURTAILS_COMPILATION (@var{char})
-A C expression which determines whether the option @option{-@var{char}}
-stops compilation before the generation of an executable. The value is
-boolean, nonzero if the option does stop an executable from being
-generated, zero otherwise.
-
-By default, this macro is defined as
-@code{DEFAULT_SWITCH_CURTAILS_COMPILATION}, which handles the standard
-options properly. You need not define
-@code{SWITCH_CURTAILS_COMPILATION} unless you wish to add additional
-options which affect the generation of an executable. Any redefinition
-should call @code{DEFAULT_SWITCH_CURTAILS_COMPILATION} and then check
-for additional options.
-@end defmac
-
@defmac TARGET_OPTION_TRANSLATE_TABLE
If defined, a list of pairs of strings, the first of which is a
potential command line target to the @file{gcc} driver program, and the
should use @code{TARGET_HANDLE_C_OPTION} instead.
@end deftypefn
+@hook TARGET_OBJC_CONSTRUCT_STRING
+
@defmac TARGET_VERSION
This macro is a C statement to print on @code{stderr} a string
describing the particular machine description choice. Every machine
@end smallexample
@end defmac
-@defmac OVERRIDE_OPTIONS
-Sometimes certain combinations of command options do not make sense on
-a particular target machine. You can define a macro
-@code{OVERRIDE_OPTIONS} to take account of this. This macro, if
-defined, is executed once just after all the command options have been
-parsed.
-
-Don't use this macro to turn on various extra optimizations for
-@option{-O}. That is what @code{OPTIMIZATION_OPTIONS} is for.
-
-If you need to do something whenever the optimization level is
-changed via the optimize attribute or pragma, see
-@code{TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE}
-
-This macros is obsolete, new ports should use the target hook
-@code{TARGET_OPTION_OVERRIDE} instead.
-@end defmac
-
@hook TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
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
@end deftypefn
@defmac C_COMMON_OVERRIDE_OPTIONS
-This is similar to @code{OVERRIDE_OPTIONS} but is only used in the C
+This is similar to the @code{TARGET_OPTION_OVERRIDE} hook
+but is only used in the C
language frontends (C, Objective-C, C++, Objective-C++) and so can be
used to alter option flag variables which only exist in those
frontends.
@end defmac
-@defmac OPTIMIZATION_OPTIONS (@var{level}, @var{size})
+@hook TARGET_OPTION_OPTIMIZATION_TABLE
Some machines may desire to change what optimizations are performed for
-various optimization levels. This macro, if defined, is executed once
+various optimization levels. This variable, if defined, describes
+options to enable at particular sets of optimization levels. These
+options are processed once
just after the optimization level is determined and before the remainder
-of the command options have been parsed. Values set in this macro are
-used as the default values for the other command line options.
-
-@var{level} is the optimization level specified; 2 if @option{-O2} is
-specified, 1 if @option{-O} is specified, and 0 if neither is specified.
+of the command options have been parsed, so may be overridden by other
+options passed explicily.
-@var{size} is nonzero if @option{-Os} is specified and zero otherwise.
-
-This macro is run once at program startup and when the optimization
+This processing is run once at program startup and when the optimization
options are changed via @code{#pragma GCC optimize} or by using the
@code{optimize} attribute.
+@end deftypevr
-@strong{Do not examine @code{write_symbols} in
-this macro!} The debugging options are not supposed to alter the
-generated code.
-@end defmac
+@hook TARGET_OPTION_INIT_STRUCT
+
+@hook TARGET_OPTION_DEFAULT_PARAMS
@hook TARGET_HELP
This hook is called in response to the user invoking
line options found in its @file{.opt} file.
@end deftypefn
-@defmac CAN_DEBUG_WITHOUT_FP
-Define this macro if debugging can be performed even without a frame
-pointer. If this macro is defined, GCC will turn on the
-@option{-fomit-frame-pointer} option whenever @option{-O} is specified.
+@defmac SWITCHABLE_TARGET
+Some targets need to switch between substantially different subtargets
+during compilation. For example, the MIPS target has one subtarget for
+the traditional MIPS architecture and another for MIPS16. Source code
+can switch between these two subarchitectures using the @code{mips16}
+and @code{nomips16} attributes.
+
+Such subtargets can differ in things like the set of available
+registers, the set of available instructions, the costs of various
+operations, and so on. GCC caches a lot of this type of information
+in global variables, and recomputing them for each subtarget takes a
+significant amount of time. The compiler therefore provides a facility
+for maintaining several versions of the global variables and quickly
+switching between them; see @file{target-globals.h} for details.
+
+Define this macro to 1 if your target needs this facility. The default
+is 0.
@end defmac
@node Per-Function Data
macro need not be a constant.
@end defmac
-@defmac LIBGCC2_WORDS_BIG_ENDIAN
-Define this macro if @code{WORDS_BIG_ENDIAN} is not constant. This must be a
-constant value with the same meaning as @code{WORDS_BIG_ENDIAN}, which will be
-used only when compiling @file{libgcc2.c}. Typically the value will be set
-based on preprocessor defines.
-@end defmac
-
@defmac FLOAT_WORDS_BIG_ENDIAN
Define this macro to have the value 1 if @code{DFmode}, @code{XFmode} or
@code{TFmode} floating point numbers are stored in memory with the word
smallest value that @code{UNITS_PER_WORD} can have at run-time.
@end defmac
-@defmac UNITS_PER_SIMD_WORD (@var{mode})
-Number of units in the vectors that the vectorizer can produce for
-scalar mode @var{mode}. The default is equal to @code{UNITS_PER_WORD},
-because the vectorizer can do some transformations even in absence of
-specialized @acronym{SIMD} hardware.
-@end defmac
-
@defmac POINTER_SIZE
Width of a pointer, in bits. You must specify a value no wider than the
width of @code{Pmode}. If it is not equal to the width of @code{Pmode},
@end defmac
@defmac LIBGCC2_HAS_DF_MODE
-Define this macro if neither @code{LIBGCC2_DOUBLE_TYPE_SIZE} nor
+Define this macro if neither @code{DOUBLE_TYPE_SIZE} nor
@code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is
@code{DFmode} but you want @code{DFmode} routines in @file{libgcc2.a}
-anyway. If you don't define this and either @code{LIBGCC2_DOUBLE_TYPE_SIZE}
+anyway. If you don't define this and either @code{DOUBLE_TYPE_SIZE}
or @code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is 64 then the default is 1,
otherwise it is 0.
@end defmac
@code{FLT_MANT_DIG} is used for @code{SF_SIZE}, @code{LDBL_MANT_DIG}
for @code{XF_SIZE} and @code{TF_SIZE}, and @code{DBL_MANT_DIG} or
@code{LDBL_MANT_DIG} for @code{DF_SIZE} according to whether
-@code{LIBGCC2_DOUBLE_TYPE_SIZE} or
+@code{DOUBLE_TYPE_SIZE} or
@code{LIBGCC2_LONG_DOUBLE_TYPE_SIZE} is 64.
@end defmac
This macro also has strict and non-strict variants.
@end defmac
+@hook TARGET_PREFERRED_RELOAD_CLASS
+A target hook that places additional restrictions on the register class
+to use when it is necessary to copy value @var{x} into a register in class
+@var{rclass}. The value is a register class; perhaps @var{rclass}, or perhaps
+another, smaller class.
+
+The default version of this hook always returns value of @code{rclass} argument.
+
+Sometimes returning a more restrictive class makes better code. For
+example, on the 68000, when @var{x} is an integer constant that is in range
+for a @samp{moveq} instruction, the value of this macro is always
+@code{DATA_REGS} as long as @var{rclass} includes the data registers.
+Requiring a data register guarantees that a @samp{moveq} will be used.
+
+One case where @code{TARGET_PREFERRED_RELOAD_CLASS} must not return
+@var{rclass} is if @var{x} is a legitimate constant which cannot be
+loaded into some register class. By returning @code{NO_REGS} you can
+force @var{x} into a memory location. For example, rs6000 can load
+immediate values into general-purpose registers, but does not have an
+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
+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{TARGET_PREFERRED_RELOAD_CLASS}
+to find the best one. Returning @code{NO_REGS}, in this case, makes
+reload add a @code{!} in front of the constraint: the x86 back-end uses
+this feature to discourage usage of 387 registers when math is done in
+the SSE registers (and vice versa).
+@end deftypefn
+
@defmac PREFERRED_RELOAD_CLASS (@var{x}, @var{class})
A C expression that places additional restrictions on the register class
to use when it is necessary to copy value @var{x} into a register in class
reload from using some alternatives, like @code{PREFERRED_RELOAD_CLASS}.
@end defmac
+@hook TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
+Like @code{TARGET_PREFERRED_RELOAD_CLASS}, but for output reloads instead of
+input reloads.
+
+The default version of this hook always returns value of @code{rclass}
+argument.
+
+You can also use @code{TARGET_PREFERRED_OUTPUT_RELOAD_CLASS} to discourage
+reload from using some alternatives, like @code{TARGET_PREFERRED_RELOAD_CLASS}.
+@end deftypefn
+
@defmac LIMIT_RELOAD_CLASS (@var{mode}, @var{class})
A C expression that places additional restrictions on the register class
to use when it is necessary to be able to hold a value of mode
is @code{BITS_PER_WORD} bits wide is correct for your machine.
@end defmac
-@defmac CLASS_LIKELY_SPILLED_P (@var{class})
-A C expression whose value is nonzero if pseudos that have been assigned
-to registers of class @var{class} would likely be spilled because
-registers of @var{class} are needed for spill registers.
+@hook TARGET_CLASS_LIKELY_SPILLED_P
+A target hook which returns @code{true} if pseudos that have been assigned
+to registers of class @var{rclass} would likely be spilled because
+registers of @var{rclass} are needed for spill registers.
-The default value of this macro returns 1 if @var{class} has exactly one
-register and zero otherwise. On most machines, this default should be
-used. Only define this macro to some other expression if pseudos
-allocated by @file{local-alloc.c} end up in memory because their hard
-registers were needed for spill registers. If this macro returns nonzero
-for those classes, those pseudos will only be allocated by
+The default version of this target hook returns @code{true} if @var{rclass}
+has exactly one register and @code{false} otherwise. On most machines, this
+default should be used. Only use this target hook to some other expression
+if pseudos allocated by @file{local-alloc.c} end up in memory because their
+hard registers were needed for spill registers. If this target hook returns
+@code{false} for those classes, those pseudos will only be allocated by
@file{global.c}, which knows how to reallocate the pseudo to another
-register. If there would not be another register available for
-reallocation, you should not change the definition of this macro since
-the only effect of such a definition would be to slow down register
+register. If there would not be another register available for reallocation,
+you should not change the implementation of this target hook since
+the only effect of such implementation would be to slow down register
allocation.
-@end defmac
+@end deftypefn
@defmac CLASS_MAX_NREGS (@var{class}, @var{mode})
A C expression for the maximum number of consecutive registers
(@pxref{Elimination}).
@end defmac
+@defmac HARD_FRAME_POINTER_IS_FRAME_POINTER
+Define this to a preprocessor constant that is nonzero if
+@code{hard_frame_pointer_rtx} and @code{frame_pointer_rtx} should be
+the same. The default definition is @samp{(HARD_FRAME_POINTER_REGNUM
+== FRAME_POINTER_REGNUM)}; you only need to define this macro if that
+definition is not suitable for use in preprocessor conditionals.
+@end defmac
+
+@defmac HARD_FRAME_POINTER_IS_ARG_POINTER
+Define this to a preprocessor constant that is nonzero if
+@code{hard_frame_pointer_rtx} and @code{arg_pointer_rtx} should be the
+same. The default definition is @samp{(HARD_FRAME_POINTER_REGNUM ==
+ARG_POINTER_REGNUM)}; you only need to define this macro if that
+definition is not suitable for use in preprocessor conditionals.
+@end defmac
+
@defmac RETURN_ADDRESS_POINTER_REGNUM
The register number of the return address pointer register, which is used to
access the current function's return address from the stack. On some
stack in its natural location.
@end defmac
-@deftypefn {Target Hook} TARGET_RETURN_POPS_ARGS (@var{fundecl}, @var{funtype}, @var{stack-size})
+@hook TARGET_RETURN_POPS_ARGS
This target hook returns the number of bytes of its own arguments that
a function pops on returning, or 0 if the function pops no arguments
and the caller must therefore pop them all after the function returns.
a function used to perform arithmetic, whose name is known specially
in the compiler and was not mentioned in the C code being compiled.
-@var{stack-size} is the number of bytes of arguments passed on the
+@var{size} is the number of bytes of arguments passed on the
stack. If a variable number of bytes is passed, it is zero, and
argument popping will always be the responsibility of the calling function.
On the VAX, all functions always pop their arguments, so the definition
-of this macro is @var{stack-size}. On the 68000, using the standard
+of this macro is @var{size}. On the 68000, using the standard
calling convention, no functions pop their arguments, so the value of
the macro is always 0 in this case. But an alternative calling
convention is available in which functions that take a fixed number of
@code{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}, tree @var{type}, bool @var{named})
+@hook TARGET_PASS_BY_REFERENCE
This target hook should return @code{true} if an argument at the
position indicated by @var{cum} should be passed by reference. This
predicate is queried after target independent reasons for being
The default version of the hook returns @code{void*}.
@end deftypefn
-@deftypefn {Target Hook} int TARGET_ENUM_VA_LIST_P (int @var{idx}, const char ** @var{pname}, tree @var{ptype})
+@hook TARGET_ENUM_VA_LIST_P
This target hook is used in function @code{c_common_nodes_and_builtins}
to iterate through the target specific builtin types for va_list. The
variable @var{idx} is used as iterator. @var{pname} has to be a pointer
-to a @code{const char *} and @var{ptype} a pointer to a @code{tree} typed
+to a @code{const char *} and @var{ptree} a pointer to a @code{tree} typed
variable.
-The arguments @var{pname} and @var{ptype} are used to store the result of
+The arguments @var{pname} and @var{ptree} are used to store the result of
this macro and are set to the name of the va_list builtin type and its
internal type.
If the return value of this macro is zero, then there is no more element.
normally defined in @file{libgcc2.c}.
@end deftypefn
+@hook TARGET_SUPPORTS_SPLIT_STACK
+
@node Varargs
@section Implementing the Varargs Macros
@cindex varargs implementation
@c 10feb93
@end defmac
-@defmac __builtin_args_info (@var{category})
-Use this built-in function to find the first anonymous arguments in
-registers.
-
-In general, a machine may have several categories of registers used for
-arguments, each for a particular category of data types. (For example,
-on some machines, floating-point registers are used for floating-point
-arguments while other arguments are passed in the general registers.)
-To make non-varargs functions use the proper calling convention, you
-have defined the @code{CUMULATIVE_ARGS} data type to record how many
-registers in each category have been used so far
-
-@code{__builtin_args_info} accesses the same data structure of type
-@code{CUMULATIVE_ARGS} after the ordinary argument layout is finished
-with it, with @var{category} specifying which word to access. Thus, the
-value indicates the first unused register in a given category.
-
-Normally, you would use @code{__builtin_args_info} in the implementation
-of @code{va_start}, accessing each category just once and storing the
-value in the @code{va_list} object. This is because @code{va_list} will
-have to update the values, and there is no way to alter the
-values accessed by @code{__builtin_args_info}.
-@end defmac
-
@defmac __builtin_next_arg (@var{lastarg})
-This is the equivalent of @code{__builtin_args_info}, for stack
-arguments. It returns the address of the first anonymous stack
+This builtin returns the address of the first anonymous stack
argument, as type @code{void *}. If @code{ARGS_GROW_DOWNWARD}, it
returns the address of the location above the first anonymous stack
argument. Use it in @code{va_start} to initialize the pointer for
@hook TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST
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
+misalignment value (@var{misalign}).
@end deftypefn
@hook TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE
parameter is true if the memory access is defined in a packed struct.
@end deftypefn
+@hook TARGET_VECTORIZE_PREFERRED_SIMD_MODE
+This hook should return the preferred mode for vectorizing scalar
+mode @var{mode}. The default is
+equal to @code{word_mode}, because the vectorizer can do some
+transformations even in absence of specialized @acronym{SIMD} hardware.
+@end deftypefn
+
+@hook TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_SIZES
+This hook should return a mask of sizes that should be iterated over
+after trying to autovectorize using the vector size derived from the
+mode returned by @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE}.
+The default is zero which means to not iterate over other vector sizes.
+@end deftypefn
+
@node Anchored Addresses
@section Anchored Addresses
@cindex anchored addresses
@code{TARGET_MEMORY_MOVE_COST} instead.
@end defmac
-@deftypefn {Target Hook} int TARGET_MEMORY_MOVE_COST (enum machine_mode @var{mode}, enum reg_class @var{regclass}, bool @var{in})
+@hook TARGET_MEMORY_MOVE_COST
This target hook should return the cost of moving data of mode @var{mode}
-between a register of class @var{class} and memory; @var{in} is @code{false}
+between a register of class @var{rclass} and memory; @var{in} is @code{false}
if the value is to be written to memory, @code{true} if it is to be read in.
This cost is relative to those in @code{TARGET_REGISTER_MOVE_COST}.
If moving between registers and memory is more expensive than between two
If you do not add this target hook, GCC uses a default cost of 4 plus
the cost of copying via a secondary reload register, if one is
needed. If your machine requires a secondary reload register to copy
-between memory and a register of @var{class} but the reload mechanism is
+between memory and a register of @var{rclass} but the reload mechanism is
more complex than copying via an intermediate, use this target hook to
reflect the actual cost of the move.
The default is that any ready insns can be chosen to be issued.
@end deftypefn
-@deftypefn {Target Hook} int TARGET_SCHED_DFA_NEW_CYCLE (FILE *@var{dump}, int @var{verbose}, rtx @var{insn}, int @var{last_clock}, int @var{clock}, int *@var{sort_p})
-
+@hook TARGET_SCHED_DFA_NEW_CYCLE
This hook is called by the insn scheduler before issuing @var{insn}
on cycle @var{clock}. If the hook returns nonzero,
@var{insn} is not issued on this processor cycle. Instead,
of instructions divided by the issue rate.
@end deftypefn
+@hook TARGET_SCHED_DISPATCH
+This hook is called by Haifa Scheduler. It returns true if dispatch scheduling
+is supported in hardware and the condition specified in the parameter is true.
+@end deftypefn
+
+@hook TARGET_SCHED_DISPATCH_DO
+This hook is called by Haifa Scheduler. It performs the operation specified
+in its second parameter.
+@end deftypefn
+
@node Sections
@section Dividing the Output into Sections (Texts, Data, @dots{})
@c the above section title is WAY too long. maybe cut the part between
``small data'' into a separate section. The default value is false.
@end deftypevr
+@hook TARGET_PROFILE_BEFORE_PROLOGUE
+
@hook TARGET_BINDS_LOCAL_P
Returns true if @var{exp} names an object for which name resolution
rules must resolve to the current ``module'' (dynamic shared library
@end defmac
@defmac PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
-Define this macro if the register defined by
-@code{PIC_OFFSET_TABLE_REGNUM} is clobbered by calls. Do not define
+A C expression that is nonzero if the register defined by
+@code{PIC_OFFSET_TABLE_REGNUM} is clobbered by calls. If not defined,
+the default is zero. Do not define
this macro if @code{PIC_OFFSET_TABLE_REGNUM} is not defined.
@end defmac
for the file format in use is appropriate.
@end defmac
+@hook TARGET_ASM_OUTPUT_SOURCE_FILENAME
+
@defmac OUTPUT_QUOTED_STRING (@var{stream}, @var{string})
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}
when the relevant string is @code{NULL}.
@end deftypefn
+@hook TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA
+A target hook to recognize @var{rtx} patterns that @code{output_addr_const}
+can't deal with, and output assembly code to @var{file} corresponding to
+the pattern @var{x}. This may be used to allow machine-dependent
+@code{UNSPEC}s to appear within constants.
+
+If target hook fails to recognize a pattern, it must return @code{false},
+so that a standard error message is printed. If it prints an error message
+itself, by calling, for example, @code{output_operand_lossage}, it may just
+return @code{true}.
+@end deftypefn
+
@defmac OUTPUT_ADDR_CONST_EXTRA (@var{stream}, @var{x}, @var{fail})
A C statement to recognize @var{rtx} patterns that
@code{output_addr_const} can't deal with, and output assembly code to
definition of this macro is provided which is correct for most systems.
@end defmac
+@defmac ASM_OUTPUT_FUNCTION_LABEL (@var{stream}, @var{name}, @var{decl})
+A C statement (sans semicolon) to output to the stdio stream
+@var{stream} the assembler definition of a label named @var{name} of
+a function.
+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. A default
+definition of this macro is provided which is correct for most systems.
+
+If this macro is not defined, then the function name is defined in the
+usual manner as a label (by means of @code{ASM_OUTPUT_LABEL}).
+@end defmac
+
@findex assemble_name_raw
@defmac ASM_OUTPUT_INTERNAL_LABEL (@var{stream}, @var{name})
Identical to @code{ASM_OUTPUT_LABEL}, except that @var{name} is known
@var{stream} any text necessary for declaring the name @var{name} of a
function which is being defined. This macro is responsible for
outputting the label definition (perhaps using
-@code{ASM_OUTPUT_LABEL}). The argument @var{decl} is the
+@code{ASM_OUTPUT_FUNCTION_LABEL}). The argument @var{decl} is the
@code{FUNCTION_DECL} tree node representing the function.
If this macro is not defined, then the function name is defined in the
-usual manner as a label (by means of @code{ASM_OUTPUT_LABEL}).
+usual manner as a label (by means of @code{ASM_OUTPUT_FUNCTION_LABEL}).
You may wish to use @code{ASM_OUTPUT_TYPE_DIRECTIVE} in the definition
of this macro.
@end defmac
@defmac SUPPORTS_WEAK
-A C expression which evaluates to true if the target supports weak symbols.
+A preprocessor constant expression which evaluates to true if the target
+supports weak symbols.
If you don't define this macro, @file{defaults.h} provides a default
definition. If either @code{ASM_WEAKEN_LABEL} or @code{ASM_WEAKEN_DECL}
-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 such as @option{-melf}.
+is defined, the default definition is @samp{1}; otherwise, it is @samp{0}.
+@end defmac
+
+@defmac TARGET_SUPPORTS_WEAK
+A C expression which evaluates to true if the target supports weak symbols.
+
+If you don't define this macro, @file{defaults.h} provides a default
+definition. The default definition is @samp{(SUPPORTS_WEAK)}. Define
+this macro if you want to control weak symbol support with a compiler
+flag such as @option{-melf}.
@end defmac
@defmac MAKE_DECL_ONE_ONLY (@var{decl})
The default is that no label is emitted.
@end deftypefn
+@hook TARGET_ASM_EMIT_EXCEPT_PERSONALITY
+
@hook TARGET_ASM_UNWIND_EMIT
This target hook emits assembly directives required to unwind the
-given instruction. This is only used when TARGET_UNWIND_INFO is set.
+given instruction. This is only used when @code{TARGET_EXCEPT_UNWIND_INFO}
+returns @code{UI_TARGET}.
@end deftypefn
+@hook TARGET_ASM_UNWIND_EMIT_BEFORE_INSN
+
@node Exception Region Output
@subsection Assembler Commands for Exception Regions
Define this macro to 0 if your target supports DWARF 2 frame unwind
information, but it does not yet work with exception handling.
Otherwise, if your target supports this information (if it defines
-@samp{INCOMING_RETURN_ADDR_RTX} and either @samp{UNALIGNED_INT_ASM_OP}
-or @samp{OBJECT_FORMAT_ELF}), GCC will provide a default definition of 1.
+@code{INCOMING_RETURN_ADDR_RTX} and either @code{UNALIGNED_INT_ASM_OP}
+or @code{OBJECT_FORMAT_ELF}), GCC will provide a default definition of 1.
+@end defmac
-If @code{TARGET_UNWIND_INFO} is defined, the target specific unwinder
-will be used in all cases. Defining this macro will enable the generation
-of DWARF 2 frame debugging information.
+@hook TARGET_EXCEPT_UNWIND_INFO
+This hook defines the mechanism that will be used for exception handling
+by the target. If the target has ABI specified unwind tables, the hook
+should return @code{UI_TARGET}. If the target is to use the
+@code{setjmp}/@code{longjmp}-based exception handling scheme, the hook
+should return @code{UI_SJLJ}. If the target supports DWARF 2 frame unwind
+information, the hook should return @code{UI_DWARF2}.
-If @code{TARGET_UNWIND_INFO} is not defined, and this macro is defined to 1,
-the DWARF 2 unwinder will be the default exception handling mechanism;
-otherwise, the @code{setjmp}/@code{longjmp}-based scheme will be used by
-default.
-@end defmac
+A target may, if exceptions are disabled, choose to return @code{UI_NONE}.
+This may end up simplifying other parts of target-specific code. The
+default implementation of this hook never returns @code{UI_NONE}.
-@defmac TARGET_UNWIND_INFO
-Define this macro if your target has ABI specified unwind tables. Usually
-these will be output by @code{TARGET_ASM_UNWIND_EMIT}.
-@end defmac
+Note that the value returned by this hook should be constant. It should
+not depend on anything except command-line switches. In particular, the
+setting @code{UI_SJLJ} must be fixed at compiler start-up as C pre-processor
+macros and builtin functions related to exception handling are set up
+depending on this setting.
+
+The default implementation of the hook first honors the
+@option{--enable-sjlj-exceptions} configure option, then
+@code{DWARF2_UNWIND_INFO}, and finally defaults to @code{UI_SJLJ}.
+@end deftypefn
@hook TARGET_UNWIND_TABLES_DEFAULT
This variable should be set to @code{true} if the target ABI requires unwinding
selection in @var{align_jumps} in a @code{JUMP_ALIGN} implementation.
@end defmac
+@hook TARGET_ASM_JUMP_ALIGN_MAX_SKIP
+The maximum number of bytes to skip before @var{label} when applying
+@code{JUMP_ALIGN}. This works only if
+@code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.
+@end deftypefn
+
@defmac LABEL_ALIGN_AFTER_BARRIER (@var{label})
The alignment (log base 2) to put in front of @var{label}, which follows
a @code{BARRIER}.
define the macro.
@end defmac
-@defmac LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP
-The maximum number of bytes to skip when applying
+@hook TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP
+The maximum number of bytes to skip before @var{label} when applying
@code{LABEL_ALIGN_AFTER_BARRIER}. This works only if
@code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.
-@end defmac
+@end deftypefn
@defmac LOOP_ALIGN (@var{label})
The alignment (log base 2) to put in front of @var{label}, which follows
selection in @code{align_loops} in a @code{LOOP_ALIGN} implementation.
@end defmac
-@defmac LOOP_ALIGN_MAX_SKIP
-The maximum number of bytes to skip when applying @code{LOOP_ALIGN}.
-This works only if @code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.
-@end defmac
+@hook TARGET_ASM_LOOP_ALIGN_MAX_SKIP
+The maximum number of bytes to skip when applying @code{LOOP_ALIGN} to
+@var{label}. This works only if @code{ASM_OUTPUT_MAX_SKIP_ALIGN} is
+defined.
+@end deftypefn
@defmac LABEL_ALIGN (@var{label})
The alignment (log base 2) to put in front of @var{label}.
selection in @code{align_labels} in a @code{LABEL_ALIGN} implementation.
@end defmac
-@defmac LABEL_ALIGN_MAX_SKIP
-The maximum number of bytes to skip when applying @code{LABEL_ALIGN}.
-This works only if @code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.
-@end defmac
+@hook TARGET_ASM_LABEL_ALIGN_MAX_SKIP
+The maximum number of bytes to skip when applying @code{LABEL_ALIGN}
+to @var{label}. This works only if @code{ASM_OUTPUT_MAX_SKIP_ALIGN}
+is defined.
+@end deftypefn
@defmac ASM_OUTPUT_SKIP (@var{stream}, @var{nbytes})
A C statement to output to the stdio stream @var{stream} an assembler
@defmac DWARF2_FRAME_INFO
Define this macro to a nonzero value if GCC should always output
-Dwarf 2 frame information. If @code{DWARF2_UNWIND_INFO}
-(@pxref{Exception Region Output} is nonzero, GCC will output this
-information not matter how you define @code{DWARF2_FRAME_INFO}.
+Dwarf 2 frame information. If @code{TARGET_EXCEPT_UNWIND_INFO}
+(@pxref{Exception Region Output}) returns @code{UI_DWARF2}, and
+exceptions are enabled, GCC will output this information not matter
+how you define @code{DWARF2_FRAME_INFO}.
@end defmac
+@hook TARGET_DEBUG_UNWIND_INFO
+This hook defines the mechanism that will be used for describing frame
+unwind information to the debugger. Normally the hook will return
+@code{UI_DWARF2} if DWARF 2 debug information is enabled, and
+return @code{UI_NONE} otherwise.
+
+A target may return @code{UI_DWARF2} even when DWARF 2 debug information
+is disabled in order to always output DWARF 2 frame information.
+
+A target may return @code{UI_TARGET} if it has ABI specified unwind tables.
+This will suppress generation of the normal debug frame unwind information.
+@end deftypefn
+
@defmac DWARF2_ASM_LINE_DEBUG_INFO
Define this macro to be a nonzero value if the assembler can generate Dwarf 2
line debug info sections. This will result in much more compact line number
tables, and hence is desirable if it works.
@end defmac
+@hook TARGET_WANT_DEBUG_PUB_SECTIONS
+
@defmac ASM_OUTPUT_DWARF_DELTA (@var{stream}, @var{size}, @var{label1}, @var{label2})
A C statement to issue assembly directives that create a difference
@var{lab1} minus @var{lab2}, using an integer of the given @var{size}.
in response to the @option{-g} option. The default behavior for VMS
is to generate minimal debug info for a traceback in the absence of
@option{-g} unless explicitly overridden with @option{-g0}. This
-behavior is controlled by @code{OPTIMIZATION_OPTIONS} and
+behavior is controlled by @code{TARGET_OPTION_OPTIMIZATION} and
@code{TARGET_OPTION_OVERRIDE}.
@end defmac
function specific options.
@end deftypefn
-@deftypefn {Target Hook} bool TARGET_OPTION_PRAGMA_PARSE (target @var{args})
+@hook TARGET_OPTION_PRAGMA_PARSE
This target hook parses the options for @code{#pragma GCC option} to
set the machine specific options for functions that occur later in the
input stream. The options should be the same as handled by the
-@code{TARGET_VALID_OPTION_ATTRIBUTE_P} hook.
+@code{TARGET_OPTION_VALID_ATTRIBUTE_P} hook.
@end deftypefn
@hook TARGET_OPTION_OVERRIDE
once just after all the command options have been parsed.
Don't use this hook to turn on various extra optimizations for
-@option{-O}. That is what @code{OPTIMIZATION_OPTIONS} is for.
+@option{-O}. That is what @code{TARGET_OPTION_OPTIMIZATION} is for.
If you need to do something whenever the optimization level is
changed via the optimize attribute or pragma, see
@defmac MATH_LIBRARY
Define this macro as a C string constant for the linker argument to link
-in the system math library, or @samp{""} if the target does not have a
+in the system math library, minus the initial @samp{"-l"}, or
+@samp{""} if the target does not have a
separate math library.
-You need only define this macro if the default of @samp{"-lm"} is wrong.
+You need only define this macro if the default of @samp{"m"} is wrong.
@end defmac
@defmac LIBRARY_PATH_ENV
built-in function.
@end deftypefn
-@deftypefn {Target Hook} tree TARGET_RESOLVE_OVERLOADED_BUILTIN (unsigned int @var{loc}, tree @var{fndecl}, void *@var{arglist})
-
+@hook TARGET_RESOLVE_OVERLOADED_BUILTIN
Select a replacement for a machine specific built-in function that
was set up by @samp{TARGET_INIT_BUILTINS}. This is done
@emph{before} regular type checking, and so allows the target to
@var{arglist} really has type @samp{VEC(tree,gc)*}
@end deftypefn
-@deftypefn {Target Hook} tree TARGET_FOLD_BUILTIN (tree @var{fndecl}, int @var{n_args}, tree *@var{argp}, bool @var{ignore})
-
+@hook TARGET_FOLD_BUILTIN
Fold a call to a machine specific built-in function that was set up by
@samp{TARGET_INIT_BUILTINS}. @var{fndecl} is the declaration of the
built-in function. @var{n_args} is the number of arguments passed to