@c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,
-@c 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+@c 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@end defmac
@defmac POINTERS_EXTEND_UNSIGNED
-A C expression whose value is greater than zero if pointers that need to be
-extended from being @code{POINTER_SIZE} bits wide to @code{Pmode} are to
-be zero-extended and zero if they are to be sign-extended. If the value
-is less then zero then there must be an "ptr_extend" instruction that
-extends a pointer from @code{POINTER_SIZE} to @code{Pmode}.
+A C expression that determines how pointers should be extended from
+@code{ptr_mode} to either @code{Pmode} or @code{word_mode}. It is
+greater than zero if pointers should be zero-extended, zero if they
+should be sign-extended, and negative if some other sort of conversion
+is needed. In the last case, the extension is done by the target's
+@code{ptr_extend} instruction.
-You need not define this macro if the @code{POINTER_SIZE} is equal
-to the width of @code{Pmode}.
+You need not define this macro if the @code{ptr_mode}, @code{Pmode}
+and @code{word_mode} are all the same width.
@end defmac
@defmac PROMOTE_MODE (@var{m}, @var{unsignedp}, @var{type})
case where structures of one field would require the structure's mode to
retain the field's mode.
-Normally, this is not needed. See the file @file{c4x.h} for an example
-of how to use this macro to prevent a structure having a floating point
-field from being accessed in an integer mode.
+Normally, this is not needed.
@end defmac
@defmac ROUND_TYPE_ALIGN (@var{type}, @var{computed}, @var{specified})
@defmac TARGET_FLOAT_FORMAT
A code distinguishing the floating point format of the target machine.
-There are four defined values:
+There are two defined values:
@ftable @code
@item IEEE_FLOAT_FORMAT
@item VAX_FLOAT_FORMAT
This code indicates the ``F float'' (for @code{float}) and ``D float''
or ``G float'' formats (for @code{double}) used on the VAX and PDP-11@.
-
-@item C4X_FLOAT_FORMAT
-This code indicates the format used on the TMS320C3x/C4x.
@end ftable
If your target uses a floating point format other than these, you must
@defmac HARD_REGNO_NREGS (@var{regno}, @var{mode})
A C expression for the number of consecutive hard registers, starting
at register number @var{regno}, required to hold a value of mode
-@var{mode}.
+@var{mode}. This macro must never return zero, even if a register
+cannot hold the requested mode - indicate that with HARD_REGNO_MODE_OK
+and/or CANNOT_CHANGE_MODE_CLASS instead.
On a machine where all registers are exactly one word, a suitable
definition of this macro is
In some cases, both an intermediate and a scratch register are required.
For input reloads, this target hook is called with nonzero @var{in_p},
-and @var{x} is an rtx that needs to be copied to a register in of class
+and @var{x} is an rtx that needs to be copied to a register of class
@var{reload_class} in @var{reload_mode}. For output reloads, this target
-hook is called with zero @var{in_p}, and a register of class @var{reload_mode}
+hook is called with zero @var{in_p}, and a register of class @var{reload_class}
needs to be copied to rtx @var{x} in @var{reload_mode}.
If copying a register of @var{reload_class} from/to @var{x} requires
available. The most common reason to implement this macro is to unwind
through signal frames.
-This macro is called from @code{uw_frame_state_for} in @file{unwind-dw2.c}
-and @file{unwind-ia64.c}. @var{context} is an @code{_Unwind_Context};
+This macro is called from @code{uw_frame_state_for} in
+@file{unwind-dw2.c}, @file{unwind-dw2-xtensa.c} and
+@file{unwind-ia64.c}. @var{context} is an @code{_Unwind_Context};
@var{fs} is an @code{_Unwind_FrameState}. Examine @code{context->ra}
for the address of the code being executed and @code{context->cfa} for
-the stack pointer value. If the frame can be decoded, the register save
-addresses should be updated in @var{fs} and the macro should evaluate to
-@code{_URC_NO_REASON}. If the frame cannot be decoded, the macro should
-evaluate to @code{_URC_END_OF_STACK}.
+the stack pointer value. If the frame can be decoded, the register
+save addresses should be updated in @var{fs} and the macro should
+evaluate to @code{_URC_NO_REASON}. If the frame cannot be decoded,
+the macro should evaluate to @code{_URC_END_OF_STACK}.
For proper signal handling in Java this macro is accompanied by
@code{MAKE_THROW_FRAME}, defined in @file{libjava/include/*-signal.h} headers.
than @code{CLEAR_RATIO}.
@end defmac
+@defmac SET_RATIO
+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.
+Increasing the value will always make code faster, but
+eventually incurs high cost in increased code size.
+
+If you don't define this, it defaults to the value of @code{MOVE_RATIO}.
+@end defmac
+
+@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
+storing values other than constant zero.
+Defaults to 1 if @code{move_by_pieces_ninsns} returns less
+than @code{SET_RATIO}.
+@end defmac
+
@defmac STORE_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 storing
-values other than constant zero and by @code{__builtin_strcpy} when
-when called with a constant source string.
+used to set a chunk of memory to a constant string value, or whether some
+other mechanism will be used. Used by @code{__builtin_strcpy} when
+called with a constant source string.
Defaults to 1 if @code{move_by_pieces_ninsns} returns less
than @code{MOVE_RATIO}.
@end defmac
The structure describes speculation types that can be used in the scheduler.
@end deftypefn
+@deftypefn {Target Hook} int TARGET_SCHED_SMS_RES_MII (struct ddg *@var{g})
+This hook is called by the swing modulo scheduler to calculate a
+resource-based lower bound which is based on the resources available in
+the machine and the resources required by each instruction. The target
+backend can use @var{g} to calculate such bound. A very simple lower
+bound will be used in case this hook is not implemented: the total number
+of instructions divided by the issue rate.
+@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
define this macro.
@end defmac
-@defmac IS_ASM_LOGICAL_LINE_SEPARATOR (@var{C})
+@defmac IS_ASM_LOGICAL_LINE_SEPARATOR (@var{C}, @var{STR})
Define this macro as a C expression which is nonzero if @var{C} is
-used as a logical line separator by the assembler.
+used as a logical line separator by the assembler. @var{STR} points
+to the position in the string where @var{C} was found; this can be used if
+a line separator uses multiple characters.
If you do not define this macro, the default is that only
the character @samp{;} is treated as a logical line separator.
line. Otherwise, it must set @var{ptr} to @code{NULL}.
@end defmac
+@defmac SHLIB_SUFFIX
+Define this macro to a C string constant containing the default shared
+library extension of the target (e.g., @samp{".so"}). @command{collect2}
+strips version information after this suffix when generating global
+constructor and destructor names. This define is only needed on targets
+that use @command{collect2} to process constructors and destructors.
+@end defmac
+
@node Instruction Output
@subsection Output of Assembler Instructions
@code{c_register_pragma_with_expansion} but not on the arguments of
pragmas registered with @code{c_register_pragma}.
-For an example use of this routine, see @file{c4x.h} and the callback
-routines defined in @file{c4x-c.c}.
-
Note that the use of @code{pragma_lex} is specific to the C and C++
compilers. It will not work in the Java or Fortran compilers, or any
other language compilers for that matter. Thus if @code{pragma_lex} is going
allocation.
@end deftypefn
+@deftypefn {Target Hook} int TARGET_UNSPEC_MAY_TRAP_P (const_rtx @var{x}, unsigned @var{flags})
+This target hook returns nonzero if @var{x}, an @code{unspec} or
+@code{unspec_volatile} operation, might cause a trap. Targets can use
+this hook to enhance precision of analysis for @code{unspec} and
+@code{unspec_volatile} operations. You may call @code{may_trap_p_1}
+to analyze inner elements of @var{x} in which case @var{flags} should be
+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
+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
+attributes that affect register usage or code generation patterns.
+The argument @var{decl} is the declaration for the new function context,
+and may be null to indicate that the compiler has left a function context
+and is returning to processing at the top level.
+The default hook function does nothing.
+
+GCC sets @code{cfun} to a dummy function context during initialization of
+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.
+@end deftypefn
+
@defmac TARGET_OBJECT_SUFFIX
Define this macro to be a C string representing the suffix for object
files on your target machine. If you do not define this macro, GCC will
This macro determines the size of the objective C jump buffer for the
NeXT runtime. By default, OBJC_JBLEN is defined to an innocuous value.
@end defmac
+
+@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
+call stack unwinding. It is used in declarations in @file{unwind-generic.h}
+and the associated definitions of those functions.
+@end defmac