-@c Copyright (C) 1988,89,92,93,94,96,97,1998 Free Software Foundation, Inc.
+@c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000
+@c Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
* Assembler Format:: Defining how to write insns and pseudo-ops to output.
* Debugging Info:: Defining the format of debugging output.
* Cross-compilation:: Handling floating point for cross-compilers.
+* Mode Switching:: Insertion of mode-switching instructions.
* Misc:: Everything else.
@end menu
@findex CPP_SPEC
@item CPP_SPEC
-A C string constant that tells the GNU CC driver program options to
+A C string constant that tells the GCC driver program options to
pass to CPP. It can also specify how to translate options you
-give to GNU CC into options for GNU CC to pass to the CPP.
+give to GCC into options for GCC to pass to the CPP.
Do not define this macro if it does not need to do anything.
which are not accessible to the preprocessor. Otherwise, it should not
be defined.
+@findex NO_BUILTIN_WCHAR_TYPE
+@item NO_BUILTIN_WCHAR_TYPE
+If this macro is defined, the preprocessor will not define the builtin macro
+@code{__WCHAR_TYPE__}. The macro @code{__WCHAR_TYPE__} must then be
+defined by @code{CPP_SPEC} instead.
+
+This should be defined if @code{WCHAR_TYPE} depends on target dependent flags
+which are not accessible to the preprocessor. Otherwise, it should not
+be defined.
+
@findex SIGNED_CHAR_SPEC
@item SIGNED_CHAR_SPEC
-A C string constant that tells the GNU CC driver program options to
+A C string constant that tells the GCC driver program options to
pass to CPP. By default, this macro is defined to pass the option
@samp{-D__CHAR_UNSIGNED__} to CPP if @code{char} will be treated as
@code{unsigned char} by @code{cc1}.
@findex CC1_SPEC
@item CC1_SPEC
-A C string constant that tells the GNU CC driver program options to
-pass to @code{cc1}. It can also specify how to translate options you
-give to GNU CC into options for GNU CC to pass to the @code{cc1}.
+A C string constant that tells the GCC driver program options to
+pass to @code{cc1}, @code{cc1plus}, @code{f771}, and the other language
+front ends.
+It can also specify how to translate options you give to GCC into options
+for GCC to pass to front ends..
Do not define this macro if it does not need to do anything.
@findex CC1PLUS_SPEC
@item CC1PLUS_SPEC
-A C string constant that tells the GNU CC driver program options to
+A C string constant that tells the GCC driver program options to
pass to @code{cc1plus}. It can also specify how to translate options you
-give to GNU CC into options for GNU CC to pass to the @code{cc1plus}.
+give to GCC into options for GCC to pass to the @code{cc1plus}.
Do not define this macro if it does not need to do anything.
+Note that everything defined in CC1_SPEC is already passed to
+@code{cc1plus} so there is no need to duplicate the contents of
+CC1_SPEC in CC1PLUS_SPEC.
@findex ASM_SPEC
@item ASM_SPEC
-A C string constant that tells the GNU CC driver program options to
+A C string constant that tells the GCC driver program options to
pass to the assembler. It can also specify how to translate options
-you give to GNU CC into options for GNU CC to pass to the assembler.
+you give to GCC into options for GCC to pass to the assembler.
See the file @file{sun3.h} for an example of this.
Do not define this macro if it does not need to do anything.
@findex ASM_FINAL_SPEC
@item ASM_FINAL_SPEC
-A C string constant that tells the GNU CC driver program how to
+A C string constant that tells the GCC driver program how to
run any programs which cleanup after the normal assembler.
Normally, this is not needed. See the file @file{mips.h} for
an example of this.
@findex LINK_SPEC
@item LINK_SPEC
-A C string constant that tells the GNU CC driver program options to
+A C string constant that tells the GCC driver program options to
pass to the linker. It can also specify how to translate options you
-give to GNU CC into options for GNU CC to pass to the linker.
+give to GCC into options for GCC to pass to the linker.
Do not define this macro if it does not need to do anything.
@findex LIBGCC_SPEC
@item LIBGCC_SPEC
-Another C string constant that tells the GNU CC driver program
+Another C string constant that tells the GCC driver program
how and when to place a reference to @file{libgcc.a} into the
linker command line. This constant is placed both before and after
the value of @code{LIB_SPEC}.
-If this macro is not defined, the GNU CC driver provides a default that
+If this macro is not defined, the GCC driver provides a default that
passes the string @samp{-lgcc} to the linker unless the @samp{-shared}
option is specified.
If defined, this macro is an additional prefix to try after
@code{STANDARD_EXEC_PREFIX}. @code{MD_EXEC_PREFIX} is not searched
when the @samp{-b} option is used, or the compiler is built as a cross
-compiler.
+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}.
@findex STANDARD_STARTFILE_PREFIX
@item STANDARD_STARTFILE_PREFIX
The definition should be an initializer for an array of structures.
Each array element should have four elements: the directory name (a
-string constant), the component name, and flag for C++-only directories,
+string constant), the component name (also a string constant), a flag
+for C++-only directories,
and a flag showing that the includes in the directory don't need to be
wrapped in @code{extern @samp{C}} when compiling C++. Mark the end of
the array with a null element.
The component name denotes what GNU package the include file is part of,
if any, in all upper-case letters. For example, it might be @samp{GCC}
-or @samp{BINUTILS}. If the package is part of the a vendor-supplied
+or @samp{BINUTILS}. If the package is part of a vendor-supplied
operating system, code the component name as @samp{0}.
-
For example, here is the definition used for VAX/VMS:
@example
@item
The directories specified by the environment variable @code{LIBRARY_PATH}
-(native only, cross compilers do not use this).
+(or port-specific name; native only, cross compilers do not use this).
@item
The macro @code{STANDARD_EXEC_PREFIX}.
@code{target_flags}.
Define a macro @code{TARGET_@var{featurename}} for each such option.
-Its definition should test a bit in @code{target_flags}; for example:
+Its definition should test a bit in @code{target_flags}. It is
+recommended that a helper macro @code{TARGET_MASK_@var{featurename}}
+is defined for each bit-value to test, and used in
+@code{TARGET_@var{featurename}} and @code{TARGET_SWITCHES}. For
+example:
@smallexample
-#define TARGET_68020 (target_flags & 1)
+#define TARGET_MASK_68020 1
+#define TARGET_68020 (target_flags & TARGET_MASK_68020)
@end smallexample
One place where these macros are used is in the condition-expressions
@smallexample
#define TARGET_SWITCHES \
- @{ @{ "68020", 1, "" @}, \
- @{ "68000", -1, "Compile for the 68000" @}, \
- @{ "", 1, "" @}@}
+ @{ @{ "68020", TARGET_MASK_68020, "" @}, \
+ @{ "68000", -TARGET_MASK_68020, "Compile for the 68000" @}, \
+ @{ "", TARGET_MASK_68020, "" @}@}
@end smallexample
@findex TARGET_OPTIONS
@findex CAN_DEBUG_WITHOUT_FP
@item CAN_DEBUG_WITHOUT_FP
Define this macro if debugging can be performed even without a frame
-pointer. If this macro is defined, GNU CC will turn on the
+pointer. If this macro is defined, GCC will turn on the
@samp{-fomit-frame-pointer} option whenever @samp{-O} is specified.
@end table
@item WORDS_BIG_ENDIAN
Define this macro to have the value 1 if, in a multiword object, the
most significant word has the lowest number. This applies to both
-memory locations and registers; GNU CC fundamentally assumes that the
+memory locations and registers; GCC fundamentally assumes that the
order of words in memory is the same as the order in registers. This
macro need not be a constant.
@findex STACK_BOUNDARY
@item STACK_BOUNDARY
+Define this macro if there is a guaranteed alignment for the stack
+pointer on this machine. The definition is a C expression
+for the desired alignment (measured in bits). This value is used as a
+default if PREFERRED_STACK_BOUNDARY is not defined.
+
+@findex PREFERRED_STACK_BOUNDARY
+@item PREFERRED_STACK_BOUNDARY
Define this macro if you wish to preserve a certain alignment for
the stack pointer. The definition is a C expression
-for the desired alignment (measured in bits).
+for the desired alignment (measured in bits). If STACK_BOUNDARY is
+also defined, this macro must evaluate to a value equal to or larger
+than STACK_BOUNDARY.
-@cindex @code{PUSH_ROUNDING}, interaction with @code{STACK_BOUNDARY}
+@cindex @code{PUSH_ROUNDING}, interaction with @code{PREFERRED_STACK_BOUNDARY}
If @code{PUSH_ROUNDING} is not defined, the stack will always be aligned
-to the specified boundary. If @code{PUSH_ROUNDING} is defined and specifies a
-less strict alignment than @code{STACK_BOUNDARY}, the stack may be
-momentarily unaligned while pushing arguments.
+to the specified boundary. If @code{PUSH_ROUNDING} is defined and specifies
+a less strict alignment than @code{PREFERRED_STACK_BOUNDARY}, the stack may
+be momentarily unaligned while pushing arguments.
@findex FUNCTION_BOUNDARY
@item FUNCTION_BOUNDARY
@findex ADJUST_FIELD_ALIGN
@item ADJUST_FIELD_ALIGN (@var{field}, @var{computed})
An expression for the alignment of a structure field @var{field} if the
-alignment computed in the usual way is @var{computed}. GNU CC uses
+alignment computed in the usual way is @var{computed}. GCC uses
this value instead of the value in @code{BIGGEST_ALIGNMENT} or
@code{BIGGEST_FIELD_ALIGNMENT}, if defined, for structure fields only.
constants to be word aligned so that @code{strcpy} calls that copy
constants can be done inline.
+@findex LOCAL_ALIGNMENT
+@item LOCAL_ALIGNMENT (@var{type}, @var{basic-align})
+If defined, a C expression to compute the alignment for a variables in
+the local store. @var{type} is the data type, and @var{basic-align} is
+the alignment that the object would ordinarily have. The value of this
+macro is used instead of that alignment to align the object.
+
+If this macro is not defined, then @var{basic-align} is used.
+
+One use of this macro is to increase alignment of medium-size data to
+make it all fit in fewer cache lines.
+
@findex EMPTY_FIELD_BOUNDARY
@item EMPTY_FIELD_BOUNDARY
Alignment in bits to be given to a structure bit field that follows an
@code{STRUCTURE_SIZE_BOUNDARY} that way, you must define
@code{PCC_BITFIELD_TYPE_MATTERS} to have a nonzero value.
-If your aim is to make GNU CC use the same conventions for laying out
+If your aim is to make GCC use the same conventions for laying out
bitfields as are used by another compiler, here is how to investigate
what the other compiler does. Compile and run this program:
Like PCC_BITFIELD_TYPE_MATTERS except that its effect is limited to
aligning a bitfield within the structure.
+@findex STRUCT_FORCE_BLK
+@item STRUCT_FORCE_BLK (@var{field})
+Return 1 if a structure containing @var{field} should be accessed using
+@code{BLKMODE}.
+
+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.
+
@findex ROUND_TYPE_SIZE
-@item ROUND_TYPE_SIZE (@var{struct}, @var{size}, @var{align})
-Define this macro as an expression for the overall size of a structure
-(given by @var{struct} as a tree node) when the size computed from the
-fields is @var{size} and the alignment is @var{align}.
+@item ROUND_TYPE_SIZE (@var{type}, @var{computed}, @var{specified})
+Define this macro as an expression for the overall size of a type
+(given by @var{type} as a tree node) when the size computed in the
+usual way is @var{computed} and the alignment is @var{specified}.
+
+The default is to round @var{computed} up to a multiple of @var{specified}.
-The default is to round @var{size} up to a multiple of @var{align}.
+@findex ROUND_TYPE_SIZE_UNIT
+@item ROUND_TYPE_SIZE_UNIT (@var{type}, @var{computed}, @var{specified})
+Similar to @code{ROUND_TYPE_SIZE}, but sizes and alignments are
+specified in units (bytes). If you define @code{ROUND_TYPE_SIZE},
+you must also define this macro and they must be defined consistently
+with each other.
@findex ROUND_TYPE_ALIGN
-@item ROUND_TYPE_ALIGN (@var{struct}, @var{computed}, @var{specified})
-Define this macro as an expression for the alignment of a structure
-(given by @var{struct} as a tree node) if the alignment computed in the
-usual way is @var{computed} and the alignment explicitly specified was
+@item ROUND_TYPE_ALIGN (@var{type}, @var{computed}, @var{specified})
+Define this macro as an expression for the alignment of a type (given
+by @var{type} as a tree node) if the alignment computed in the usual
+way is @var{computed} and the alignment explicitly specified was
@var{specified}.
The default is to use @var{specified} if it is larger; otherwise, use
@findex DEFAULT_VTABLE_THUNKS
@item DEFAULT_VTABLE_THUNKS
-GNU CC supports two ways of implementing C++ vtables: traditional or with
+GCC supports two ways of implementing C++ vtables: traditional or with
so-called ``thunks''. The flag @samp{-fvtable-thunk} chooses between them.
Define this macro to be a C expression for the default value of that flag.
-If @code{DEFAULT_VTABLE_THUNKS} is 0, GNU CC uses the traditional
+If @code{DEFAULT_VTABLE_THUNKS} is 0, GCC uses the traditional
implementation by default. The ``thunk'' implementation is more efficient
(especially if you have provided an implementation of
@code{ASM_OUTPUT_MI_THUNK}, see @ref{Function Entry}), but is not binary
compatible with code compiled using the traditional implementation.
-If you are writing a new ports, define @code{DEFAULT_VTABLE_THUNKS} to 1.
+If you are writing a new port, define @code{DEFAULT_VTABLE_THUNKS} to 1.
If you do not define this macro, the default for @samp{-fvtable-thunk} is 0.
@end table
@findex CHAR_TYPE_SIZE
@item CHAR_TYPE_SIZE
A C expression for the size in bits of the type @code{char} on the
-target machine. If you don't define this, the default is one quarter
-of a word. (If this would be less than one storage unit, it is rounded up
-to one unit.)
+target machine. If you don't define this, the default is
+@code{BITS_PER_UNIT}.
@findex MAX_CHAR_TYPE_SIZE
@item MAX_CHAR_TYPE_SIZE
* Values in Registers:: What kinds of values each reg can hold.
* Leaf Functions:: Renumbering registers for leaf functions.
* Stack Registers:: Handling a register stack such as 80387.
-* Obsolete Register Macros:: Macros formerly used for the 80387.
@end menu
@node Register Basics
automatically saves it on function entry and restores it on function
exit, if the register is used within the function.
+@findex HARD_REGNO_CALL_PART_CLOBBERED
+@item HARD_REGNO_CALL_PART_CLOBBERED (@var{regno}, @var{mode})
+@cindex call-used register
+@cindex call-clobbered register
+@cindex call-saved register
+A C expression that is non-zero if it is not permissible to store a
+value of mode @var{mode} in hard register number @var{regno} across a
+call without some part of it being clobbered. For most machines this
+macro need not be defined. It is only required for machines that do not
+preserve the entire contents of a register across a call.
+
@findex CONDITIONAL_REGISTER_USAGE
@findex fixed_regs
@findex call_used_regs
@item CONDITIONAL_REGISTER_USAGE
-Zero or more C statements that may conditionally modify two variables
-@code{fixed_regs} and @code{call_used_regs} (both of type @code{char
-[]}) after they have been initialized from the two preceding macros.
+Zero or more C statements that may conditionally modify four variables
+@code{fixed_regs}, @code{call_used_regs}, @code{global_regs}
+(these three are of type @code{char []}) and @code{reg_class_contents}
+(of type @code{HARD_REG_SET}).
+Before the macro is called @code{fixed_regs}, @code{call_used_regs}
+and @code{reg_class_contents} have been initialized from
+@code{FIXED_REGISTERS}, @code{CALL_USED_REGISTERS} and
+@code{REG_CLASS_CONTENTS}, respectively,
+@code{global_regs} has been cleared, and any @samp{-ffixed-@var{reg}},
+@samp{-fcall-used-@var{reg}} and @samp{-fcall-saved-@var{reg}} command
+options have been applied.
This is necessary in case the fixed or call-clobbered registers depend
on target flags.
@findex REG_ALLOC_ORDER
@item REG_ALLOC_ORDER
If defined, an initializer for a vector of integers, containing the
-numbers of hard registers in the order in which GNU CC should prefer
+numbers of hard registers in the order in which GCC should prefer
to use them (from most preferred to least).
If this macro is not defined, registers are used lowest numbered first
@smallexample
#define HARD_REGNO_NREGS(REGNO, MODE) \
((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
- / UNITS_PER_WORD))
+ / UNITS_PER_WORD)
@end smallexample
@findex ALTER_HARD_SUBREG
accessibility of the value in a narrower mode.
You should define this macro to return nonzero in as many cases as
-possible since doing so will allow GNU CC to perform better register
+possible since doing so will allow GCC to perform better register
allocation.
@findex AVOID_CCMODE_COPIES
@item AVOID_CCMODE_COPIES
Define this macro if the compiler should avoid copies to/from @code{CCmode}
-registers. You should only define this macro if support fo copying to/from
+registers. You should only define this macro if support for copying to/from
@code{CCmode} is incomplete.
@end table
handling, so that functions with no calls are not necessarily ``leaf
functions''.
-GNU CC assigns register numbers before it knows whether the function is
+GCC assigns register numbers before it knows whether the function is
suitable for leaf function treatment. So it needs to renumber the
registers in order to output a leaf function. The following macros
accomplish this.
@table @code
@findex LEAF_REGISTERS
@item LEAF_REGISTERS
-A C initializer for a vector, indexed by hard register number, which
+Name of a char vector, indexed by hard register number, which
contains 1 for a register that is allowable in a candidate for leaf
function treatment.
If leaf function treatment involves renumbering the registers, then the
registers marked here should be the ones before renumbering---those that
-GNU CC would ordinarily allocate. The registers which will actually be
+GCC would ordinarily allocate. The registers which will actually be
used in the assembler code, after renumbering, should not be marked with 1
in this vector.
this.
@end table
-@findex leaf_function
+@findex current_function_is_leaf
+@findex current_function_uses_only_leaf_regs
Normally, @code{FUNCTION_PROLOGUE} and @code{FUNCTION_EPILOGUE} must
-treat leaf functions specially. It can test the C variable
-@code{leaf_function} which is nonzero for leaf functions. (The variable
-@code{leaf_function} is defined only if @code{LEAF_REGISTERS} is
-defined.)
+treat leaf functions specially. They can test the C variable
+@code{current_function_is_leaf} which is nonzero for leaf functions.
+@code{current_function_is_leaf} is set prior to local register allocation
+and is valid for the remaining compiler passes. They can also test the C
+variable @code{current_function_uses_only_leaf_regs} which is nonzero for
+leaf functions which only use leaf registers.
+@code{current_function_uses_only_leaf_regs} is valid after reload and is
+only useful if @code{LEAF_REGISTERS} is defined.
@c changed this to fix overfull. ALSO: why the "it" at the beginning
@c of the next paragraph?! --mew 2feb93
Stack registers are normally written by pushing onto the stack, and are
numbered relative to the top of the stack.
-Currently, GNU CC can only handle one group of stack-like registers, and
+Currently, GCC can only handle one group of stack-like registers, and
they must be consecutively numbered.
@table @code
the stack.
@end table
-@node Obsolete Register Macros
-@subsection Obsolete Macros for Controlling Register Usage
-
-These features do not work very well. They exist because they used to
-be required to generate correct code for the 80387 coprocessor of the
-80386. They are no longer used by that machine description and may be
-removed in a later version of the compiler. Don't use them!
-
-@table @code
-@findex OVERLAPPING_REGNO_P
-@item OVERLAPPING_REGNO_P (@var{regno})
-If defined, this is a C expression whose value is nonzero if hard
-register number @var{regno} is an overlapping register. This means a
-hard register which overlaps a hard register with a different number.
-(Such overlap is undesirable, but occasionally it allows a machine to
-be supported which otherwise could not be.) This macro must return
-nonzero for @emph{all} the registers which overlap each other. GNU CC
-can use an overlapping register only in certain limited ways. It can
-be used for allocation within a basic block, and may be spilled for
-reloading; that is all.
-
-If this macro is not defined, it means that none of the hard registers
-overlap each other. This is the usual situation.
-
-@findex INSN_CLOBBERS_REGNO_P
-@item INSN_CLOBBERS_REGNO_P (@var{insn}, @var{regno})
-If defined, this is a C expression whose value should be nonzero if
-the insn @var{insn} has the effect of mysteriously clobbering the
-contents of hard register number @var{regno}. By ``mysterious'' we
-mean that the insn's RTL expression doesn't describe such an effect.
-
-If this macro is not defined, it means that no insn clobbers registers
-mysteriously. This is the usual situation; all else being equal,
-it is best for the RTL expression to show all the activity.
-
-@cindex death notes
-@findex PRESERVE_DEATH_INFO_REGNO_P
-@item PRESERVE_DEATH_INFO_REGNO_P (@var{regno})
-If defined, this is a C expression whose value is nonzero if correct
-@code{REG_DEAD} notes are needed for hard register number @var{regno}
-after reload.
-
-You would arrange to preserve death info for a register when some of the
-code in the machine description which is executed to write the assembler
-code looks at the death notes. This is necessary only when the actual
-hardware feature which GNU CC thinks of as a register is not actually a
-register of the usual sort. (It might, for example, be a hardware
-stack.)
-
-It is also useful for peepholes and linker relaxation.
-
-If this macro is not defined, it means that no death notes need to be
-preserved, and some may even be incorrect. This is the usual situation.
-@end table
-
@node Register Classes
@section Register Classes
@cindex register class definitions
@findex SMALL_REGISTER_CLASSES
@item SMALL_REGISTER_CLASSES
-Normally the compiler avoids choosing registers that have been
-explicitly mentioned in the rtl as spill registers (these registers are
-normally those used to pass parameters and return values). However,
-some machines have so few registers of certain classes that there
-would not be enough registers to use as spill registers if this were
-done.
+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 non-zero
value on these machines. When this macro has a non-zero value, the
-compiler allows registers explicitly used in the rtl to be used as spill
-registers but avoids extending the lifetime of these registers.
+compiler will try to minimize the lifetime of hard registers.
It is always safe to define this macro with a non-zero value, but if you
unnecessarily define it, you will reduce the amount of optimizations
* Caller Saves::
* Function Entry::
* Profiling::
+* Inlining::
@end menu
@node Frame Layout
You only need to define this macro if you want to support call frame
debugging information like that provided by DWARF 2.
+If this RTL is a @code{REG}, you should also define
+DWARF_FRAME_RETURN_COLUMN to @code{DWARF_FRAME_REGNUM (REGNO)}.
+
@findex INCOMING_FRAME_SP_OFFSET
@item INCOMING_FRAME_SP_OFFSET
A C expression whose value is an integer giving the offset, in bytes,
You only need to define this macro if you want to support call frame
debugging information like that provided by DWARF 2.
+
+@findex ARG_POINTER_CFA_OFFSET
+@item ARG_POINTER_CFA_OFFSET (@var{fundecl})
+A C expression whose value is an integer giving the offset, in bytes,
+from the argument pointer to the canonical frame address (cfa). The
+final value should coincide with that calculated by
+@code{INCOMING_FRAME_SP_OFFSET}. Which is unfortunately not usable
+during virtual register instantiation.
+
+The default value for this macro is @code{FIRST_PARM_OFFSET (fundecl)},
+which is correct for most machines; in general, the arguments are found
+immediately before the stack frame. Note that this is not the case on
+some targets that save registers into the caller's frame, such as SPARC
+and rs6000, and so such targets need to define this macro.
+
+You only need to define this macro if the default is incorrect, and you
+want to support call frame debugging information like that provided by
+DWARF 2.
+
+@findex SMALL_STACK
+@item SMALL_STACK
+Define this macro if the stack size for the target is very small. This
+has the effect of disabling gcc's builtin @samp{alloca}, though
+@samp{__builtin_alloca} is not affected.
@end table
@node Stack Checking
@subsection Specifying How Stack Checking is Done
-GNU CC will check that stack references are within the boundaries of
+GCC will check that stack references are within the boundaries of
the stack, if the @samp{-fstack-check} is specified, in one of three ways:
@enumerate
@item
-If the value of the @code{STACK_CHECK_BUILTIN} macro is nonzero, GNU CC
+If the value of the @code{STACK_CHECK_BUILTIN} macro is nonzero, GCC
will assume that you have arranged for stack checking to be done at
appropriate places in the configuration files, e.g., in
-@code{FUNCTION_PROLOGUE}. GNU CC will do not other special processing.
+@code{FUNCTION_PROLOGUE}. GCC will do not other special processing.
@item
If @code{STACK_CHECK_BUILTIN} is zero and you defined a named pattern
-called @code{check_stack} in your @file{md} file, GNU CC will call that
+called @code{check_stack} in your @file{md} file, GCC will call that
pattern with one argument which is the address to compare the stack
value against. You must arrange for this pattern to report an error if
the stack pointer is out of range.
@item
-If neither of the above are true, GNU CC will generate code to periodically
+If neither of the above are true, GCC will generate code to periodically
``probe'' the stack pointer using the values of the macros defined below.
@end enumerate
-Normally, you will use the default values of these macros, so GNU CC
+Normally, you will use the default values of these macros, so GCC
will use the third approach.
@table @code
A nonzero value if stack checking is done by the configuration files in a
machine-dependent manner. You should define this macro if stack checking
is require by the ABI of your machine or if you would like to have to stack
-checking in some more efficient way than GNU CC's portable approach.
+checking in some more efficient way than GCC's portable approach.
The default value of this macro is zero.
@findex STACK_CHECK_PROBE_INTERVAL
@item STACK_CHECK_PROBE_INTERVAL
-An integer representing the interval at which GNU CC must generate stack
+An integer representing the interval at which GCC must generate stack
probe instructions. You will normally define this macro to be no larger
than the size of the ``guard pages'' at the end of a stack area. The
default value of 4096 is suitable for most systems.
@findex STACK_CHECK_PROBE_LOAD
@item STACK_CHECK_PROBE_LOAD
-A integer which is nonzero if GNU CC should perform the stack probe
-as a load instruction and zero if GNU CC should use a store instruction.
+A integer which is nonzero if GCC should perform the stack probe
+as a load instruction and zero if GCC should use a store instruction.
The default is zero, which is the most efficient choice on most systems.
@findex STACK_CHECK_PROTECT
@findex STACK_CHECK_MAX_FRAME_SIZE
@item STACK_CHECK_MAX_FRAME_SIZE
-The maximum size of a stack frame, in bytes. GNU CC will generate probe
+The maximum size of a stack frame, in bytes. GCC will generate probe
instructions in non-leaf functions to ensure at least this many bytes of
stack are available. If a stack frame is larger than this size, stack
-checking will not be reliable and GNU CC will issue a warning. The
-default is chosen so that GNU CC only generates one instruction on most
+checking will not be reliable and GCC will issue a warning. The
+default is chosen so that GCC only generates one instruction on most
systems. You should normally not change the default value of this macro.
@findex STACK_CHECK_FIXED_FRAME_SIZE
@item STACK_CHECK_FIXED_FRAME_SIZE
-GNU CC uses this value to generate the above warning message. It
+GCC uses this value to generate the above warning message. It
represents the amount of fixed frame used by a function, not including
space for any callee-saved registers, temporaries and user variables.
You need only specify an upper bound for this amount and will normally
@findex STACK_CHECK_MAX_VAR_SIZE
@item STACK_CHECK_MAX_VAR_SIZE
-The maximum size, in bytes, of an object that GNU CC will place in the
+The maximum size, in bytes, of an object that GCC will place in the
fixed area of the stack frame when the user specifies
@samp{-fstack-check}.
-GNU CC computed the default from the values of the above macros and you will
+GCC computed the default from the values of the above macros and you will
normally not need to override that default.
@end table
@table @code
@findex PROMOTE_PROTOTYPES
@item PROMOTE_PROTOTYPES
-Define this macro if an argument declared in a prototype as an
-integral type smaller than @code{int} should actually be passed as an
-@code{int}. In addition to avoiding errors in certain cases of
-mismatch, it also makes for better code on certain machines.
+A C expression whose value is nonzero if an argument declared in
+a prototype as an integral type smaller than @code{int} should
+actually be passed as an @code{int}. In addition to avoiding
+errors in certain cases of mismatch, it also makes for better
+code on certain machines. If the macro is not defined in target
+header files, it defaults to 0.
+
+@findex PUSH_ARGS
+@item PUSH_ARGS
+A C expression. If nonzero, push insns will be used to pass
+outgoing arguments.
+If the target machine does not have a push instruction, set it to zero.
+That directs GCC to use an alternate strategy: to
+allocate the entire argument block and then store the arguments into
+it. When PUSH_ARGS is nonzero, PUSH_ROUNDING must be defined too.
+On some machines, the definition
@findex PUSH_ROUNDING
@item PUSH_ROUNDING (@var{npushed})
A C expression that is the number of bytes actually pushed onto the
stack when an instruction attempts to push @var{npushed} bytes.
-
-If the target machine does not have a push instruction, do not define
-this macro. That directs GNU CC to use an alternate strategy: to
-allocate the entire argument block and then store the arguments into
-it.
+@findex PUSH_ROUNDING
+@item PUSH_ROUNDING (@var{npushed})
+A C expression that is the number of bytes actually pushed onto the
+stack when an instruction attempts to push @var{npushed} bytes.
On some machines, the definition
@findex ACCUMULATE_OUTGOING_ARGS
@findex current_function_outgoing_args_size
@item ACCUMULATE_OUTGOING_ARGS
-If defined, the maximum amount of space required for outgoing arguments
+A C expression. If nonzero, the maximum amount of space required for outgoing arguments
will be computed and placed into the variable
@code{current_function_outgoing_args_size}. No space will be pushed
onto the stack for each call; instead, the function prologue should
increase the stack frame size by this amount.
-Defining both @code{PUSH_ROUNDING} and @code{ACCUMULATE_OUTGOING_ARGS}
+Setting both @code{PUSH_ARGS} and @code{ACCUMULATE_OUTGOING_ARGS}
is not proper.
@findex REG_PARM_STACK_SPACE
registers.
The value of this macro is the size, in bytes, of the area reserved for
-arguments passed in registers for the function represented by @var{fndecl}.
+arguments passed in registers for the function represented by @var{fndecl},
+which can be zero if GCC is calling a library function.
This space can be allocated by the caller, or be a part of the
machine-dependent stack frame: @code{OUTGOING_REG_PARM_STACK_SPACE} says
In each case this value can be easily computed.
When deciding whether a called function needs such stack space, and how
-much space to reserve, GNU CC uses these two macros instead of
+much space to reserve, GCC uses these two macros instead of
@code{REG_PARM_STACK_SPACE}.
@findex OUTGOING_REG_PARM_STACK_SPACE
used when an argument is passed in multiple locations. The mode of the
of the @code{parallel} should be the mode of the entire argument. The
@code{parallel} holds any number of @code{expr_list} pairs; each one
-describes where part of the argument is passed. In each @code{expr_list},
-the first operand can be either a @code{reg} RTX for the hard register
-in which to pass this part of the argument, or zero to pass the argument
-on the stack. If this operand is a @code{reg}, then the mode indicates
-how large this part of the argument is. The second operand of the
-@code{expr_list} is a @code{const_int} which gives the offset in bytes
-into the entire argument where this part starts.
+describes where part of the argument is passed. In each
+@code{expr_list} the first operand must be a @code{reg} RTX for the hard
+register in which to pass this part of the argument, and the mode of the
+register RTX indicates how large this part of the argument is. The
+second operand of the @code{expr_list} is a @code{const_int} which gives
+the offset in bytes into the entire argument of where this part starts.
+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.
@cindex @file{stdarg.h} and register arguments
The usual way to make the ANSI library @file{stdarg.h} work on a machine
undefined, @code{INIT_CUMULATIVE_ARGS} is used instead.
The value passed for @var{libname} is always 0, since library routines
-with special calling conventions are never compiled with GNU CC. The
+with special calling conventions are never compiled with GCC. The
argument @var{libname} exists for symmetry with
@code{INIT_CUMULATIVE_ARGS}.
@c could use "this macro" in place of @code{INIT_CUMULATIVE_ARGS}, maybe.
big-endian machines, the default is to pad downward for an argument of
constant size shorter than an @code{int}, and upward otherwise.
+@findex PAD_VARARGS_DOWN
+@item PAD_VARARGS_DOWN
+If defined, a C expression which determines whether the default
+implementation of va_arg will attempt to pad down before reading the
+next argument, if that argument is smaller than its aligned space as
+controlled by @code{PARM_BOUNDARY}. If this macro is not defined, all such
+arguments are padded down if @code{BYTES_BIG_ENDIAN} is true.
+
@findex FUNCTION_ARG_BOUNDARY
@item FUNCTION_ARG_BOUNDARY (@var{mode}, @var{type})
If defined, a C expression that gives the alignment boundary, in bits,
@item LOAD_ARGS_REVERSED
If defined, the order in which arguments are loaded into their
respective argument registers is reversed so that the last
-argument is loaded first. This macro only effects arguments
+argument is loaded first. This macro only affects arguments
passed in registers.
@end table
@node Caller Saves
@subsection Caller-Saves Register Allocation
-If you enable it, GNU CC can save registers around function calls. This
+If you enable it, GCC can save registers around function calls. This
makes it possible to use call-clobbered registers to hold variables that
must live across calls.
If you don't define this macro, a default is used which is good on most
machines: @code{4 * @var{calls} < @var{refs}}.
+
+@findex HARD_REGNO_CALLER_SAVE_MODE
+@item HARD_REGNO_CALLER_SAVE_MODE (@var{regno}, @var{nregs})
+A C expression specifying which mode is required for saving @var{nregs}
+of a pseudo-register in call-clobbered hard register @var{regno}. If
+@var{regno} is unsuitable for caller save, @code{VOIDmode} should be
+returned. For most machines this macro need not be defined since GCC
+will select the smallest suitable mode.
@end table
@node Function Entry
Normally, it is necessary for the macros @code{FUNCTION_PROLOGUE} and
@code{FUNCTION_EPILOGUE} to treat leaf functions specially. The C
-variable @code{leaf_function} is nonzero for such a function.
+variable @code{current_function_is_leaf} is nonzero for such a function.
@findex EXIT_IGNORE_STACK
@item EXIT_IGNORE_STACK
@findex EPILOGUE_USES
@item EPILOGUE_USES (@var{regno})
-Define this macro as a C expression that is nonzero for registers are
+Define this macro as a C expression that is nonzero for registers that are
used by the epilogue or the @samp{return} pattern. The stack and frame
pointer registers are already be assumed to be used as needed.
a function that needs a frame pointer.
Normally, @code{FUNCTION_PROLOGUE} and @code{FUNCTION_EPILOGUE} must
-treat leaf functions specially. The C variable @code{leaf_function} is
-nonzero for such a function. @xref{Leaf Functions}.
+treat leaf functions specially. The C variable @code{current_function_is_leaf}
+is nonzero for such a function. @xref{Leaf Functions}.
On some machines, some functions pop their arguments on exit while
others leave that for the caller to do. For example, the 68020 when
@findex mcount
The details of how the address should be passed to @code{mcount} are
-determined by your operating system environment, not by GNU CC. To
+determined by your operating system environment, not by GCC. To
figure them out, compile a small program for profiling using the
system's installed C compiler and look at the assembler code that
results.
be clobbered by a function call, including condition codes. The
@code{asm} statement will be mostly likely needed to handle this
task. Local labels in the assembler code can be concatenated with the
-string @var{id}, to obtain a unique lable name.
+string @var{id}, to obtain a unique label name.
Registers or condition codes clobbered by @code{FUNCTION_PROLOGUE} or
@code{FUNCTION_EPILOGUE} must be saved in the macros
support block profiling.
@end table
+@node Inlining
+@subsection Permitting inlining of functions with attributes
+@cindex inlining
+
+By default if a function has a target specific attribute attached to it,
+it will not be inlined. This behaviour can be overridden if the target
+defines the @samp{FUNCTION_ATTRIBUTE_INLINABLE_P} macro. This macro
+takes one argument, a @samp{DECL} describing the function. It should
+return non-zero if the function can be inlined, otherwise it should
+return 0.
+
@node Varargs
@section Implementing the Varargs Macros
@cindex varargs implementation
-GNU CC comes with an implementation of @file{varargs.h} and
+GCC comes with an implementation of @file{varargs.h} and
@file{stdarg.h} that work without change on machines that pass arguments
on the stack. Other machines require their own implementations of
varargs, and the two machine independent header files must have
@table @code
@findex EXPAND_BUILTIN_SAVEREGS
-@item EXPAND_BUILTIN_SAVEREGS (@var{args})
+@item EXPAND_BUILTIN_SAVEREGS ()
If defined, is a C expression that produces the machine-specific code
for a call to @code{__builtin_saveregs}. This code will be moved to the
very beginning of the function, before any parameter access are made.
The return value of this function should be an RTX that contains the
value to use as the return of @code{__builtin_saveregs}.
-The argument @var{args} is a @code{tree_list} containing the arguments
-that were passed to @code{__builtin_saveregs}.
-
-If this macro is not defined, the compiler will output an ordinary
-call to the library function @samp{__builtin_saveregs}.
-
-@c !!! a bug in texinfo; how to make the entry on the @item line allow
-@c more than one line of text... help... --mew 10feb93
@findex SETUP_INCOMING_VARARGS
-@item SETUP_INCOMING_VARARGS (@var{args_so_far}, @var{mode}, @var{type},
-@var{pretend_args_size}, @var{second_time})
+@item SETUP_INCOMING_VARARGS (@var{args_so_far}, @var{mode}, @var{type}, @var{pretend_args_size}, @var{second_time})
This macro offers an alternative to using @code{__builtin_saveregs} and
defining the macro @code{EXPAND_BUILTIN_SAVEREGS}. Use it to store the
anonymous register arguments into the stack so that all the arguments
machines that pass all their arguments on the stack.
The argument @var{args_so_far} is the @code{CUMULATIVE_ARGS} data
-structure, containing the values that obtain after processing of the
+structure, containing the values that are obtained after processing the
named arguments. The arguments @var{mode} and @var{type} describe the
last named argument---its machine mode and its data type as a tree node.
are treated as named.
You need not define this macro if it always returns zero.
+
+@findex PRETEND_OUTGOING_VARARGS_NAMED
+@item PRETEND_OUTGOING_VARARGS_NAMED
+If you need to conditionally change ABIs so that one works with
+@code{SETUP_INCOMING_VARARGS}, but the other works like neither
+@code{SETUP_INCOMING_VARARGS} nor @code{STRICT_ARGUMENT_NAMING} was
+defined, then define this macro to return nonzero if
+@code{SETUP_INCOMING_VARARGS} is used, zero otherwise.
+Otherwise, you should not define this macro.
@end table
@node Trampolines
A @dfn{trampoline} is a small piece of code that is created at run time
when the address of a nested function is taken. It normally resides on
the stack, in the stack frame of the containing function. These macros
-tell GNU CC how to generate code to allocate and initialize a
+tell GCC how to generate code to allocate and initialize a
trampoline.
The instructions in the trampoline must do two things: load a constant
@item TRANSFER_FROM_TRAMPOLINE
Define this macro if trampolines need a special subroutine to do their
work. The macro should expand to a series of @code{asm} statements
-which will be compiled with GNU CC. They go in a library function named
+which will be compiled with GCC. They go in a library function named
@code{__transfer_from_trampoline}.
If you need to avoid executing the ordinary prologue code of a compiled
routines renames existing ones. @code{init_optabs} calls this macro after
initializing all the normal library routines.
+@findex FLOAT_LIB_COMPARE_RETURNS_BOOL (@var{mode}, @var{comparison})
+@item FLOAT_LIB_COMPARE_RETURNS_BOOL
+Define this macro as a C statement that returns nonzero if a call to
+the floating point comparison library function will return a boolean
+value that indicates the result of the comparison. It should return
+zero if one of gcc's own libgcc functions is called.
+
+Most ports don't need to define this macro.
+
@findex TARGET_EDOM
@cindex @code{EDOM}, implicit usage
@item TARGET_EDOM
The value of @code{EDOM} on the target machine, as a C integer constant
-expression. If you don't define this macro, GNU CC does not attempt to
+expression. If you don't define this macro, GCC does not attempt to
deposit the value of @code{EDOM} into @code{errno} directly. Look in
@file{/usr/include/errno.h} to find the value of @code{EDOM} on your
system.
@cindex @code{bzero}, implicit usage
@cindex @code{memset}, implicit usage
@item TARGET_MEM_FUNCTIONS
-Define this macro if GNU CC should generate calls to the System V
+Define this macro if GCC should generate calls to the System V
(and ANSI C) library functions @code{memcpy} and @code{memset}
rather than the BSD functions @code{bcopy} and @code{bzero}.
@table @code
@findex HAVE_POST_INCREMENT
@item HAVE_POST_INCREMENT
-Define this macro if the machine supports post-increment addressing.
+A C expression that is nonzero the machine supports post-increment addressing.
@findex HAVE_PRE_INCREMENT
@findex HAVE_POST_DECREMENT
@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.@refill
-
-@findex DONT_RECORD_EQUIVALENCE
-@item DONT_RECORD_EQUIVALENCE (@var{note})
-A C expression that is nonzero if the @code{REG_EQUAL} note @var{x} should not
-be promoted to a @code{REG_EQUIV} note.
-
-Define this macro if @var{note} refers to a constant that must be accepted
-by @code{LEGITIMATE_CONSTANT_P}, but must not appear as an immediate operand.
-
-Most machine descriptions do not need to define this macro.
@end table
@node Condition Code
@findex EXTRA_CC_MODES
@item EXTRA_CC_MODES
-A list of names to be used for additional modes for condition code
-values in registers (@pxref{Jump Patterns}). These names are added
-to @code{enum machine_mode} and all have class @code{MODE_CC}. By
-convention, they should start with @samp{CC} and end with @samp{mode}.
-
-You should only define this macro if your machine does not use @code{cc0}
-and only if additional modes are required.
+A list of additional modes for condition code values in registers
+(@pxref{Jump Patterns}). This macro should expand to a sequence of
+calls of the macro @code{CC} separated by white space. @code{CC} takes
+two arguments. The first is the enumeration name of the mode, which
+should begin with @samp{CC} and end with @samp{mode}. The second is a C
+string giving the printable name of the mode; it should be the same as
+the first argument, but with the trailing @samp{mode} removed.
-@findex EXTRA_CC_NAMES
-@item EXTRA_CC_NAMES
-A list of C strings giving the names for the modes listed in
-@code{EXTRA_CC_MODES}. For example, the Sparc defines this macro and
-@code{EXTRA_CC_MODES} as
+You should only define this macro if additional modes are required.
+A sample definition of @code{EXTRA_CC_MODES} is:
@smallexample
-#define EXTRA_CC_MODES CC_NOOVmode, CCFPmode, CCFPEmode
-#define EXTRA_CC_NAMES "CC_NOOV", "CCFP", "CCFPE"
+#define EXTRA_CC_MODES \
+ CC(CC_NOOVmode, "CC_NOOV") \
+ CC(CCFPmode, "CCFP") \
+ CC(CCFPEmode, "CCFPE")
@end smallexample
-This macro is not required if @code{EXTRA_CC_MODES} is not defined.
-
@findex SELECT_CC_MODE
@item SELECT_CC_MODE (@var{op}, @var{x}, @var{y})
Returns a mode from class @code{MODE_CC} to be used when comparison
@findex CANONICALIZE_COMPARISON
@item CANONICALIZE_COMPARISON (@var{code}, @var{op0}, @var{op1})
-One some machines not all possible comparisons are defined, but you can
+On some machines not all possible comparisons are defined, but you can
convert an invalid comparison into a valid one. For example, the Alpha
does not have a @code{GT} comparison, but you can use an @code{LT}
comparison instead and swap the order of the operands.
comparison, respectively. You should modify @var{code}, @var{op0}, and
@var{op1} as required.
-GNU CC will not assume that the comparison resulting from this macro is
+GCC will not assume that the comparison resulting from this macro is
valid but will see if the resulting insn matches a pattern in the
@file{md} file.
registers and memory is more expensive than between two registers, you
should define this macro to express the relative cost.
-If you do not define this macro, GNU CC uses a default cost of 4 plus
+If you do not define this macro, 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
more complex than copying via an intermediate, define this macro to
reflect the actual cost of the move.
-GNU CC defines the function @code{memory_move_secondary_cost} if
+GCC defines the function @code{memory_move_secondary_cost} if
secondary reloads are needed. It computes the costs due to copying via
a secondary register. If your machine copies from memory using a
secondary register in the conventional way but the default base value of
@end table
Here are additional macros which do not specify precise relative costs,
-but only that certain actions are more expensive than GNU CC would
+but only that certain actions are more expensive than GCC would
ordinarily expect.
@table @code
and likewise for @code{HImode}.
@findex SLOW_UNALIGNED_ACCESS
-@item SLOW_UNALIGNED_ACCESS
-Define this macro to be the value 1 if unaligned accesses have a cost
-many times greater than aligned accesses, for example if they are
-emulated in a trap handler.
+@item SLOW_UNALIGNED_ACCESS (@var{mode}, @var{alignment})
+Define this macro to be the value 1 if memory accesses described by the
+@var{mode} and @var{alignment} parameters have a cost many times greater
+than aligned accesses, for example if they are emulated in a trap
+handler.
When this macro is non-zero, the compiler will act as if
@code{STRICT_ALIGNMENT} were non-zero when generating code for block
Therefore, do not set this macro non-zero if unaligned accesses only add a
cycle or two to the time for a memory access.
-If the value of this macro is always zero, it need not be defined.
+If the value of this macro is always zero, it need not be defined. If
+this macro is defined, it should produce a non-zero value when
+@code{STRICT_ALIGNMENT} is non-zero.
@findex DONT_REDUCE_ADDR
@item DONT_REDUCE_ADDR
@findex MOVE_RATIO
@item MOVE_RATIO
-The number of scalar move insns which should be generated instead of a
+The threshold of number of scalar memory-to-memory move insns, @emph{below}
+which a sequence of insns should be generated instead of a
string move insn or a library call. Increasing the value will always
make code faster, but eventually incurs high cost in increased code size.
+Note that on machines where the corresponding move insn is a
+@code{define_expand} that emits a sequence of insns, this macro counts
+the number of such sequences.
+
If you don't define this, a reasonable default is used.
+@findex MOVE_BY_PIECES_P
+@item MOVE_BY_PIECES_P (@var{size}, @var{alignment})
+A C expression used to determine whether @code{move_by_pieces} will be used to
+copy a chunk of memory, or whether some other block move mechanism
+will be used. Defaults to 1 if @code{move_by_pieces_ninsns} returns less
+than @code{MOVE_RATIO}.
+
+@findex MOVE_MAX_PIECES
+@item MOVE_MAX_PIECES
+A C expression used by @code{move_by_pieces} to determine the largest unit
+a load or store used to copy memory is. Defaults to @code{MOVE_MAX}.
+
+@findex USE_LOAD_POST_INCREMENT
+@item USE_LOAD_POST_INCREMENT (@var{mode})
+A C expression used to determine whether a load postincrement is a good
+thing to use for a given mode. Defaults to the value of
+@code{HAVE_POST_INCREMENT}.
+
+@findex USE_LOAD_POST_DECREMENT
+@item USE_LOAD_POST_DECREMENT (@var{mode})
+A C expression used to determine whether a load postdecrement is a good
+thing to use for a given mode. Defaults to the value of
+@code{HAVE_POST_DECREMENT}.
+
+@findex USE_LOAD_PRE_INCREMENT
+@item USE_LOAD_PRE_INCREMENT (@var{mode})
+A C expression used to determine whether a load preincrement is a good
+thing to use for a given mode. Defaults to the value of
+@code{HAVE_PRE_INCREMENT}.
+
+@findex USE_LOAD_PRE_DECREMENT
+@item USE_LOAD_PRE_DECREMENT (@var{mode})
+A C expression used to determine whether a load predecrement is a good
+thing to use for a given mode. Defaults to the value of
+@code{HAVE_PRE_DECREMENT}.
+
+@findex USE_STORE_POST_INCREMENT
+@item USE_STORE_POST_INCREMENT (@var{mode})
+A C expression used to determine whether a store postincrement is a good
+thing to use for a given mode. Defaults to the value of
+@code{HAVE_POST_INCREMENT}.
+
+@findex USE_STORE_POST_DECREMENT
+@item USE_STORE_POST_DECREMENT (@var{mode})
+A C expression used to determine whether a store postdeccrement is a good
+thing to use for a given mode. Defaults to the value of
+@code{HAVE_POST_DECREMENT}.
+
+@findex USE_STORE_PRE_INCREMENT
+@item USE_STORE_PRE_INCREMENT (@var{mode})
+This macro is used to determine whether a store preincrement is a good
+thing to use for a given mode. Defaults to the value of
+@code{HAVE_PRE_INCREMENT}.
+
+@findex USE_STORE_PRE_DECREMENT
+@item USE_STORE_PRE_DECREMENT (@var{mode})
+This macro is used to determine whether a store predecrement is a good
+thing to use for a given mode. Defaults to the value of
+@code{HAVE_PRE_DECREMENT}.
+
@findex NO_FUNCTION_CSE
@item NO_FUNCTION_CSE
Define this macro if it is as good or better to call a constant
@item INIT_SECTION_ASM_OP
If defined, a C expression whose value is a string containing the
assembler operation to identify the following data as initialization
-code. If not defined, GNU CC will assume such a section does not
+code. If not defined, GCC will assume such a section does not
exist.
@findex EXTRA_SECTIONS
A C statement to build up a unique section name, expressed as a
STRING_CST node, and assign it to @samp{DECL_SECTION_NAME (@var{decl})}.
@var{reloc} indicates whether the initial value of @var{exp} requires
-link-time relocations. If you do not define this macro, GNU CC will use
-the symbol name prefixed by @samp{.} as the section name.
+link-time relocations. If you do not define this macro, GCC will use
+the symbol name prefixed by @samp{.} as the section name. Note - this
+macro can now be called for unitialised data items as well as
+initialised data and functions.
@end table
@node PIC
@findex ASM_IDENTIFY_GCC
@item ASM_IDENTIFY_GCC (@var{file})
A C statement to output assembler commands which will identify
-the object file as having been compiled with GNU CC (or another
+the object file as having been compiled with GCC (or another
GNU compiler).
If you don't define this macro, the string @samp{gcc_compiled.:}
for the file format in use is appropriate.
@findex OUTPUT_QUOTED_STRING
-@item OUTPUT_QUOTED_STRING (@var{stream}, @var{name})
+@item 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}
-in your config files, GNU CC will only call it to output filenames to
+in your config files, GCC will only call it to output filenames to
the assembler source. So you can use it to canonicalize the format
of the filename using this macro.
@findex CONSTANT_POOL_BEFORE_FUNCTION
@item CONSTANT_POOL_BEFORE_FUNCTION
You may define this macro as a C expression. You should define the
-expression to have a non-zero value if GNU CC should output the constant
+expression to have a non-zero value if GCC should output the constant
pool for a function before the code for the function, or a zero value if
-GNU CC should output the constant pool after the function. If you do
-not define this macro, the usual case, GNU CC will output the constant
+GCC should output the constant pool after the function. If you do
+not define this macro, the usual case, GCC will output the constant
pool before the function.
@findex ASM_OUTPUT_POOL_PROLOGUE
-@item ASM_OUTPUT_POOL_PROLOGUE (@var{file} @var{funname} @var{fundecl} @var{size})
+@item ASM_OUTPUT_POOL_PROLOGUE (@var{file}, @var{funname}, @var{fundecl}, @var{size})
A C statement to output assembler commands to define the start of the
constant pool for a function. @var{funname} is a string giving
the name of the function. Should the return type of the function
pool for a function. @var{funname} is a string giving the name of the
function. Should the return type of the function be required, you can
obtain it via @var{fundecl}. @var{size} is the size, in bytes, of the
-constant pool that GNU CC wrote immediately before this call.
+constant pool that GCC wrote immediately before this call.
If no constant-pool epilogue is required, the usual case, you need not
define this macro.
@item ASM_OUTPUT_ALIGNED_DECL_COMMON (@var{stream}, @var{decl}, @var{name}, @var{size}, @var{alignment})
Like @code{ASM_OUTPUT_ALIGNED_COMMON} except that @var{decl} of the
variable to be output, if there is one, or @code{NULL_TREE} if there
-is not corresponding variable. If you define this macro, GNU CC wil use it
+is no corresponding variable. If you define this macro, GCC will use it
in place of both @code{ASM_OUTPUT_COMMON} and
@code{ASM_OUTPUT_ALIGNED_COMMON}. Define this macro when you need to see
the variable's decl in order to chose what to output.
@item ASM_OUTPUT_ALIGNED_DECL_LOCAL (@var{stream}, @var{decl}, @var{name}, @var{size}, @var{alignment})
Like @code{ASM_OUTPUT_ALIGNED_DECL} except that @var{decl} of the
variable to be output, if there is one, or @code{NULL_TREE} if there
-is not corresponding variable. If you define this macro, GNU CC wil use it
+is no corresponding variable. If you define this macro, GCC will use it
in place of both @code{ASM_OUTPUT_DECL} and
@code{ASM_OUTPUT_ALIGNED_DECL}. Define this macro when you need to see
the variable's decl in order to chose what to output.
-
@findex ASM_OUTPUT_SHARED_LOCAL
@item ASM_OUTPUT_SHARED_LOCAL (@var{stream}, @var{name}, @var{size}, @var{rounded})
If defined, it is similar to @code{ASM_OUTPUT_LOCAL}, except that it
If this macro is not defined, then the variable name is defined in the
usual manner as a label (by means of @code{ASM_OUTPUT_LABEL}).
+@findex ASM_DECLARE_REGISTER_GLOBAL
+@item ASM_DECLARE_REGISTER_GLOBAL (@var{stream}, @var{decl}, @var{regno}, @var{name})
+A C statement (sans semicolon) to output to the stdio stream
+@var{stream} any text necessary for claiming a register @var{regno}
+for a global variable @var{decl} with name @var{name}.
+
+If you don't define this macro, that is equivalent to defining it to do
+nothing.
+
@findex ASM_FINISH_DECLARE_OBJECT
@item ASM_FINISH_DECLARE_OBJECT (@var{stream}, @var{decl}, @var{toplevel}, @var{atend})
A C statement (sans semicolon) to finish up declaring a variable name
itself; before and after that, output the additional assembler syntax
for making that name weak, and a newline.
-If you don't define this macro, GNU CC will not support weak
+If you don't define this macro, GCC will not support weak
symbols and you should not define the @code{SUPPORTS_WEAK} macro.
@findex SUPPORTS_WEAK
fprintf (@var{stream}, "L%s%d:\n", @var{prefix}, @var{num})
@end example
+@findex ASM_OUTPUT_ALTERNATE_LABEL_NAME
+@item ASM_OUTPUT_ALTERNATE_LABEL_NAME (@var{stream}, @var{string})
+A C statement to output to the stdio stream @var{stream} the string
+@var{string}.
+
+The default definition of this macro is as follows:
+
+@example
+fprintf (@var{stream}, "%s:\n", LABEL_ALTERNATE_NAME (INSN))
+@end example
+
@findex ASM_GENERATE_INTERNAL_LABEL
@item ASM_GENERATE_INTERNAL_LABEL (@var{string}, @var{prefix}, @var{num})
A C statement to store into the string @var{string} a label whose name
A C statement to output to the stdio stream @var{stream} assembler code
which defines (equates) the symbol @var{name} to have the value @var{value}.
+@findex SET_ASM_OP
If SET_ASM_OP is defined, a default definition is provided which is
correct for most systems.
+@findex ASM_OUTPUT_DEF_FROM_DECLS
+@item ASM_OUTPUT_DEF_FROM_DECLS (@var{stream}, @var{decl_of_name}, @var{decl_of_value})
+A C statement to output to the stdio stream @var{stream} assembler code
+which defines (equates) the symbol whoes tree node is @var{decl_of_name}
+to have the value of the tree node @var{decl_of_value}. This macro will
+be used in preference to @samp{ASM_OUTPUT_DEF} if it is defined and if
+the tree nodes are available.
+
@findex ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL
@item ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL (@var{stream}, @var{symbol}, @var{high}, @var{low})
A C statement to output to the stdio stream @var{stream} assembler code
which defines (equates) the symbol @var{symbol} to have a value equal to
the difference of the two symbols @var{high} and @var{low}, i.e.
-@var{high} minus @var{low}. GNU CC guarantees that the symbols @var{high}
+@var{high} minus @var{low}. GCC guarantees that the symbols @var{high}
and @var{low} are already known by the assembler so that the difference
resolves into a constant.
+@findex SET_ASM_OP
If SET_ASM_OP is defined, a default definition is provided which is
correct for most systems.
@code{N_SETT} symbol; initialization and termination functions are
recognized simply by their names. This requires an extra program in the
linkage step, called @code{collect2}. This program pretends to be the
-linker, for use with GNU CC; it does its job by running the ordinary
+linker, for use with GCC; it does its job by running the ordinary
linker, but also arranges to include the vectors of initialization and
termination functions. These functions are called via @code{__main} as
described above.
@findex INIT_SECTION_ASM_OP
@item INIT_SECTION_ASM_OP
If defined, a C string constant for the assembler operation to identify
-the following data as initialization code. If not defined, GNU CC will
+the following data as initialization code. If not defined, GCC will
assume such a section does not exist. When you are using special
sections for initialization and termination functions, this macro also
controls how @file{crtstuff.c} and @file{libgcc2.c} arrange to run the
@findex ASM_OUTPUT_DESTRUCTOR
This is like @code{ASM_OUTPUT_CONSTRUCTOR} but used for termination
functions rather than initialization functions.
+
+When @code{ASM_OUTPUT_CONSTRUCTOR} and @code{ASM_OUTPUT_DESTRUCTOR} are
+defined, the initializaiton routine generated for the generated object
+file will have static linkage.
@end table
If your system uses @code{collect2} as the means of processing
constructors, then that program normally uses @code{nm} to scan an
-object file for constructor functions to be called. On certain kinds of
-systems, you can define these macros to make @code{collect2} work faster
-(and, in some cases, make it work at all):
+object file for constructor functions to be called. On such systems you
+must not define @code{ASM_OUTPUT_CONSTRUCTOR} and @code{ASM_OUTPUT_DESTRUCTOR}
+as the object file's initialization routine must have global scope.
+
+On certain kinds of systems, you can define these macros to make
+@code{collect2} work faster (and, in some cases, make it work at all):
@table @code
@findex OBJECT_FORMAT_COFF
support multiple assembler formats. In that case, the various @file{tm.h}
files can define these macros differently.
+@item ASM_FPRINTF_EXTENSIONS(@var{file}, @var{argptr}, @var{format})
+@findex ASM_FPRINTF_EXTENSIONS
+If defiend this macro should expand to a series of @code{case}
+statements which will be parsed inside the @code{switch} statement of
+the @code{asm_fprintf} function. This allows targets to define extra
+printf formats which may useful when generating their assembler
+statements. Noet that upper case letters are reserved for future
+generic extensions to asm_fprintf, and so are not available to target
+specific code. The output file is given by the parameter @var{file}.
+The varargs input pointer is @var{argptr} and the rest of the format
+string, starting the character after the one that is being switched
+upon, is pointed to by @var{format}.
+
@findex ASSEMBLER_DIALECT
@item ASSEMBLER_DIALECT
If your target supports multiple dialects of assembler language (such as
@item EH_FRAME_SECTION_ASM_OP
If defined, a C string constant for the assembler operation to switch to
the section for exception handling frame unwind information. If not
-defined, GNU CC will provide a default definition if the target supports
+defined, GCC will provide a default definition if the target supports
named sections. @file{crtstuff.c} uses this macro to switch to the
appropriate section.
to be done at such a time. Most machine descriptions do not currently
define the macro.
+Unless it's necessary to inspect the @var{label} parameter, it is better
+to set the variable @var{align_jumps} in the target's
+@code{OVERRIDE_OPTIONS}. Otherwise, you should try to honour the user's
+selection in @var{align_jumps} in a @code{LABEL_ALIGN_AFTER_BARRIER}
+implementation.
+
+@findex LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP
+@item LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP
+The maximum number of bytes to skip when applying
+@code{LABEL_ALIGN_AFTER_BARRIER}. This works only if
+@code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.
+
@findex LOOP_ALIGN
@item LOOP_ALIGN (@var{label})
The alignment (log base 2) to put in front of @var{label}, which follows
to be done at such a time. Most machine descriptions do not currently
define the macro.
+Unless it's necessary to inspect the @var{label} parameter, it is better
+to set the variable @var{align_loops} in the target's
+@code{OVERRIDE_OPTIONS}. Otherwise, you should try to honour the user's
+selection in @var{align_loops} in a @code{LOOP_ALIGN} implementation.
+
+@findex LOOP_ALIGN_MAX_SKIP
+@item 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.
+
@findex LABEL_ALIGN
@item LABEL_ALIGN (@var{label})
The alignment (log base 2) to put in front of @var{label}.
If LABEL_ALIGN_AFTER_BARRIER / LOOP_ALIGN specify a different alignment,
the maximum of the specified values is used.
+Unless it's necessary to inspect the @var{label} parameter, it is better
+to set the variable @var{align_labels} in the target's
+@code{OVERRIDE_OPTIONS}. Otherwise, you should try to honour the user's
+selection in @var{align_labels} in a @code{LABEL_ALIGN} implementation.
+
+@findex LABEL_ALIGN_MAX_SKIP
+@item 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.
+
@findex ASM_OUTPUT_SKIP
@item ASM_OUTPUT_SKIP (@var{stream}, @var{nbytes})
A C statement to output to the stdio stream @var{stream} an assembler
A C statement to output to the stdio stream @var{stream} an assembler
command to advance the location counter to a multiple of 2 to the
@var{power} bytes. @var{power} will be a C expression of type @code{int}.
+
+@findex ASM_OUTPUT_MAX_SKIP_ALIGN
+@item ASM_OUTPUT_MAX_SKIP_ALIGN (@var{stream}, @var{power}, @var{max_skip})
+A C statement to output to the stdio stream @var{stream} an assembler
+command to advance the location counter to a multiple of 2 to the
+@var{power} bytes, but only if @var{max_skip} or fewer bytes are needed to
+satisfy the alignment request. @var{power} and @var{max_skip} will be
+a C expression of type @code{int}.
@end table
@need 3000
versa. In such cases, some register may need to have one number in
the compiler and another for DBX.
-If two registers have consecutive numbers inside GNU CC, and they can be
+If two registers have consecutive numbers inside GCC, and they can be
used as a pair to hold a multiword value, then they @emph{must} have
consecutive numbers after renumbering with @code{DBX_REGISTER_NUMBER}.
Otherwise, debuggers will be unable to access such a pair, because they
@findex PREFERRED_DEBUGGING_TYPE
@item PREFERRED_DEBUGGING_TYPE
-A C expression that returns the type of debugging output GNU CC should
+A C expression that returns the type of debugging output GCC should
produce when the user specifies just @samp{-g}. Define
-this if you have arranged for GNU CC to support more than one format of
+this if you have arranged for GCC to support more than one format of
debugging output. Currently, the allowable values are @code{DBX_DEBUG},
@code{SDB_DEBUG}, @code{DWARF_DEBUG}, @code{DWARF2_DEBUG}, and
@code{XCOFF_DEBUG}.
-When the user specifies @samp{-ggdb}, GNU CC normally also uses the
+When the user specifies @samp{-ggdb}, GCC normally also uses the
value of this macro to select the debugging output format, but with two
exceptions. If @code{DWARF2_DEBUGGING_INFO} is defined and
-@code{LINKER_DOES_NOT_WORK_WITH_DWARF2} is not defined, GNU CC uses the
+@code{LINKER_DOES_NOT_WORK_WITH_DWARF2} is not defined, GCC uses the
value @code{DWARF2_DEBUG}. Otherwise, if @code{DBX_DEBUGGING_INFO} is
-defined, GNU CC uses @code{DBX_DEBUG}.
+defined, GCC uses @code{DBX_DEBUG}.
The value of this macro only affects the default debugging output; the
user can always get a specific type of output by using @samp{-gstabs},
@table @code
@findex DBX_DEBUGGING_INFO
@item DBX_DEBUGGING_INFO
-Define this macro if GNU CC should produce debugging output for DBX
+Define this macro if GCC should produce debugging output for DBX
in response to the @samp{-g} option.
@findex XCOFF_DEBUGGING_INFO
@item XCOFF_DEBUGGING_INFO
-Define this macro if GNU CC should produce XCOFF format debugging output
+Define this macro if GCC should produce XCOFF format debugging output
in response to the @samp{-g} option. This is a variant of DBX format.
@findex DEFAULT_GDB_EXTENSIONS
@item DEFAULT_GDB_EXTENSIONS
-Define this macro to control whether GNU CC should by default generate
+Define this macro to control whether GCC should by default generate
GDB's extended version of DBX debugging information (assuming DBX-format
debugging information is enabled at all). If you don't define the
macro, the default is 1: always generate the extended information
@table @code
@findex SDB_DEBUGGING_INFO
@item SDB_DEBUGGING_INFO
-Define this macro if GNU CC should produce COFF-style debugging output
+Define this macro if GCC should produce COFF-style debugging output
for SDB in response to the @samp{-g} option.
@findex DWARF_DEBUGGING_INFO
@item DWARF_DEBUGGING_INFO
-Define this macro if GNU CC should produce dwarf format debugging output
+Define this macro if GCC should produce dwarf format debugging output
in response to the @samp{-g} option.
@findex DWARF2_DEBUGGING_INFO
@item DWARF2_DEBUGGING_INFO
-Define this macro if GNU CC should produce dwarf version 2 format
+Define this macro if GCC should produce dwarf version 2 format
debugging output in response to the @samp{-g} option.
To support optional call frame debugging information, you must also
@findex DWARF2_FRAME_INFO
@item DWARF2_FRAME_INFO
-Define this macro to a nonzero value if GNU CC should always output
+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, GNU CC will output this
+(@pxref{Exception Region Output} is nonzero, GCC will output this
information not matter how you define @code{DWARF2_FRAME_INFO}.
@findex LINKER_DOES_NOT_WORK_WITH_DWARF2
@item LINKER_DOES_NOT_WORK_WITH_DWARF2
Define this macro if the linker does not work with Dwarf version 2.
-Normally, if the user specifies only @samp{-ggdb} GNU CC will use Dwarf
+Normally, if the user specifies only @samp{-ggdb} GCC will use Dwarf
version 2 if available; this macro disables this. See the description
of the @code{PREFERRED_DEBUGGING_TYPE} macro for more details.
+@findex DWARF2_GENERATE_TEXT_SECTION_LABEL
+@item DWARF2_GENERATE_TEXT_SECTION_LABEL
+By default, the Dwarf 2 debugging information generator will generate a
+label to mark the beginning of the text section. If it is better simply
+to use the name of the text section itself, rather than an explicit label,
+to indicate the beginning of the text section, define this macro to zero.
+
+@findex DWARF2_ASM_LINE_DEBUG_INFO
+@item 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.
+
@findex PUT_SDB_@dots{}
@item PUT_SDB_@dots{}
Define these macros to override the assembler syntax for the special
and has the type @code{REAL_VALUE_TYPE}.
@end table
+@node Mode Switching
+@section Mode Switching Instructions
+@cindex mode switching
+The following macros control mode switching optimizations:
+
+@table @code
+@findex OPTIMIZE_MODE_SWITCHING
+@item OPTIMIZE_MODE_SWITCHING (@var{entity})
+Define this macro if the port needs extra instructions inserted for mode
+switching in an optimizing compilation.
+
+For an example, the SH4 can perform both single and double precision
+floating point operations, but to perform a single precision operation,
+the FPSCR PR bit has to be cleared, while for a double precision
+operation, this bit has to be set. Changing the PR bit requires a general
+purpose register as a scratch register, hence these FPSCR sets have to
+be inserted before reload, i.e. you can't put this into instruction emitting
+or MACHINE_DEPENDENT_REORG.
+
+You can have multiple entities that are mode-switched, and select at run time
+which entities actually need it. @code{OPTIMIZE_MODE_SWITCHING} should
+return non-zero for any @var{entity} that that needs mode-switching.
+If you define this macro, you also have to define
+@code{NUM_MODES_FOR_MODE_SWITCHING}, @code{MODE_NEEDED},
+@code{MODE_PRIORITY_TO_MODE} and @code{EMIT_MODE_SET}.
+@code{MODE_AT_ENTRY} and @code{MODE_USES_IN_EXIT_BLOCK} are optional.
+
+@findex NUM_MODES_FOR_MODE_SWITCHING
+@item NUM_MODES_FOR_MODE_SWITCHING
+If you define @code{OPTIMIZE_MODE_SWITCHING}, you have to define this as
+initializer for an array of integers. Each initializer element
+N refers to an entity that needs mode switching, and specifies the number
+of different modes that might need to be set for this entity.
+The position of the initializer in the initializer - starting counting at
+zero - determines the integer that is used to refer to the mode-switched
+entity in question.
+In macros that take mode arguments / yield a mode result, modes are
+represented as numbers 0 .. N - 1. N is used to specify that no mode
+switch is needed / supplied.
+
+@findex MODE_USES_IN_EXIT_BLOCK
+@item MODE_USES_IN_EXIT_BLOCK
+If this macro is defined, it is called for each exit block when mode switching
+optimization is performed. Its return value should be the pattern of an insn,
+or a sequence of insns. It is emitted before the return insn / use insns at
+the end of the exit block.
+
+This is done before insns are examined for their need of any mode switching.
+
+@findex MODE_NEEDED
+@item MODE_NEEDED (@var{entity}, @var{insn})
+@var{entity} is an integer specifying a mode-switched entity. If
+@code{OPTIMIZE_MODE_SWITCHING} is defined, you must define this macro to
+return an integer value not larger than the corresponding element in
+NUM_MODES_FOR_MODE_SWITCHING, to denote the mode that @var{entity} must
+be switched into prior to the execution of INSN.
+
+@findex MODE_AT_ENTRY
+@item MODE_AT_ENTRY (@var{entity})
+If this macro is defined, it is evaluated for every @var{entity} that needs
+mode switching. It should evaluate to an integer, which is a mode that
+@var{entity} is assumed to be switched to at function entry.
+
+@findex MODE_PRIORITY_TO_MODE
+@item MODE_PRIORITY_TO_MODE (@var{entity}, @var{n})
+This macro specifies the order in which modes for ENTITY are processed.
+0 is the highest priority, NUM_MODES_FOR_MODE_SWITCHING[ENTITY] - 1 the
+lowest. The value of the macro should be an integer designating a mode
+for ENTITY. For any fixed @var{entity}, @code{mode_priority_to_mode}
+(@var{entity}, @var{n}) shall be a bijection in 0 ..
+@code{num_modes_for_mode_switching}[@var{entity}] - 1 .
+
+@findex EMIT_MODE_SET
+@item EMIT_MODE_SET (@var{entity}, @var{mode}, @var{hard_regs_live})
+Generate one or more insns to set @var{entity} to @var{mode}.
+@var{hard_reg_live} is the set of hard registers live at the point where
+the insn(s) are to be inserted.
+@end table
+
@node Misc
@section Miscellaneous Parameters
@cindex parameters, miscellaneous
in the list specified by this macro are those used in the most insn
patterns.
+@item SPECIAL_MODE_PREDICATES
+@findex SPECIAL_MODE_PREDICATES
+Define this if you have special predicates that know special things
+about modes. Genrecog will warn about certain forms of
+@code{match_operand} without a mode; if the operand predicate is
+listed in @code{SPECIAL_MODE_PREDICATES}, the warning will be
+suppressed.
+
+Here is an example from the IA-32 port (@code{ext_register_operand}
+specially checks for @code{HImode} or @code{SImode} in preparation
+for a byte extraction from @code{%ah} etc.).
+
+@smallexample
+#define SPECIAL_MODE_PREDICATES \
+ "ext_register_operand",
+@end smallexample
+
@findex CASE_VECTOR_MODE
@item CASE_VECTOR_MODE
An alias for a machine mode name. This is the machine mode that
There is no way to describe a machine that always sets the low-order bit
for a true value, but does not guarantee the value of any other bits,
but we do not know of any machine that has such an instruction. If you
-are trying to port GNU CC to such a machine, include an instruction to
+are trying to port GCC to such a machine, include an instruction to
perform a logical-and of the result with 1 in the pattern for the
comparison operators and let us know
@ifset USING
instructions.
@findex FLOAT_STORE_FLAG_VALUE
-@item FLOAT_STORE_FLAG_VALUE
-A C expression that gives a non-zero floating point value that is
+@item FLOAT_STORE_FLAG_VALUE (@var{mode})
+A C expression that gives a non-zero @code{REAL_VALUE_TYPE} value that is
returned when comparison operators with floating-point results are true.
Define this macro on machine that have comparison operations that return
floating-point values. If there are no such operations, do not define
@findex HANDLE_PRAGMA
@findex #pragma
@findex pragma
-@item HANDLE_PRAGMA (@var{stream}, @var{node})
+@item HANDLE_PRAGMA (@var{getc}, @var{ungetc}, @var{name})
Define this macro if you want to implement any pragmas. If defined, it
-is a C expression whose value is 1 if the pragma was handled by the function.
-The argument @var{stream} is the stdio input stream from which the source text
-can be read. @var{node} is the tree node for the identifier after the
-@code{#pragma}.
+is a C expression whose value is 1 if the pragma was handled by the
+macro, zero otherwise. The argument @var{getc} is a function of type
+@samp{int (*)(void)} which will return the next character in the input
+stream, or EOF if no characters are left. The argument @var{ungetc} is
+a function of type @samp{void (*)(int)} which will push a character back
+into the input stream. The argument @var{name} is the word following
+#pragma in the input stream. The input stream pointer will be pointing
+just beyond the end of this word. The input stream should be left
+undistrubed if the expression returns zero, otherwise it should be
+pointing at the next character after the end of the pragma. Any
+characters remaining on the line will be ignored.
It is generally a bad idea to implement new uses of @code{#pragma}. The
only reason to define this macro is for compatibility with other
compilers that do support @code{#pragma} for the sake of any user
programs which already use it.
+If the pragma can be implemented by atttributes then the macro
+@samp{INSERT_ATTRIBUTES} might be a useful one to define as well.
+
+Note: older versions of this macro only had two arguments: @var{stream}
+and @var{token}. The macro was changed in order to allow it to work
+when gcc is built both with and without a cpp library.
+
+@findex HANDLE_SYSV_PRAGMA
+@findex #pragma
+@findex pragma
+@item HANDLE_SYSV_PRAGMA
+Define this macro (to a value of 1) if you want the System V style
+pragmas @samp{#pragma pack(<n>)} and @samp{#pragma weak <name>
+[=<value>]} to be supported by gcc.
+
+The pack pragma specifies the maximum alignment (in bytes) of fields
+within a structure, in much the same way as the @samp{__aligned__} and
+@samp{__packed__} @code{__attribute__}s do. A pack value of zero resets
+the behaviour to the default.
+
+The weak pragma only works if @code{SUPPORTS_WEAK} and
+@code{ASM_WEAKEN_LABEL} are defined. If enabled it allows the creation
+of specifically named weak labels, optionally with a value.
+
+@findex HANDLE_PRAGMA_PACK_PUSH_POP
+@findex #pragma
+@findex pragma
+@item HANDLE_PRAGMA_PACK_PUSH_POP
+Define this macro (to a value of 1) if you want to support the Win32
+style pragmas @samp{#pragma pack(push,<n>)} and @samp{#pragma
+pack(pop)}. The pack(push,<n>) pragma specifies the maximum alignment
+(in bytes) of fields within a structure, in much the same way as the
+@samp{__aligned__} and @samp{__packed__} @code{__attribute__}s do. A
+pack value of zero resets the behaviour to the default. Successive
+invocations of this pragma cause the previous values to be stacked, so
+that invocations of @samp{#pragma pack(pop)} will return to the previous
+value.
+
@findex VALID_MACHINE_DECL_ATTRIBUTE
@item VALID_MACHINE_DECL_ATTRIBUTE (@var{decl}, @var{attributes}, @var{identifier}, @var{args})
If defined, a C expression whose value is nonzero if @var{identifier} with
overrides another, or when an attribute is nullified by a subsequent
definition.
+@findex INSERT_ATTRIBUTES
+@item INSERT_ATTRIBUTES (@var{node}, @var{attr_ptr}, @var{prefix_ptr})
+Define this macro if you want to be able to add attributes to a decl
+when it is being created. This is normally useful for backends which
+wish to implement a pragma by using the attributes which correspond to
+the pragma's effect. The @var{node} argument is the decl which is being
+created. The @var{attr_ptr} argument is a pointer to the attribute list
+for this decl. The @var{prefix_ptr} is a pointer to the list of
+attributes that have appeared after the specifiers and modifiers of the
+declaration, but before the declaration proper.
+
@findex SET_DEFAULT_DECL_ATTRIBUTES
@item SET_DEFAULT_DECL_ATTRIBUTES (@var{decl}, @var{attributes})
If defined, a C statement that assigns default attributes to
appropriate rtl instructions. It is used only when compiling the end of
@code{main}.
-@item HAVE_ATEXIT
-@findex HAVE_ATEXIT
-Define this if the target system supports the function
-@code{atexit} from the ANSI C standard. If this is not defined,
-and @code{INIT_SECTION_ASM_OP} is not defined, a default
-@code{exit} function will be provided to support C++.
+@item NEED_ATEXIT
+@findex NEED_ATEXIT
+Define this if the target system lacks the function @code{atexit}
+from the ANSI C standard. If this macro is defined, a default definition
+will be provided to support C++. If @code{ON_EXIT} is not defined,
+a default @code{exit} function will also be provided.
+
+@item ON_EXIT
+@findex ON_EXIT
+Define this macro if the target has another way to implement atexit
+functionality without replacing @code{exit}. For instance, SunOS 4 has
+a similar @code{on_exit} library function.
+
+The definition should be a functional macro which can be used just like
+the @code{atexit} function.
@item EXIT_BODY
@findex EXIT_BODY
Define this macro as a C expression that is nonzero if it is safe for the
delay slot scheduler to place instructions in the delay slot of @var{insn},
even if they appear to use a resource set or clobbered in @var{insn}.
-@var{insn} is always a @code{jump_insn} or an @code{insn}; GNU CC knows that
+@var{insn} is always a @code{jump_insn} or an @code{insn}; GCC knows that
every @code{call_insn} has this behavior. On machines where some @code{insn}
or @code{jump_insn} is really a function call and hence has this behavior,
you should define this macro.
without user intervention. For instance, under Microsoft Windows
symbols must be explicitly imported from shared libraries (DLLs).
-@findex GIV_SORT_CRITERION
-@item GIV_SORT_CRITERION (@var{giv1}, @var{giv2})
-In some cases, the strength reduction optimization pass can produce better
-code if this is defined. This macro controls the order that induction
-variables are combined. This macro is particularly useful if the target has
-limited addressing modes. For instance, the SH target has only positive
-offsets in addresses. Thus sorting to put the smallest address first
-allows the most combinations to be found.
+@findex MD_ASM_CLOBBERS
+@item MD_ASM_CLOBBERS
+A C statement that adds to @var{CLOBBERS} @code{STRING_CST} trees for
+any hard regs the port wishes to automatically clobber for all asms.
@findex ISSUE_RATE
@item ISSUE_RATE
A C expression that returns how many instructions can be issued at the
-same time if the machine is a superscalar machine. This is only used by
-the @samp{Haifa} scheduler, and not the traditional scheduler.
+same time if the machine is a superscalar machine.
@findex MD_SCHED_INIT
-@item MD_SCHED_INIT (@var{file}, @var{verbose}
-A C statement which is executed by the @samp{Haifa} scheduler at the
+@item MD_SCHED_INIT (@var{file}, @var{verbose})
+A C statement which is executed by the scheduler at the
beginning of each block of instructions that are to be scheduled.
@var{file} is either a null pointer, or a stdio stream to write any
debug output to. @var{verbose} is the verbose level provided by
@samp{-fsched-verbose-}@var{n}.
@findex MD_SCHED_REORDER
-@item MD_SCHED_REORDER (@var{file}, @var{verbose}, @var{ready}, @var{n_ready})
-A C statement which is executed by the @samp{Haifa} scheduler after it
+@item MD_SCHED_REORDER (@var{file}, @var{verbose}, @var{ready}, @var{n_ready}, @var{clock}, @var{can_issue_more})
+A C statement which is executed by the scheduler after it
has scheduled the ready list to allow the machine description to reorder
it (for example to combine two small instructions together on
@samp{VLIW} machines). @var{file} is either a null pointer, or a stdio
the ready list of instructions that are ready to be scheduled.
@var{n_ready} is the number of elements in the ready list. The
scheduler reads the ready list in reverse order, starting with
-@var{ready}[@var{n_ready}-1] and going to @var{ready}[0].
+@var{ready}[@var{n_ready}-1] and going to @var{ready}[0]. @var{clock}
+is the timer tick of the scheduler. @var{can_issue_more} is an output
+parameter that is set to the number of insns that can issue this clock;
+normally this is just @code{issue_rate}.
@findex MD_SCHED_VARIABLE_ISSUE
@item MD_SCHED_VARIABLE_ISSUE (@var{file}, @var{verbose}, @var{insn}, @var{more})
-A C statement which is executed by the @samp{Haifa} scheduler after it
+A C statement which is executed by the scheduler after it
has scheduled an insn from the ready list. @var{file} is either a null
pointer, or a stdio stream to write any debug output to. @var{verbose}
is the verbose level provided by @samp{-fsched-verbose-}@var{n}.
@code{word_mode} in general purpose registers. Most targets should not define
this macro.
-@findex NEED_MATH_LIBRARY
-@item NEED_MATH_LIBRARY
-Define this macro as a C expression that is nonzero if @code{g++} should
-automatically link in the math library or to zero if @code{g++} should not
-automatically link in the math library.
-
-You need only define this macro if the target does not always need the math
-library linked into C++ programs.
+@findex MATH_LIBRARY
+@item 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
+separate math library.
+
+You need only define this macro if the default of @samp{"-lm"} is wrong.
+
+@findex LIBRARY_PATH_ENV
+@item LIBRARY_PATH_ENV
+Define this macro as a C string constant for the environment variable that
+specifies where the linker should look for libraries.
+
+You need only define this macro if the default of @samp{"LIBRARY_PATH"}
+is wrong.
+
+@findex TARGET_HAS_F_SETLKW
+@item TARGET_HAS_F_SETLKW
+Define this macro if the target supports file locking with fcntl / F_SETLKW.
+Note that this functionality is part of POSIX.
+Defining @code{TARGET_HAS_F_SETLKW} will enable the test coverage code
+to use file locking when exiting a program, which avoids race conditions
+if the program has forked.
+
+@findex MAX_CONDITIONAL_EXECUTE
+@item MAX_CONDITIONAL_EXECUTE
+
+A C expression for the maximum number of instructions to execute via
+conditional execution instructions instead of a branch. A value of
+@code{BRANCH_COST}+1 is the default if the machine does not use cc0, and
+1 if it does use cc0.
@end table