@c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,
-@c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+@c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
@c Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@defmac MD_EXEC_PREFIX
If defined, this macro is an additional prefix to try after
@code{STANDARD_EXEC_PREFIX}. @code{MD_EXEC_PREFIX} is not searched
-when the @option{-b} option is used, or the compiler is built as a cross
+when the compiler is built as a cross
compiler. If you define @code{MD_EXEC_PREFIX}, then be sure to add it
to the list of directories used to find the assembler in @file{configure.in}.
@end defmac
@defmac MD_STARTFILE_PREFIX
If defined, this macro supplies an additional prefix to try after the
standard prefixes. @code{MD_EXEC_PREFIX} is not searched when the
-@option{-b} option is used, or when the compiler is built as a cross
-compiler.
+compiler is built as a cross compiler.
@end defmac
@defmac MD_STARTFILE_PREFIX_1
If defined, this macro supplies yet another prefix to try after the
-standard prefixes. It is not searched when the @option{-b} option is
-used, or when the compiler is built as a cross compiler.
+standard prefixes. It is not searched when the compiler is built as a
+cross compiler.
@end defmac
@defmac INIT_ENVIRONMENT
target-specific C language family 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 false.
+valid. The arguments are like for @code{TARGET_HANDLE_OPTION}. The
+default definition does nothing but return false.
In general, you should use @code{TARGET_HANDLE_OPTION} to handle
options. However, if processing an option requires routines that are
targets.
@end deftypefn
+@deftypefn {Target Hook} {enum machine_mode} TARGET_UNWIND_WORD_MODE (void)
+Return machine mode to be used for @code{_Unwind_Word} type.
+The default is to use @code{word_mode}.
+@end deftypefn
+
@defmac ROUND_TOWARDS_ZERO
If defined, this macro should be true if the prevailing rounding
mode is towards zero.
the highest numbered allocable register first.
@end defmac
-@defmac ORDER_REGS_FOR_LOCAL_ALLOC
+@defmac ADJUST_REG_ALLOC_ORDER
A C statement (sans semicolon) to choose the order in which to allocate
hard registers for pseudo-registers local to a basic block.
On most machines, it is not necessary to define this macro.
@end defmac
+@defmac HONOR_REG_ALLOC_ORDER
+Normally, IRA tries to estimate the costs for saving a register in the
+prologue and restoring it in the epilogue. This discourages it from
+using call-saved registers. If a machine wants to ensure that IRA
+allocates registers in the order given by REG_ALLOC_ORDER even if some
+call-saved registers appear earlier than call-used ones, this macro
+should be defined.
+@end defmac
+
@defmac IRA_HARD_REGNO_ADD_COST_MULTIPLIER (@var{regno})
In some case register allocation order is not enough for the
Integrated Register Allocator (@acronym{IRA}) to generate a good code.
is @code{BITS_PER_WORD} bits wide is correct for your machine.
@end defmac
-@defmac SMALL_REGISTER_CLASSES
-On some machines, it is risky to let hard registers live across arbitrary
-insns. Typically, these machines have instructions that require values
-to be in specific registers (like an accumulator), and reload will fail
-if the required hard register is used for another purpose across such an
-insn.
-
-Define @code{SMALL_REGISTER_CLASSES} to be an expression with a nonzero
-value on these machines. When this macro has a nonzero value, the
-compiler will try to minimize the lifetime of hard registers.
-
-It is always safe to define this macro with a nonzero value, but if you
-unnecessarily define it, you will reduce the amount of optimizations
-that can be performed in some cases. If you do not define this macro
-with a nonzero value when it is required, the compiler will run out of
-spill registers and print a fatal error message. For most machines, you
-should not define this macro at all.
-@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
must have move patterns for this mode.
@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
+@var{mode}, the compiler will try to minimize the lifetime of registers
+in @var{mode}. The hook may be called with @code{VOIDmode} as argument.
+In this case, the hook is expected to return nonzero if it returns nonzero
+for any mode.
+
+On some machines, it is risky to let hard registers live across arbitrary
+insns. Typically, these machines have instructions that require values
+to be in specific registers (like an accumulator), and reload will fail
+if the required hard register is used for another purpose across such an
+insn.
+
+Passes before reload do not know which hard registers will be used
+in an instruction, but the machine modes of the registers set or used in
+the instruction are already known. And for some machines, register
+classes are small for, say, integer registers but not for floating point
+registers. For example, the AMD x86-64 architecture requires specific
+registers for the legacy x86 integer instructions, but there are many
+SSE registers for floating point operations. On such targets, a good
+strategy may be to return nonzero from this hook for @code{INTEGRAL_MODE_P}
+machine modes but zero for the SSE register classes.
+
+The default version of this hook retuns false for any mode. It is always
+safe to redefine this hook to return with a nonzero value. But if you
+unnecessarily define it, you will reduce the amount of optimizations
+that can be performed in some cases. If you do not define this hook
+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
+
@node Scalar Return
@subsection How Scalar Function Values Are Returned
@cindex return values in registers
If the machine has register windows, so that the caller and the called
function use different registers for the return value, this macro
should recognize only the caller's register numbers.
+
+This macro has been deprecated. Use @code{TARGET_FUNCTION_VALUE_REGNO_P}
+for a new target instead.
@end defmac
+@deftypefn {Target Hook} bool TARGET_FUNCTION_VALUE_REGNO_P (const unsigned int @var{regno})
+A target hook that return @code{true} if @var{regno} is the number of a hard
+register in which the values of called function may come back.
+
+A register whose use for returning values is limited to serving as the
+second of a pair (for a value of type @code{double}, say) need not be
+recognized by this target hook.
+
+If the machine has register windows, so that the caller and the called
+function use different registers for the return value, this target hook
+should recognize only the caller's register numbers.
+
+If this hook is not defined, then FUNCTION_VALUE_REGNO_P will be used.
+@end deftypefn
+
@defmac TARGET_ENUM_VA_LIST (@var{idx}, @var{pname}, @var{ptype})
This target macro is used in function @code{c_common_nodes_and_builtins}
to iterate through the target specific builtin types for va_list. The
@findex current_function_pops_args
Your definition of the macro @code{RETURN_POPS_ARGS} decides which
functions pop their own arguments. @code{TARGET_ASM_FUNCTION_EPILOGUE}
-needs to know what was decided. The variable that is called
-@code{current_function_pops_args} is the number of bytes of its
-arguments that a function should pop. @xref{Scalar Return}.
-@c what is the "its arguments" in the above sentence referring to, pray
-@c tell? --mew 5feb93
+needs to know what was decided. The number of bytes of the current
+function's arguments that this function should pop is available in
+@code{crtl->args.pops_args}. @xref{Scalar Return}.
@end deftypefn
@itemize @bullet
are ABI-mandated names that the compiler should provide.
@end defmac
-@findex init_one_libfunc
@findex set_optab_libfunc
+@findex init_one_libfunc
@deftypefn {Target Hook} void TARGET_INIT_LIBFUNCS (void)
This hook should declare additional library routines or rename
existing ones, using the functions @code{set_optab_libfunc} and
accept.
@end defmac
-@deftypefn {Target Hook} TARGET_LEGITIMATE_ADDRESS_P (enum machine_mode @var{mode}, rtx @var{x}, bool @var{strict})
+@deftypefn {Target Hook} bool TARGET_LEGITIMATE_ADDRESS_P (enum machine_mode @var{mode}, rtx @var{x}, bool @var{strict})
A function that returns whether @var{x} (an RTX) is a legitimate memory
address on the target machine for a memory operand of mode @var{mode}.
Legitimate addresses are defined in two variants: a strict variant and a
-non-strict one. The @code{strict} parameter chooses which variant is
+non-strict one. The @var{strict} parameter chooses which variant is
desired by the caller.
The strict variant is used in the reload pass. It must be defined so
The default version returns false for all constants.
@end deftypefn
-@deftypefn {Target Hook} tree TARGET_BUILTIN_RECIPROCAL (enum tree_code @var{fn}, bool @var{tm_fn}, bool @var{sqrt})
+@deftypefn {Target Hook} tree TARGET_BUILTIN_RECIPROCAL (unsigned @var{fn}, bool @var{md_fn}, bool @var{sqrt})
This hook should return the DECL of a function that implements reciprocal of
the builtin function with builtin function code @var{fn}, or
-@code{NULL_TREE} if such a function is not available. @var{tm_fn} is true
+@code{NULL_TREE} if such a function is not available. @var{md_fn} is true
when @var{fn} is a code of a machine-dependent builtin function. When
@var{sqrt} is true, additional optimizations that apply only to the reciprocal
of a square root function are performed, and only reciprocals of @code{sqrt}
@code{widen_mult_hi/lo} idioms will be used.
@end deftypefn
-@deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_CONVERSION (enum tree_code @var{code}, tree @var{type})
+@deftypefn {Target Hook} int TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST (bool @var{runtime_test})
+Returns the cost to be added to the overhead involved with executing
+the vectorized version of a loop.
+@end deftypefn
+
+@deftypefn {Target Hook} bool TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE (const_tree @var{type}, bool @var{is_packed})
+Return true if vector alignment is reachable (by peeling N iterations) for the given type.
+@end deftypefn
+
+@deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_VEC_PERM (tree @var{type}, tree *@var{mask_element_type})
+Target builtin that implements vector permute.
+@end deftypefn
+
+@deftypefn {Target Hook} bool TARGET_VECTORIZE_BUILTIN_VEC_PERM_OK (tree @var{vec_type}, tree @var{mask})
+Return true if a vector created for @code{builtin_vec_perm} is valid.
+@end deftypefn
+
+@deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_CONVERSION (unsigned @var{code}, tree @var{dest_type}, tree @var{src_type})
This hook should return the DECL of a function that implements conversion of the
-input vector of type @var{type}.
-If @var{type} is an integral type, the result of the conversion is a vector of
-floating-point type of the same size.
-If @var{type} is a floating-point type, the result of the conversion is a vector
-of integral type of the same size.
-@var{code} specifies how the conversion is to be applied
+input vector of type @var{src_type} to type @var{dest_type}.
+The value of @var{code} is one of the enumerators in @code{enum tree_code} and
+specifies how the conversion is to be applied
(truncation, rounding, etc.).
If this hook is defined, the autovectorizer will use the
conversion. Otherwise, it will return @code{NULL_TREE}.
@end deftypefn
-@deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION (enum built_in_function @var{code}, tree @var{vec_type_out}, tree @var{vec_type_in})
-This hook should return the decl of a function that implements the vectorized
-variant of the builtin function with builtin function code @var{code} or
-@code{NULL_TREE} if such a function is not available. The return type of
-the vectorized function shall be of vector type @var{vec_type_out} and the
-argument types should be @var{vec_type_in}.
+@deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION (tree @var{fndecl}, tree @var{vec_type_out}, tree @var{vec_type_in})
+This hook should return the decl of a function that implements the
+vectorized variant of the builtin function with builtin function code
+@var{code} or @code{NULL_TREE} if such a function is not available.
+The value of @var{fndecl} is the builtin function declaration. The
+return type of the vectorized function shall be of vector type
+@var{vec_type_out} and the argument types should be @var{vec_type_in}.
@end deftypefn
@deftypefn {Target Hook} bool TARGET_SUPPORT_VECTOR_MISALIGNMENT (enum machine_mode @var{mode}, const_tree @var{type}, int @var{misalignment}, bool @var{is_packed})
@end smallexample
@end defmac
-@deftypefn {Target Hook} bool TARGET_FIXED_CONDITION_CODE_REGS (unsigned int *, unsigned int *)
+@deftypefn {Target Hook} bool TARGET_FIXED_CONDITION_CODE_REGS (unsigned int *@var{p1}, unsigned int *@var{p2})
On targets which do not use @code{(cc0)}, and which use a hard
register rather than a pseudo-register to hold condition codes, the
regular CSE passes are often not able to identify cases in which the
to enable this pass, and it should set the integers to which its
arguments point to the hard register numbers used for condition codes.
When there is only one such register, as is true on most systems, the
-integer pointed to by the second argument should be set to
+integer pointed to by @var{p2} should be set to
@code{INVALID_REGNUM}.
The default version of this hook returns false.
@end deftypefn
-@deftypefn {Target Hook} enum machine_mode TARGET_CC_MODES_COMPATIBLE (enum machine_mode, enum machine_mode)
+@deftypefn {Target Hook} {enum machine_mode} TARGET_CC_MODES_COMPATIBLE (enum machine_mode @var{m1}, enum machine_mode @var{m2})
On targets which use multiple condition code modes in class
@code{MODE_CC}, it is sometimes the case that a comparison can be
validly done in more than one mode. On such a system, define this
@samp{TARGET_SCHED_REORDER2}.
@end deftypefn
-@deftypefn {Target Hook} int TARGET_SCHED_REORDER2 (FILE *@var{file}, int @var{verbose}, rtx *@var{ready}, int *@var{n_ready}, @var{clock})
+@deftypefn {Target Hook} int TARGET_SCHED_REORDER2 (FILE *@var{file}, int @var{verbose}, rtx *@var{ready}, int *@var{n_readyp}, int @var{clock})
Like @samp{TARGET_SCHED_REORDER}, but called at a different time. That
function is called whenever the scheduler starts a new cycle. This one
is called once per iteration over a cycle, immediately after
@var{verbose} is the verbose level provided by @option{-fsched-verbose-@var{n}}.
@end deftypefn
-@deftypefn {Target Hook} int TARGET_SCHED_DFA_PRE_CYCLE_INSN (void)
+@deftypefn {Target Hook} rtx TARGET_SCHED_DFA_PRE_CYCLE_INSN (void)
The hook returns an RTL insn. The automaton state used in the
pipeline hazard recognizer is changed as if the insn were scheduled
when the new simulated processor cycle starts. Usage of the hook may
The hook can be used to initialize data used by the previous hook.
@end deftypefn
-@deftypefn {Target Hook} int TARGET_SCHED_DFA_POST_CYCLE_INSN (void)
+@deftypefn {Target Hook} rtx TARGET_SCHED_DFA_POST_CYCLE_INSN (void)
The hook is analogous to @samp{TARGET_SCHED_DFA_PRE_CYCLE_INSN} but used
to changed the state as if the insn were scheduled when the new
simulated processor cycle finishes.
used to initialize data used by the previous hook.
@end deftypefn
-@deftypefn {Target Hook} void TARGET_SCHED_DFA_PRE_CYCLE_ADVANCE (void)
+@deftypefn {Target Hook} void TARGET_SCHED_DFA_PRE_ADVANCE_CYCLE (void)
The hook to notify target that the current simulated cycle is about to finish.
The hook is analogous to @samp{TARGET_SCHED_DFA_PRE_CYCLE_INSN} but used
to change the state in more complicated situations - e.g., when advancing
state on a single insn is not enough.
@end deftypefn
-@deftypefn {Target Hook} void TARGET_SCHED_DFA_POST_CYCLE_ADVANCE (void)
+@deftypefn {Target Hook} void TARGET_SCHED_DFA_POST_ADVANCE_CYCLE (void)
The hook to notify target that new simulated cycle has just started.
The hook is analogous to @samp{TARGET_SCHED_DFA_POST_CYCLE_INSN} but used
to change the state in more complicated situations - e.g., when advancing
The default is no multipass scheduling.
@end deftypefn
-@deftypefn {Target Hook} int TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD (rtx)
+@deftypefn {Target Hook} int TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD (rtx @var{insn})
This hook controls what insns from the ready insn queue will be
considered for the multipass insn scheduling. If the hook returns
-zero for insn passed as the parameter, the insn will be not chosen to
+zero for @var{insn}, the insn will be not chosen to
be issued.
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 *, int, rtx, int, int, int *)
+@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})
-This hook is called by the insn scheduler before issuing insn passed
-as the third parameter on given cycle. If the hook returns nonzero,
-the insn is not issued on given processors cycle. Instead of that,
-the processor cycle is advanced. If the value passed through the last
-parameter is zero, the insn ready queue is not sorted on the new cycle
-start as usually. The first parameter passes file for debugging
-output. The second one passes the scheduler verbose level of the
-debugging output. The forth and the fifth parameter values are
-correspondingly processor cycle on which the previous insn has been
-issued and the current processor 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,
+the processor cycle is advanced. If *@var{sort_p}
+is zero, the insn ready queue is not sorted on the new cycle
+start as usually. @var{dump} and @var{verbose} specify the file and
+verbosity level to use for debugging output.
+@var{last_clock} and @var{clock} are, respectively, the
+processor cycle on which the previous insn has been issued,
+and the current processor cycle.
@end deftypefn
-@deftypefn {Target Hook} bool TARGET_SCHED_IS_COSTLY_DEPENDENCE (struct dep_def *@var{_dep}, int @var{cost}, int @var{distance})
+@deftypefn {Target Hook} bool TARGET_SCHED_IS_COSTLY_DEPENDENCE (struct _dep *@var{_dep}, int @var{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
to this hook are as follows: The first parameter @var{_dep} is the dependence
being evaluated. The second parameter @var{cost} is the cost of the
-dependence, and the third
+dependence as estimated by the scheduler, and the third
parameter @var{distance} is the distance in cycles between the two insns.
The hook returns @code{true} if considering the distance between the two
insns the dependence between them is considered costly by the target,
that will be formed, and (c) correctly emulating the grouping can be very
important. In such targets one may want to allow issuing dependent insns
closer to one another---i.e., closer than the dependence distance; however,
-not in cases of "costly dependences", which this hooks allows to define.
+not in cases of ``costly dependences'', which this hooks allows to define.
@end deftypefn
@deftypefn {Target Hook} void TARGET_SCHED_H_I_D_EXTENDED (void)
@deftypefn {Target Hook} void TARGET_SCHED_INIT_SCHED_CONTEXT (void *@var{tc}, bool @var{clean_p})
Initialize store pointed to by @var{tc} to hold target scheduling context.
It @var{clean_p} is true then initialize @var{tc} as if scheduler is at the
-beginning of the block. Otherwise, make a copy of the current context in
-@var{tc}.
+beginning of the block. Otherwise, copy the current context into @var{tc}.
@end deftypefn
@deftypefn {Target Hook} void TARGET_SCHED_SET_SCHED_CONTEXT (void *@var{tc})
-Copy target scheduling context pointer to by @var{tc} to the current context.
-@end deftypefn
-
-@deftypefn {Target Hook} void TARGET_SCHED_CLEAR_SCHED_CONTEXT (void *@var{tc})
-Deallocate internal data in target scheduling context pointed to by @var{tc}.
-@end deftypefn
-
-@deftypefn {Target Hook} void TARGET_SCHED_FREE_SCHED_CONTEXT (void *@var{tc})
-Deallocate a store for target scheduling context pointed to by @var{tc}.
-@end deftypefn
-
-@deftypefn {Target Hook} {void *} TARGET_SCHED_ALLOC_SCHED_CONTEXT (void)
-Return a pointer to a store large enough to hold target scheduling context.
-@end deftypefn
-
-@deftypefn {Target Hook} void TARGET_SCHED_INIT_SCHED_CONTEXT (void *@var{tc}, bool @var{clean_p})
-Initialize store pointed to by @var{tc} to hold target scheduling context.
-It @var{clean_p} is true then initialize @var{tc} as if scheduler is at the
-beginning of the block. Otherwise, make a copy of the current context in
-@var{tc}.
-@end deftypefn
-
-@deftypefn {Target Hook} void TARGET_SCHED_SET_SCHED_CONTEXT (void *@var{tc})
-Copy target scheduling context pointer to by @var{tc} to the current context.
+Copy target scheduling context pointed to by @var{tc} to the current context.
@end deftypefn
@deftypefn {Target Hook} void TARGET_SCHED_CLEAR_SCHED_CONTEXT (void *@var{tc})
the generated speculative pattern.
@end deftypefn
-@deftypefn {Target Hook} int TARGET_SCHED_NEEDS_BLOCK_P (rtx @var{insn})
+@deftypefn {Target Hook} bool TARGET_SCHED_NEEDS_BLOCK_P (int @var{dep_status})
This hook is called by the insn scheduler during generation of recovery code
-for @var{insn}. It should return nonzero, if the corresponding check
-instruction should branch to recovery code, or zero otherwise.
+for @var{insn}. It should return @code{true}, if the corresponding check
+instruction should branch to recovery code, or @code{false} otherwise.
@end deftypefn
-@deftypefn {Target Hook} rtx TARGET_SCHED_GEN_CHECK (rtx @var{insn}, rtx @var{label}, int @var{mutate_p})
+@deftypefn {Target Hook} rtx TARGET_SCHED_GEN_SPEC_CHECK (rtx @var{insn}, rtx @var{label}, int @var{mutate_p})
This hook is called by the insn scheduler to generate a pattern for recovery
check instruction. If @var{mutate_p} is zero, then @var{insn} is a
speculative instruction for which the check should be generated.
@var{insn} should be generated. In this case @var{label} can't be null.
@end deftypefn
-@deftypefn {Target Hook} int TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC (rtx @var{insn})
+@deftypefn {Target Hook} bool TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC (const_rtx @var{insn})
This hook is used as a workaround for
@samp{TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD} not being
called on the first instruction of the ready list. The hook is used to
-discard speculative instruction that stand first in the ready list from
-being scheduled on the current cycle. For non-speculative instructions,
-the hook should always return nonzero. For example, in the ia64 backend
+discard speculative instructions that stand first in the ready list from
+being scheduled on the current cycle. If the hook returns @code{false},
+@var{insn} will not be chosen to be issued.
+For non-speculative instructions,
+the hook should always return @code{true}. For example, in the ia64 backend
the hook is used to cancel data speculative insns when the ALAT table
is nearly full.
@end deftypefn
-@deftypefn {Target Hook} void TARGET_SCHED_SET_SCHED_FLAGS (unsigned int *@var{flags}, spec_info_t @var{spec_info})
+@deftypefn {Target Hook} void TARGET_SCHED_SET_SCHED_FLAGS (struct spec_info_def *@var{spec_info})
This hook is used by the insn scheduler to find out what features should be
-enabled/used. @var{flags} initially may have either the SCHED_RGN or SCHED_EBB
-bit set. This denotes the scheduler pass for which the data should be
-provided. The target backend should modify @var{flags} by modifying
-the bits corresponding to the following features: USE_DEPS_LIST, USE_GLAT,
-DETACH_LIFE_INFO, and DO_SPECULATION@. For the DO_SPECULATION feature
-an additional structure @var{spec_info} should be filled by the target.
+enabled/used.
+The structure *@var{spec_info} should be filled in by the target.
The structure describes speculation types that can be used in the scheduler.
@end deftypefn
uninitialized, writable small data.
@end defmac
+@defmac TLS_COMMON_ASM_OP
+If defined, a C expression whose value is a string containing the
+assembler operation to identify the following data as thread-local
+common data. The default is @code{".tls_common"}.
+@end defmac
+
+@defmac TLS_SECTION_ASM_FLAG
+If defined, a C expression whose value is a character constant
+containing the flag used to mark a section as a TLS section. The
+default is @code{'T'}.
+@end defmac
+
@defmac INIT_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
described below.
@end deftypefn
-@deftypefn {Target Hook} TARGET_ASM_RELOC_RW_MASK (void)
+@deftypefn {Target Hook} int TARGET_ASM_RELOC_RW_MASK (void)
Return a mask describing how relocations should be treated when
selecting sections. Bit 1 should be set if global relocations
should be placed in a read-write section; bit 0 should be set if
else in @code{readonly_data_section}.
@end deftypefn
-@deftypefn {Target Hook} void TARGET_MANGLE_DECL_ASSEMBLER_NAME (tree @var{decl}, tree @var{id})
+@deftypefn {Target Hook} tree TARGET_MANGLE_DECL_ASSEMBLER_NAME (tree @var{decl}, tree @var{id})
Define this hook if you need to postprocess the assembler name generated
by target-independent code. The @var{id} provided to this hook will be
the computed name (e.g., the macro @code{DECL_NAME} of the @var{decl} in C,
before overriding it.
@end deftypefn
-@deftypefn {Target Hook} const char *TARGET_STRIP_NAME_ENCODING (const char *name)
+@deftypefn {Target Hook} {const char *} TARGET_STRIP_NAME_ENCODING (const char *@var{name})
Decode @var{name} and return the real name part, sans
the characters that @code{TARGET_ENCODE_SECTION_INFO}
may have added.
@c prevent bad page break with this line
This describes the overall framework of an assembly file.
-@deftypefn {Target Hook} void TARGET_ASM_FILE_START ()
@findex default_file_start
+@deftypefn {Target Hook} void TARGET_ASM_FILE_START (void)
Output to @code{asm_out_file} any text which the assembler expects to
find at the beginning of a file. The default behavior is controlled
by two flags, documented below. Unless your target's assembler is
this function.
@end deftypefun
+@deftypefn {Target Hook} void TARGET_ASM_CODE_END (void)
+Output to @code{asm_out_file} any text which is needed before emitting
+unwind info and debug info at the end of a file. Some targets emit
+here PIC setup thunks that cannot be emitted at the end of file,
+because they couldn't have unwind info then. The default is to output
+nothing.
+@end deftypefn
+
@defmac ASM_COMMENT_START
A C string constant describing how to begin a comment in the target
assembler language. The compiler assumes that the comment will end at
macro is not defined, nothing is output for a @samp{#ident} directive.
@end defmac
-@deftypefn {Target Hook} void TARGET_ASM_NAMED_SECTION (const char *@var{name}, unsigned int @var{flags}, unsigned int @var{align})
+@deftypefn {Target Hook} void TARGET_ASM_NAMED_SECTION (const char *@var{name}, unsigned int @var{flags}, tree @var{decl})
Output assembly directives to switch to section @var{name}. The section
should have attributes as specified by @var{flags}, which is a bit mask
-of the @code{SECTION_*} flags defined in @file{output.h}. If @var{align}
-is nonzero, it contains an alignment in bytes to be used for the section,
-otherwise some target default should be used. Only targets that must
-specify an alignment within the section directive need pay attention to
-@var{align} -- we will still use @code{ASM_OUTPUT_ALIGN}.
+of the @code{SECTION_*} flags defined in @file{output.h}. If @var{decl}
+is non-NULL, it is the @code{VAR_DECL} or @code{FUNCTION_DECL} with which
+this section is associated.
@end deftypefn
-@deftypefn {Target Hook} bool TARGET_HAVE_NAMED_SECTIONS
+@deftypevr {Target Hook} bool TARGET_HAVE_NAMED_SECTIONS
This flag is true if the target supports @code{TARGET_ASM_NAMED_SECTION}.
-@end deftypefn
+@end deftypevr
@anchor{TARGET_HAVE_SWITCHABLE_BSS_SECTIONS}
-@deftypefn {Target Hook} bool TARGET_HAVE_SWITCHABLE_BSS_SECTIONS
+@deftypevr {Target Hook} bool TARGET_HAVE_SWITCHABLE_BSS_SECTIONS
This flag is true if we can create zeroed data by switching to a BSS
section and then using @code{ASM_OUTPUT_SKIP} to allocate the space.
This is true on most ELF targets.
-@end deftypefn
+@end deftypevr
@deftypefn {Target Hook} {unsigned int} TARGET_SECTION_TYPE_FLAGS (tree @var{decl}, const char *@var{name}, int @var{reloc})
Choose a set of section attributes for use by @code{TARGET_ASM_NAMED_SECTION}
hook.
@end deftypefn
-@deftypefn {Target Hook} {const char *} TARGET_ASM_RECORD_GCC_SWITCHES_SECTION
+@deftypevr {Target Hook} {const char *} TARGET_ASM_RECORD_GCC_SWITCHES_SECTION
This is the name of the section that will be created by the example
ELF implementation of the @code{TARGET_ASM_RECORD_GCC_SWITCHES} target
hook.
-@end deftypefn
+@end deftypevr
@need 2000
@node Data Output
be emitted as one-only.
@end defmac
-@deftypefn {Target Hook} void TARGET_ASM_ASSEMBLE_VISIBILITY (tree @var{decl}, const char *@var{visibility})
+@deftypefn {Target Hook} void TARGET_ASM_ASSEMBLE_VISIBILITY (tree @var{decl}, int @var{visibility})
This target hook is a function to output to @var{asm_out_file} some
commands that will make the symbol(s) associated with @var{decl} have
hidden, protected or internal visibility as specified by @var{visibility}.
library function is given by @var{symref}, which is a @code{symbol_ref}.
@end deftypefn
-@deftypefn {Target Hook} void TARGET_ASM_MARK_DECL_PRESERVED (tree @var{decl})
+@deftypefn {Target Hook} void TARGET_ASM_MARK_DECL_PRESERVED (const char *@var{symbol})
This target hook is a function to output to @var{asm_out_file} an assembler
-directive to annotate used symbol. Darwin target use .no_dead_code_strip
-directive.
+directive to annotate @var{symbol} as used. The Darwin target uses the
+.no_dead_code_strip directive.
@end deftypefn
@defmac ASM_OUTPUT_LABELREF (@var{stream}, @var{name})
encountering an @code{init_priority} attribute.
@end defmac
-@deftypefn {Target Hook} bool TARGET_HAVE_CTORS_DTORS
+@deftypevr {Target Hook} bool TARGET_HAVE_CTORS_DTORS
This value is true if the target supports some ``native'' method of
collecting constructors and destructors to be run at startup and exit.
It is false if we must use @command{collect2}.
-@end deftypefn
+@end deftypevr
@deftypefn {Target Hook} void TARGET_ASM_CONSTRUCTOR (rtx @var{symbol}, int @var{priority})
If defined, a function that outputs assembler code to arrange to call
If this macro is not defined, it is equivalent to a null statement.
@end defmac
-@deftypefn {Target Hook} void TARGET_ASM_FINAL_POSTSCAN_INSN (FILE *@var{FILE}, rtx @var{insn}, rtx *@var{opvec}, int @var{noperands})
+@deftypefn {Target Hook} void TARGET_ASM_FINAL_POSTSCAN_INSN (FILE *@var{file}, rtx @var{insn}, rtx *@var{opvec}, int @var{noperands})
If defined, this target hook is a function which is executed just after the
output of assembler code for @var{insn}, to change the mode of the assembler
if necessary.
the jump-table.
@end defmac
-@deftypefn {Target Hook} void TARGET_ASM_EMIT_UNWIND_LABEL (@var{stream}, @var{decl}, @var{for_eh}, @var{empty})
+@deftypefn {Target Hook} void TARGET_ASM_EMIT_UNWIND_LABEL (FILE *@var{stream}, tree @var{decl}, int @var{for_eh}, int @var{empty})
This target hook emits a label at the beginning of each FDE@. It
should be defined on targets where FDEs need special labels, and it
should write the appropriate label, for the FDE associated with the
The default is that FDEs are not given nonlocal labels.
@end deftypefn
-@deftypefn {Target Hook} void TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL (@var{stream})
+@deftypefn {Target Hook} void TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL (FILE *@var{stream})
This target hook emits a label at the beginning of the exception table.
It should be defined on targets where it is desirable for the table
to be broken up according to function.
The default is that no label is emitted.
@end deftypefn
-@deftypefn {Target Hook} void TARGET_UNWIND_EMIT (FILE * @var{stream}, rtx @var{insn})
-This target hook emits and assembly directives required to unwind the
+@deftypefn {Target Hook} void TARGET_UNWIND_EMIT (FILE *@var{stream}, rtx @var{insn})
+This target hook emits assembly directives required to unwind the
given instruction. This is only used when TARGET_UNWIND_INFO is set.
@end deftypefn
reference to be output using the normal Dwarf2 routines.
@end deftypefn
-@deftypefn {Target Hook} bool TARGET_ARM_EABI_UNWINDER
-This hook should be set to @code{true} on targets that use an ARM EABI
+@deftypevr {Target Hook} bool TARGET_ARM_EABI_UNWINDER
+This flag should be set to @code{true} on targets that use an ARM EABI
based unwinding library, and @code{false} on other targets. This effects
the format of unwinding tables, and how the unwinder in entered after
running a cleanup. The default is @code{false}.
-@end deftypefn
+@end deftypevr
@node Alignment Output
@subsection Assembler Commands for Alignment
is referenced by a function.
@end defmac
-@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_DWARF_DTPREL (FILE *@var{FILE}, int @var{size}, rtx @var{x})
+@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_DWARF_DTPREL (FILE *@var{file}, int @var{size}, rtx @var{x})
If defined, this target hook is a function which outputs a DTP-relative
reference to the given TLS symbol of the specified size.
@end deftypefn
@deftypefn {Target Hook} void TARGET_SET_DEFAULT_TYPE_ATTRIBUTES (tree @var{type})
If defined, this target hook is a function which assigns default attributes to
-newly defined @var{type}.
+the newly defined @var{type}.
@end deftypefn
@deftypefn {Target Hook} tree TARGET_MERGE_TYPE_ATTRIBUTES (tree @var{type1}, tree @var{type2})
target specific attribute attached to it, it will not be inlined.
@end deftypefn
-@deftypefn {Target Hook} bool TARGET_VALID_OPTION_ATTRIBUTE_P (tree @var{fndecl}, tree @var{name}, tree @var{args}, int @var{flags})
+@deftypefn {Target Hook} bool TARGET_OPTION_VALID_ATTRIBUTE_P (tree @var{fndecl}, tree @var{name}, tree @var{args}, int @var{flags})
This hook is called to parse the @code{attribute(option("..."))}, and
it allows the function to set different target machine compile time
options for the current function that might be different than the
function specific options.
@end deftypefn
-@deftypefn {Target Hook} void TARGET_OPTION_PRINT (struct cl_target_option *@var{ptr})
+@deftypefn {Target Hook} void TARGET_OPTION_PRINT (FILE *@var{file}, int @var{indent}, struct cl_target_option *@var{ptr})
This hook is called to print any additional target specific
information in the @var{struct cl_target_option} structure for
function specific options.
@section Parameters for Precompiled Header Validity Checking
@cindex parameters, precompiled headers
-@deftypefn {Target Hook} void *TARGET_GET_PCH_VALIDITY (size_t *@var{sz})
-This hook returns the data needed by @code{TARGET_PCH_VALID_P} and sets
+@deftypefn {Target Hook} {void *} TARGET_GET_PCH_VALIDITY (size_t *@var{sz})
+This hook returns a pointer to the data needed by
+@code{TARGET_PCH_VALID_P} and sets
@samp{*@var{sz}} to the size of the data in bytes.
@end deftypefn
@deftypefn {Target Hook} bool TARGET_CXX_GUARD_MASK_BIT (void)
This hook determines how guard variables are used. It should return
-@code{false} (the default) if first byte should be used. A return value of
-@code{true} indicates the least significant bit should be used.
+@code{false} (the default) if the first byte should be used. A return value of
+@code{true} indicates that only the least significant bit should be used.
@end deftypefn
@deftypefn {Target Hook} tree TARGET_CXX_GET_COOKIE_SIZE (tree @var{type})
spaces are new keywords that are similar to the @code{volatile} and
@code{const} type attributes.
-Pointers to named address spaces can a a different size than
+Pointers to named address spaces can have a different size than
pointers to the generic address space.
For example, the SPU port uses the @code{__ea} address space to refer
unsigned one.
@end defmac
-@deftypefn {Target Hook} int TARGET_MIN_DIVISIONS_FOR_RECIP_MUL (enum machine_mode @var{mode})
+@deftypefn {Target Hook} {unsigned int} TARGET_MIN_DIVISIONS_FOR_RECIP_MUL (enum machine_mode @var{mode})
When @option{-ffast-math} is in effect, GCC tries to optimize
divisions by the same divisor, by turning them into multiplications by
the reciprocal. This target hook specifies the minimum number of divisions
@end defmac
@anchor{TARGET_SHIFT_TRUNCATION_MASK}
-@deftypefn {Target Hook} int TARGET_SHIFT_TRUNCATION_MASK (enum machine_mode @var{mode})
+@deftypefn {Target Hook} {unsigned HOST_WIDE_INT} TARGET_SHIFT_TRUNCATION_MASK (enum machine_mode @var{mode})
This function describes how the standard shift patterns for @var{mode}
deal with shifts by negative amounts or by more than the width of the mode.
@xref{shift patterns}.
representation this way so unlike @code{LOAD_EXTEND_OP},
@code{TARGET_MODE_REP_EXTENDED} is expected to return either
@code{SIGN_EXTEND} or @code{UNKNOWN}. Also no target extends
-@var{mode} to @var{mode_rep} so that @var{mode_rep} is not the next
+@var{mode} to @var{rep_mode} so that @var{rep_mode} is not the next
widest integral mode and currently we take advantage of this fact.)
Similarly to @code{LOAD_EXTEND_OP} you may return a non-@code{UNKNOWN}
arguments of @samp{#pragma pack}.
@end defmac
+@deftypevr {Target Hook} bool TARGET_HANDLE_PRAGMA_EXTERN_PREFIX
+True if @code{#pragma extern_prefix} is to be supported.
+@end deftypevr
+
@defmac TARGET_DEFAULT_PACK_STRUCT
If your target requires a structure packing default other than 0 (meaning
the machine default), define this macro to the necessary value (in bytes).
@samp{TARGET_INIT_BUILTINS}.
@end deftypefn
-@deftypefn {Target Hook} tree TARGET_BUILTIN_FUNCTION (unsigned @var{code}, bool @var{initialize_p})
+@deftypefn {Target Hook} tree TARGET_BUILTIN_DECL (unsigned @var{code}, bool @var{initialize_p})
Define this hook if you have any machine-specific built-in functions
that need to be defined. It should be a function that returns the
builtin function declaration for the builtin function code @var{code}.
built-in function.
@end deftypefn
-@deftypefn {Target Hook} tree TARGET_RESOLVE_OVERLOADED_BUILTIN (tree @var{fndecl}, tree @var{arglist})
+@deftypefn {Target Hook} tree TARGET_RESOLVE_OVERLOADED_BUILTIN (unsigned int @var{loc}, tree @var{fndecl}, void *@var{arglist})
Select a replacement for a machine specific built-in function that
was set up by @samp{TARGET_INIT_BUILTINS}. This is done
arguments passed to the built-in function. The result is a
complete expression that implements the operation, usually
another @code{CALL_EXPR}.
+@var{arglist} really has type @samp{VEC(tree,gc)*}
@end deftypefn
@deftypefn {Target Hook} tree TARGET_FOLD_BUILTIN (tree @var{fndecl}, tree @var{arglist}, bool @var{ignore})
the value will be ignored.
@end deftypefn
-@deftypefn {Target Hook} const char * TARGET_INVALID_WITHIN_DOLOOP (rtx @var{insn})
+@deftypefn {Target Hook} {const char *} TARGET_INVALID_WITHIN_DOLOOP (const_rtx @var{insn})
Take an instruction in @var{insn} and return NULL if it is valid within a
-low-overhead loop, otherwise return a string why doloop could not be applied.
+low-overhead loop, otherwise return a string explaining why doloop
+could not be applied.
Many targets use special registers for low-overhead looping. For any
instruction that clobbers these this function should return a string indicating
may in turn cause a branch offset to overflow.
@end defmac
-@deftypefn {Target Hook} bool TARGET_COMMUTATIVE_P (rtx @var{x}, @var{outer_code})
+@deftypefn {Target Hook} bool TARGET_COMMUTATIVE_P (const_rtx @var{x}, int @var{outer_code})
This target hook returns @code{true} if @var{x} is considered to be commutative.
Usually, this is just COMMUTATIVE_P (@var{x}), but the HP PA doesn't consider
PLUS to be commutative inside a MEM@. @var{outer_code} is the rtx code
some parts of the back end. The hook function is not invoked in this
situation; you need not worry about the hook being invoked recursively,
or when the back end is in a partially-initialized state.
+@code{cfun} might be @code{NULL} to indicate processing at top level,
+outside of any function scope.
@end deftypefn
@defmac TARGET_OBJECT_SUFFIX
@end smallexample
@end deftypefn
-@deftypefn {Target Hook} int TARGET_BRANCH_TARGET_REGISTER_CLASS (void)
+@deftypefn {Target Hook} {enum reg_class} TARGET_BRANCH_TARGET_REGISTER_CLASS (void)
This target hook returns a register class for which branch target register
optimizations should be applied. All registers in this class should be
usable interchangeably. After reload, registers in this class will be
modes and they have different conditional execution capability, such as ARM.
@end deftypefn
+@deftypefn {Target Hook} unsigned TARGET_LOOP_UNROLL_ADJUST (unsigned @var{nunroll}, struct loop *@var{loop})
+This target hook returns a new value for the number of times @var{loop}
+should be unrolled. The parameter @var{nunroll} is the number of times
+the loop is to be unrolled. The parameter @var{loop} is a pointer to
+the loop, which is going to be checked for unrolling. This target hook
+is required only when the target has special constraints like maximum
+number of memory accesses.
+@end deftypefn
+
@defmac POWI_MAX_MULTS
If defined, this macro is interpreted as a signed integer C expression
that specifies the maximum number of floating point multiplications
that are different from @option{-I}.
@end deftypefn
-@deftypefn {Target Hook} bool TARGET_USE_LOCAL_THUNK_ALIAS_P (tree @var{fndecl})
-This target hook returns @code{true} if it is safe to use a local alias
+@defmac bool TARGET_USE_LOCAL_THUNK_ALIAS_P (tree @var{fndecl})
+This target macro returns @code{true} if it is safe to use a local alias
for a virtual function @var{fndecl} when constructing thunks,
-@code{false} otherwise. By default, the hook returns @code{true} for all
+@code{false} otherwise. By default, the macro returns @code{true} for all
functions, if a target supports aliases (i.e.@: defines
@code{ASM_OUTPUT_DEF}), @code{false} otherwise,
-@end deftypefn
+@end defmac
@defmac TARGET_FORMAT_TYPES
If defined, this macro is the name of a global variable containing
and scanf formatter settings.
@end defmac
-@deftypefn {Target Hook} bool TARGET_RELAXED_ORDERING
+@deftypevr {Target Hook} bool TARGET_RELAXED_ORDERING
If set to @code{true}, means that the target's memory model does not
guarantee that loads which do not depend on one another will access
main memory in the order of the instruction stream; if ordering is
many recent processors which implement a policy of ``relaxed,''
``weak,'' or ``release'' memory consistency, such as Alpha, PowerPC,
and ia64. The default is @code{false}.
-@end deftypefn
+@end deftypevr
@deftypefn {Target Hook} {const char *} TARGET_INVALID_ARG_FOR_UNPROTOTYPED_FN (const_tree @var{typelist}, const_tree @var{funcdecl}, const_tree @var{val})
If defined, this macro returns the diagnostic message when it is
@end deftypefn
@deftypefn {Target Hook} rtx TARGET_GET_DRAP_RTX (void)
-Define this macro to an rtx for Dynamic Realign Argument Pointer if a
+This hook should return an rtx for Dynamic Realign Argument Pointer (DRAP) if a
different argument pointer register is needed to access the function's
-argument list when stack is aligned.
+argument list due to stack realignment. Return @code{NULL} if no DRAP
+is needed.
@end deftypefn
@deftypefn {Target Hook} bool TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS (void)