Target Description Macros and Functions
***************************************

In addition to the file MACHINE.md, a machine description includes a C header file conventionally given the name MACHINE.h and a C source file named MACHINE.c. The header file defines numerous macros that convey the information about the target machine that does not fit into the scheme of the .md file.  The file tm.h should be a link to MACHINE.h.  The header file config.h includes tm.h and most compiler source files include config.h.  The source file defines a variable targetm, which is a structure containing pointers to functions and data relating to the target machine.  MACHINE.c should also contain their definitions, if they are not defined elsewhere in GCC, and other functions called through the macros defined in the .h file.

The Global targetm Variable
===========================

 -- Variable: struct gcc_target targetm
     The target .c file must define the global targetm variable which contains pointers to functions and data relating to the target machine.  The variable is declared in target.h; target-def.h defines the macro TARGET_INITIALIZER which is used to initialize the variable, and macros for the default initializers for elements of the structure.  The .c file should override those macros for which the default definition is inappropriate.  For example:

          #include "target.h"
          #include "target-def.h"

          /* Initialize the GCC target structure.  */

          #undef TARGET_COMP_TYPE_ATTRIBUTES
          #define TARGET_COMP_TYPE_ATTRIBUTES MACHINE_comp_type_attributes

          struct gcc_target targetm = TARGET_INITIALIZER;

Where a macro should be defined in the .c file in this manner to form part of the targetm structure, it is documented below as a ``Target Hook'' with a prototype.  Many macros will change in future from being defined in the .h file to being part of the targetm structure.

Similarly, there is a targetcm variable for hooks that are specific to front ends for C-family languages, documented as ``C Target Hook''.  This is declared in c-family/c-target.h, the initializer TARGETCM_INITIALIZER in c-family/c-target-def.h.  If targets initialize targetcm themselves, they should set target_has_targetcm=yes in config.gcc; otherwise a default definition is used.

Similarly, there is a targetm_common variable for hooks that are shared between the compiler driver and the compilers proper, documented as ``Common Target Hook''.  This is declared in common/common-target.h, the initializer TARGETM_COMMON_INITIALIZER in common/common-target-def.h.  If targets initialize targetm_common themselves, they should set target_has_targetm_common=yes in config.gcc; otherwise a default definition is used.

Controlling the Compilation Driver, gcc
=======================================

You can control the compilation driver.

 -- Macro: DRIVER_SELF_SPECS
     A list of specs for the driver itself.  It should be a suitable initializer for an array of strings, with no surrounding braces.

     The driver applies these specs to its own command line between loading default specs files (but not command-line specified ones) and choosing the multilib directory or running any subcommands.  It applies them in the order given, so each spec can depend on the options added by earlier ones.  It is also possible to remove options using %<OPTION in the usual way.

     This macro can be useful when a port has several interdependent target options.  It provides a way of standardizing the command line so that the other specs are easier to write.

     Do not define this macro if it does not need to do anything.

 -- Macro: OPTION_DEFAULT_SPECS
     A list of specs used to support configure-time default options (i.e. --with options) in the driver.  It should be a suitable initializer for an array of structures, each containing two strings, without the outermost pair of surrounding braces.

     The first item in the pair is the name of the default.  This must match the code in config.gcc for the target.  The second item is a spec to apply if a default with this name was specified.  The string %(VALUE) in the spec will be replaced by the value of the default everywhere it occurs.

     The driver will apply these specs to its own command line between loading default specs files and processing DRIVER_SELF_SPECS, using the same mechanism as DRIVER_SELF_SPECS.

     Do not define this macro if it does not need to do anything.

 -- Macro: CPP_SPEC
     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 GCC into options for GCC to pass to the CPP.

     Do not define this macro if it does not need to do anything.

 -- Macro: CPLUSPLUS_CPP_SPEC
     This macro is just like CPP_SPEC, but is used for C++, rather than C.  If you do not define this macro, then the value of CPP_SPEC (if any) will be used instead.

 -- Macro: CC1_SPEC
     A C string constant that tells the GCC driver program options to pass to cc1, cc1plus, 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.

 -- Macro: CC1PLUS_SPEC
     A C string constant that tells the GCC driver program options to pass to cc1plus.  It can also specify how to translate options you give to GCC into options for GCC to pass to the 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 cc1plus so there is no need to duplicate the contents of CC1_SPEC in CC1PLUS_SPEC.

 -- Macro: ASM_SPEC
     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 GCC into options for GCC to pass to the assembler. See the file sun3.h for an example of this.

     Do not define this macro if it does not need to do anything.

 -- Macro: ASM_FINAL_SPEC
     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 mips.h for an example of this.

     Do not define this macro if it does not need to do anything.

 -- Macro: AS_NEEDS_DASH_FOR_PIPED_INPUT
     Define this macro, with no value, if the driver should give the assembler an argument consisting of a single dash, -, to instruct it to read from its standard input (which will be a pipe connected to the output of the compiler proper).  This argument is given after any -o option specifying the name of the output file.

     If you do not define this macro, the assembler is assumed to read its standard input if given no non-option arguments.  If your assembler cannot read standard input at all, use a %{pipe:%e} construct; see mips.h for instance.

 -- Macro: LINK_SPEC
     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 GCC into options for GCC to pass to the linker.

     Do not define this macro if it does not need to do anything.

 -- Macro: LIB_SPEC
     Another C string constant used much like LINK_SPEC.  The difference between the two is that LIB_SPEC is used at the end of the command given to the linker.

     If this macro is not defined, a default is provided that loads the standard C library from the usual place.  See gcc.c.

 -- Macro: LIBGCC_SPEC
     Another C string constant that tells the GCC driver program how and when to place a reference to libgcc.a into the linker command line.  This constant is placed both before and after the value of LIB_SPEC.

     If this macro is not defined, the GCC driver provides a default that passes the string -lgcc to the linker.

 -- Macro: REAL_LIBGCC_SPEC
     By default, if ENABLE_SHARED_LIBGCC is defined, the LIBGCC_SPEC is not directly used by the driver program but is instead modified to refer to different versions of libgcc.a depending on the values of the command line flags -static, -shared, -static-libgcc, and -shared-libgcc.  On targets where these modifications are inappropriate, define REAL_LIBGCC_SPEC instead.  REAL_LIBGCC_SPEC tells the driver how to place a reference to libgcc on the link command line, but, unlike LIBGCC_SPEC, it is used unmodified.

 -- Macro: USE_LD_AS_NEEDED
     A macro that controls the modifications to LIBGCC_SPEC mentioned in REAL_LIBGCC_SPEC.  If nonzero, a spec will be generated that uses --as-needed and the shared libgcc in place of the static exception handler library, when linking without any of -static, -static-libgcc, or -shared-libgcc.

 -- Macro: LINK_EH_SPEC
     If defined, this C string constant is added to LINK_SPEC. When USE_LD_AS_NEEDED is zero or undefined, it also affects the modifications to LIBGCC_SPEC mentioned in REAL_LIBGCC_SPEC.

 -- Macro: STARTFILE_SPEC
     Another C string constant used much like LINK_SPEC.  The difference between the two is that STARTFILE_SPEC is used at the very beginning of the command given to the linker.

     If this macro is not defined, a default is provided that loads the standard C startup file from the usual place.  See gcc.c.

 -- Macro: ENDFILE_SPEC
     Another C string constant used much like LINK_SPEC.  The difference between the two is that ENDFILE_SPEC is used at the very end of the command given to the linker.

     Do not define this macro if it does not need to do anything.

 -- Macro: THREAD_MODEL_SPEC
     GCC -v will print the thread model GCC was configured to use. However, this doesn't work on platforms that are multilibbed on thread models, such as AIX 4.3.  On such platforms, define THREAD_MODEL_SPEC such that it evaluates to a string without blanks that names one of the recognized thread models.  %*, the default value of this macro, will expand to the value of thread_file set in config.gcc.

 -- Macro: SYSROOT_SUFFIX_SPEC
     Define this macro to add a suffix to the target sysroot when GCC is configured with a sysroot.  This will cause GCC to search for usr/lib, et al, within sysroot+suffix.

 -- Macro: SYSROOT_HEADERS_SUFFIX_SPEC
     Define this macro to add a headers_suffix to the target sysroot when GCC is configured with a sysroot.  This will cause GCC to pass the updated sysroot+headers_suffix to CPP, causing it to search for usr/include, et al, within sysroot+headers_suffix.

 -- Macro: EXTRA_SPECS
     Define this macro to provide additional specifications to put in the specs file that can be used in various specifications like CC1_SPEC.

     The definition should be an initializer for an array of structures, containing a string constant, that defines the specification name, and a string constant that provides the specification.

     Do not define this macro if it does not need to do anything.

     EXTRA_SPECS is useful when an architecture contains several related targets, which have various ..._SPECS which are similar to each other, and the maintainer would like one central place to keep these definitions.

     For example, the PowerPC System V.4 targets use EXTRA_SPECS to define either _CALL_SYSV when the System V calling sequence is used or _CALL_AIX when the older AIX-based calling sequence is used.

     The config/rs6000/rs6000.h target file defines:

          #define EXTRA_SPECS \
            { "cpp_sysv_default", CPP_SYSV_DEFAULT },

          #define CPP_SYS_DEFAULT ""

     The config/rs6000/sysv.h target file defines:

          #undef CPP_SPEC
          #define CPP_SPEC \
          "%{posix: -D_POSIX_SOURCE } \
          %{mcall-sysv: -D_CALL_SYSV } \
          %{!mcall-sysv: %(cpp_sysv_default) } \
          %{msoft-float: -D_SOFT_FLOAT} %{mcpu=403: -D_SOFT_FLOAT}"

          #undef CPP_SYSV_DEFAULT
          #define CPP_SYSV_DEFAULT "-D_CALL_SYSV"

     while the config/rs6000/eabiaix.h target file defines CPP_SYSV_DEFAULT as:

          #undef CPP_SYSV_DEFAULT
          #define CPP_SYSV_DEFAULT "-D_CALL_AIX"

 -- Macro: LINK_LIBGCC_SPECIAL_1
     Define this macro if the driver program should find the library libgcc.a.  If you do not define this macro, the driver program will pass the argument -lgcc to tell the linker to do the search.

 -- Macro: LINK_GCC_C_SEQUENCE_SPEC
     The sequence in which libgcc and libc are specified to the linker. By default this is %G %L %G.

 -- Macro: LINK_COMMAND_SPEC
     A C string constant giving the complete command line need to execute the linker.  When you do this, you will need to update your port each time a change is made to the link command line within gcc.c.  Therefore, define this macro only if you need to completely redefine the command line for invoking the linker and there is no other way to accomplish the effect you need.  Overriding this macro may be avoidable by overriding LINK_GCC_C_SEQUENCE_SPEC instead.

 -- Common Target Hook: bool TARGET_ALWAYS_STRIP_DOTDOT
     True if .. components should always be removed from directory names computed relative to GCC's internal directories, false (default) if such components should be preserved and directory names containing them passed to other tools such as the linker.

 -- Macro: MULTILIB_DEFAULTS
     Define this macro as a C expression for the initializer of an array of string to tell the driver program which options are defaults for this target and thus do not need to be handled specially when using MULTILIB_OPTIONS.

     Do not define this macro if MULTILIB_OPTIONS is not defined in the target makefile fragment or if none of the options listed in MULTILIB_OPTIONS are set by default. See Target Fragment.

 -- Macro: RELATIVE_PREFIX_NOT_LINKDIR
     Define this macro to tell gcc that it should only translate a -B prefix into a -L linker option if the prefix indicates an absolute file name.

 -- Macro: MD_EXEC_PREFIX
     If defined, this macro is an additional prefix to try after STANDARD_EXEC_PREFIX.  MD_EXEC_PREFIX is not searched when the compiler is built as a cross compiler.  If you define MD_EXEC_PREFIX, then be sure to add it to the list of directories used to find the assembler in configure.in.

 -- Macro: STANDARD_STARTFILE_PREFIX
     Define this macro as a C string constant if you wish to override the standard choice of libdir as the default prefix to try when searching for startup files such as crt0.o. STANDARD_STARTFILE_PREFIX is not searched when the compiler is built as a cross compiler.

 -- Macro: STANDARD_STARTFILE_PREFIX_1
     Define this macro as a C string constant if you wish to override the standard choice of /lib as a prefix to try after the default prefix when searching for startup files such as crt0.o. STANDARD_STARTFILE_PREFIX_1 is not searched when the compiler is built as a cross compiler.

 -- Macro: STANDARD_STARTFILE_PREFIX_2
     Define this macro as a C string constant if you wish to override the standard choice of /lib as yet another prefix to try after the default prefix when searching for startup files such as crt0.o. STANDARD_STARTFILE_PREFIX_2 is not searched when the compiler is built as a cross compiler.

 -- Macro: MD_STARTFILE_PREFIX
     If defined, this macro supplies an additional prefix to try after the standard prefixes.  MD_EXEC_PREFIX is not searched when the compiler is built as a cross compiler.

 -- Macro: MD_STARTFILE_PREFIX_1
     If defined, this macro supplies yet another prefix to try after the standard prefixes.  It is not searched when the compiler is built as a cross compiler.

 -- Macro: INIT_ENVIRONMENT
     Define this macro as a C string constant if you wish to set environment variables for programs called by the driver, such as the assembler and loader.  The driver passes the value of this macro to putenv to initialize the necessary environment variables.

 -- Macro: LOCAL_INCLUDE_DIR
     Define this macro as a C string constant if you wish to override the standard choice of /usr/local/include as the default prefix to try when searching for local header files.  LOCAL_INCLUDE_DIR comes before NATIVE_SYSTEM_HEADER_DIR (set in config.gcc, normally /usr/include) in the search order.

     Cross compilers do not search either /usr/local/include or its replacement.

 -- Macro: NATIVE_SYSTEM_HEADER_COMPONENT
     The ``component'' corresponding to NATIVE_SYSTEM_HEADER_DIR. See INCLUDE_DEFAULTS, below, for the description of components. If you do not define this macro, no component is used.

 -- Macro: INCLUDE_DEFAULTS
     Define this macro if you wish to override the entire default search path for include files.  For a native compiler, the default search path usually consists of GCC_INCLUDE_DIR, LOCAL_INCLUDE_DIR, GPLUSPLUS_INCLUDE_DIR, and NATIVE_SYSTEM_HEADER_DIR.  In addition, GPLUSPLUS_INCLUDE_DIR and GCC_INCLUDE_DIR are defined automatically by Makefile, and specify private search areas for GCC.  The directory GPLUSPLUS_INCLUDE_DIR is used only for C++ programs.

     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 (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 extern 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 uppercase letters.  For example, it might be GCC or BINUTILS.  If the package is part of a vendor-supplied operating system, code the component name as 0.

     For example, here is the definition used for VAX/VMS:

          #define INCLUDE_DEFAULTS \
          {                                       \
            { "GNU_GXX_INCLUDE:", "G++", 1, 1},   \
            { "GNU_CC_INCLUDE:", "GCC", 0, 0},    \
            { "SYS$SYSROOT:[SYSLIB.]", 0, 0, 0},  \
            { ".", 0, 0, 0},                      \
            { 0, 0, 0, 0}                         \
          }

Here is the order of prefixes tried for exec files:

 1. Any prefixes specified by the user with -B.

 2. The environment variable GCC_EXEC_PREFIX or, if GCC_EXEC_PREFIX is not set and the compiler has not been installed in the configure-time PREFIX, the location in which the compiler has actually been installed.

 3. The directories specified by the environment variable COMPILER_PATH.

 4. The macro STANDARD_EXEC_PREFIX, if the compiler has been installed in the configured-time PREFIX.

 5. The location /usr/libexec/gcc/, but only if this is a native compiler.

 6. The location /usr/lib/gcc/, but only if this is a native compiler.

 7. The macro MD_EXEC_PREFIX, if defined, but only if this is a native compiler.

Here is the order of prefixes tried for startfiles:

 1. Any prefixes specified by the user with -B.

 2. The environment variable GCC_EXEC_PREFIX or its automatically determined value based on the installed toolchain location.

 3. The directories specified by the environment variable LIBRARY_PATH (or port-specific name; native only, cross compilers do not use this).

 4. The macro STANDARD_EXEC_PREFIX, but only if the toolchain is installed in the configured PREFIX or this is a native compiler.

 5. The location /usr/lib/gcc/, but only if this is a native compiler.

 6. The macro MD_EXEC_PREFIX, if defined, but only if this is a native compiler.

 7. The macro MD_STARTFILE_PREFIX, if defined, but only if this is a native compiler, or we have a target system root.

 8. The macro MD_STARTFILE_PREFIX_1, if defined, but only if this is a native compiler, or we have a target system root.

 9. The macro STANDARD_STARTFILE_PREFIX, with any sysroot modifications. If this path is relative it will be prefixed by GCC_EXEC_PREFIX and the machine suffix or STANDARD_EXEC_PREFIX and the machine suffix.

 10. The macro STANDARD_STARTFILE_PREFIX_1, but only if this is a native compiler, or we have a target system root. The default for this macro is /lib/.

 11. The macro STANDARD_STARTFILE_PREFIX_2, but only if this is a native compiler, or we have a target system root. The default for this macro is /usr/lib/.

Run-time Target Specification
=============================

Here are run-time target specifications.

 -- Macro: TARGET_CPU_CPP_BUILTINS ()
     This function-like macro expands to a block of code that defines built-in preprocessor macros and assertions for the target CPU, using the functions builtin_define, builtin_define_std and builtin_assert.  When the front end calls this macro it provides a trailing semicolon, and since it has finished command line option processing your code can use those results freely.

     builtin_assert takes a string in the form you pass to the command-line option -A, such as cpu=mips, and creates the assertion.  builtin_define takes a string in the form accepted by option -D and unconditionally defines the macro.

     builtin_define_std takes a string representing the name of an object-like macro.  If it doesn't lie in the user's namespace, builtin_define_std defines it unconditionally.  Otherwise, it defines a version with two leading underscores, and another version with two leading and trailing underscores, and defines the original only if an ISO standard was not requested on the command line.  For example, passing unix defines __unix, __unix__ and possibly unix; passing _mips defines __mips, __mips__ and possibly _mips, and passing _ABI64 defines only _ABI64.

     You can also test for the C dialect being compiled.  The variable c_language is set to one of clk_c, clk_cplusplus or clk_objective_c.  Note that if we are preprocessing assembler, this variable will be clk_c but the function-like macro preprocessing_asm_p() will return true, so you might want to check for that first.  If you need to check for strict ANSI, the variable flag_iso can be used.  The function-like macro preprocessing_trad_p() can be used to check for traditional preprocessing.

 -- Macro: TARGET_OS_CPP_BUILTINS ()
     Similarly to TARGET_CPU_CPP_BUILTINS but this macro is optional and is used for the target operating system instead.

 -- Macro: TARGET_OBJFMT_CPP_BUILTINS ()
     Similarly to TARGET_CPU_CPP_BUILTINS but this macro is optional and is used for the target object format.  elfos.h uses this macro to define __ELF__, so you probably do not need to define it yourself.

 -- Variable: extern int target_flags
     This variable is declared in options.h, which is included before any target-specific headers.

 -- Common Target Hook: int TARGET_DEFAULT_TARGET_FLAGS
     This variable specifies the initial value of target_flags. Its default setting is 0.

 -- Common Target Hook: bool TARGET_HANDLE_OPTION (struct gcc_options *OPTS, struct gcc_options *OPTS_SET, const struct cl_decoded_option *DECODED, location_t LOC)
     This hook is called whenever the user specifies one of the target-specific options described by the .opt definition files (see Options).  It has the opportunity to do some option-specific processing and should return true if the option is valid.  The default definition does nothing but return true.

     DECODED specifies the option and its arguments.  OPTS and OPTS_SET are the gcc_options structures to be used for storing option state, and LOC is the location at which the option was passed (UNKNOWN_LOCATION except for options passed via attributes).

 -- C Target Hook: bool TARGET_HANDLE_C_OPTION (size_t CODE, const char *ARG, int VALUE)
     This target hook is called whenever the user specifies one of the target-specific C language family options described by the .opt definition files(see Options).  It has the opportunity to do some option-specific processing and should return true if the option is valid.  The arguments are like for TARGET_HANDLE_OPTION.  The default definition does nothing but return false.

     In general, you should use TARGET_HANDLE_OPTION to handle options.  However, if processing an option requires routines that are only available in the C (and related language) front ends, then you should use TARGET_HANDLE_C_OPTION instead.

 -- C Target Hook: tree TARGET_OBJC_CONSTRUCT_STRING_OBJECT (tree STRING)
     Targets may provide a string object type that can be used within and between C, C++ and their respective Objective-C dialects. A string object might, for example, embed encoding and length information. These objects are considered opaque to the compiler and handled as references. An ideal implementation makes the composition of the string object match that of the Objective-C NSString (NXString for GNUStep), allowing efficient interworking between C-only and Objective-C code. If a target implements string objects then this hook should return a reference to such an object constructed from the normal `C' string representation provided in STRING. At present, the hook is used by Objective-C only, to obtain a common-format string object when the target provides one.

 -- C Target Hook: void TARGET_OBJC_DECLARE_UNRESOLVED_CLASS_REFERENCE (const char *CLASSNAME)
     Declare that Objective C class CLASSNAME is referenced  by the current TU.

 -- C Target Hook: void TARGET_OBJC_DECLARE_CLASS_DEFINITION (const char *CLASSNAME)
     Declare that Objective C class CLASSNAME is defined  by the current TU.

 -- C Target Hook: bool TARGET_STRING_OBJECT_REF_TYPE_P (const_tree STRINGREF)
     If a target implements string objects then this hook should return true if STRINGREF is a valid reference to such an object.

 -- C Target Hook: void TARGET_CHECK_STRING_OBJECT_FORMAT_ARG (tree FORMAT_ARG, tree ARGS_LIST)
     If a target implements string objects then this hook should should  provide a facility to check the function arguments in ARGS_LIST  against the format specifiers in FORMAT_ARG where the type of  FORMAT_ARG is one recognized as a valid string reference type.

 -- Target Hook: void TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE (void)
     This target function is similar to the hook TARGET_OPTION_OVERRIDE but is called when the optimize level is changed via an attribute or pragma or when it is reset at the end of the code affected by the attribute or pragma.  It is not called at the beginning of compilation when TARGET_OPTION_OVERRIDE is called so if you want to perform these actions then, you should have TARGET_OPTION_OVERRIDE call TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE.

 -- Macro: C_COMMON_OVERRIDE_OPTIONS
     This is similar to the TARGET_OPTION_OVERRIDE hook but is only used in the C language frontends (C, Objective-C, C++, Objective-C++) and so can be used to alter option flag variables which only exist in those frontends.

 -- Common Target Hook: const struct default_options * TARGET_OPTION_OPTIMIZATION_TABLE
     Some machines may desire to change what optimizations are performed for various optimization levels.   This variable, if defined, describes options to enable at particular sets of optimization levels.  These options are processed once just after the optimization level is determined and before the remainder of the command options have been parsed, so may be overridden by other options passed explicitly.

     This processing is run once at program startup and when the optimization options are changed via #pragma GCC optimize or by using the optimize attribute.

 -- Common Target Hook: void TARGET_OPTION_INIT_STRUCT (struct gcc_options *OPTS)
     Set target-dependent initial values of fields in OPTS.

 -- Common Target Hook: void TARGET_OPTION_DEFAULT_PARAMS (void)
     Set target-dependent default values for --param settings, using calls to set_default_param_value.

 -- Macro: SWITCHABLE_TARGET
     Some targets need to switch between substantially different subtargets during compilation.  For example, the MIPS target has one subtarget for the traditional MIPS architecture and another for MIPS16.  Source code can switch between these two subarchitectures using the mips16 and nomips16 attributes.

     Such subtargets can differ in things like the set of available registers, the set of available instructions, the costs of various operations, and so on.  GCC caches a lot of this type of information in global variables, and recomputing them for each subtarget takes a significant amount of time.  The compiler therefore provides a facility for maintaining several versions of the global variables and quickly switching between them; see target-globals.h for details.

     Define this macro to 1 if your target needs this facility.  The default is 0.

Defining data structures for per-function information.
======================================================

If the target needs to store information on a per-function basis, GCC provides a macro and a couple of variables to allow this.  Note, just using statics to store the information is a bad idea, since GCC supports nested functions, so you can be halfway through encoding one function when another one comes along.

GCC defines a data structure called struct function which contains all of the data specific to an individual function.  This structure contains a field called machine whose type is struct machine_function *, which can be used by targets to point to their own specific data.

If a target needs per-function specific data it should define the type struct machine_function and also the macro INIT_EXPANDERS. This macro should be used to initialize the function pointer init_machine_status.  This pointer is explained below.

One typical use of per-function, target specific data is to create an RTX to hold the register containing the function's return address.  This RTX can then be used to implement the __builtin_return_address function, for level 0.

Note---earlier implementations of GCC used a single data area to hold all of the per-function information.  Thus when processing of a nested function began the old per-function data had to be pushed onto a stack, and when the processing was finished, it had to be popped off the stack.  GCC used to provide function pointers called save_machine_status and restore_machine_status to handle the saving and restoring of the target specific information.  Since the single data area approach is no longer used, these pointers are no longer supported.

 -- Macro: INIT_EXPANDERS
     Macro called to initialize any target specific information.  This macro is called once per function, before generation of any RTL has begun. The intention of this macro is to allow the initialization of the function pointer init_machine_status.

 -- Variable: void (*)(struct function *) init_machine_status
     If this function pointer is non-NULL it will be called once per function, before function compilation starts, in order to allow the target to perform any target specific initialization of the struct function structure.  It is intended that this would be used to initialize the machine of that structure.

     struct machine_function structures are expected to be freed by GC. Generally, any memory that they reference must be allocated by using GC allocation, including the structure itself.

Storage Layout
==============

Note that the definitions of the macros in this table which are sizes or alignments measured in bits do not need to be constant.  They can be C expressions that refer to static variables, such as the target_flags. See Run-time Target.

 -- Macro: BITS_BIG_ENDIAN
     Define this macro to have the value 1 if the most significant bit in a byte has the lowest number; otherwise define it to have the value zero. This means that bit-field instructions count from the most significant bit.  If the machine has no bit-field instructions, then this must still be defined, but it doesn't matter which value it is defined to.  This macro need not be a constant.

     This macro does not affect the way structure fields are packed into bytes or words; that is controlled by BYTES_BIG_ENDIAN.

 -- Macro: BYTES_BIG_ENDIAN
     Define this macro to have the value 1 if the most significant byte in a word has the lowest number.  This macro need not be a constant.

 -- Macro: 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; see REG_WORDS_BIG_ENDIAN if the order of words in memory is not the same as the order in registers.  This macro need not be a constant.

 -- Macro: REG_WORDS_BIG_ENDIAN
     On some machines, the order of words in a multiword object differs between registers in memory.  In such a situation, define this macro to describe the order of words in a register.  The macro WORDS_BIG_ENDIAN controls the order of words in memory.

 -- Macro: FLOAT_WORDS_BIG_ENDIAN
     Define this macro to have the value 1 if DFmode, XFmode or TFmode floating point numbers are stored in memory with the word containing the sign bit at the lowest address; otherwise define it to have the value 0.  This macro need not be a constant.

     You need not define this macro if the ordering is the same as for multi-word integers.

 -- Macro: BITS_PER_UNIT
     Define this macro to be the number of bits in an addressable storage unit (byte).  If you do not define this macro the default is 8.

 -- Macro: BITS_PER_WORD
     Number of bits in a word.  If you do not define this macro, the default is BITS_PER_UNIT * UNITS_PER_WORD.

 -- Macro: MAX_BITS_PER_WORD
     Maximum number of bits in a word.  If this is undefined, the default is BITS_PER_WORD.  Otherwise, it is the constant value that is the largest value that BITS_PER_WORD can have at run-time.

 -- Macro: UNITS_PER_WORD
     Number of storage units in a word; normally the size of a general-purpose register, a power of two from 1 or 8.

 -- Macro: MIN_UNITS_PER_WORD
     Minimum number of units in a word.  If this is undefined, the default is UNITS_PER_WORD.  Otherwise, it is the constant value that is the smallest value that UNITS_PER_WORD can have at run-time.

 -- Macro: POINTER_SIZE
     Width of a pointer, in bits.  You must specify a value no wider than the width of Pmode.  If it is not equal to the width of Pmode, you must define POINTERS_EXTEND_UNSIGNED.  If you do not specify a value the default is BITS_PER_WORD.

 -- Macro: POINTERS_EXTEND_UNSIGNED
     A C expression that determines how pointers should be extended from ptr_mode to either Pmode or 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 ptr_extend instruction.

     You need not define this macro if the ptr_mode, Pmode and word_mode are all the same width.

 -- Macro: PROMOTE_MODE (M, UNSIGNEDP, TYPE)
     A macro to update M and UNSIGNEDP when an object whose type is TYPE and which has the specified mode and signedness is to be stored in a register.  This macro is only called when TYPE is a scalar type.

     On most RISC machines, which only have operations that operate on a full register, define this macro to set M to word_mode if M is an integer mode narrower than BITS_PER_WORD.  In most cases, only integer modes should be widened because wider-precision floating-point operations are usually more expensive than their narrower counterparts.

     For most machines, the macro definition does not change UNSIGNEDP. However, some machines, have instructions that preferentially handle either signed or unsigned quantities of certain modes.  For example, on the DEC Alpha, 32-bit loads from memory and 32-bit add instructions sign-extend the result to 64 bits.  On such machines, set UNSIGNEDP according to which kind of extension is more efficient.

     Do not define this macro if it would never modify M.

 -- Target Hook: enum machine_mode TARGET_PROMOTE_FUNCTION_MODE (const_tree TYPE, enum machine_mode MODE, int *PUNSIGNEDP, const_tree FUNTYPE, int FOR_RETURN)
     Like PROMOTE_MODE, but it is applied to outgoing function arguments or function return values.  The target hook should return the new mode and possibly change *PUNSIGNEDP if the promotion should change signedness.  This function is called only for scalar or pointer types.

     FOR_RETURN allows to distinguish the promotion of arguments and return values.  If it is 1, a return value is being promoted and TARGET_FUNCTION_VALUE must perform the same promotions done here. If it is 2, the returned mode should be that of the register in which an incoming parameter is copied, or the outgoing result is computed; then the hook should return the same mode as promote_mode, though the signedness may be different.

     TYPE can be NULL when promoting function arguments of libcalls.

     The default is to not promote arguments and return values.  You can also define the hook to default_promote_function_mode_always_promote if you would like to apply the same rules given by PROMOTE_MODE.

 -- Macro: PARM_BOUNDARY
     Normal alignment required for function parameters on the stack, in bits.  All stack parameters receive at least this much alignment regardless of data type.  On most machines, this is the same as the size of an integer.

 -- Macro: STACK_BOUNDARY
     Define this macro to the minimum alignment enforced by hardware 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.  On most machines, this should be the same as PARM_BOUNDARY.

 -- Macro: PREFERRED_STACK_BOUNDARY
     Define this macro if you wish to preserve a certain alignment for the stack pointer, greater than what the hardware enforces.  The definition is a C expression for the desired alignment (measured in bits).  This macro must evaluate to a value equal to or larger than STACK_BOUNDARY.

 -- Macro: INCOMING_STACK_BOUNDARY
     Define this macro if the incoming stack boundary may be different from PREFERRED_STACK_BOUNDARY.  This macro must evaluate to a value equal to or larger than STACK_BOUNDARY.

 -- Macro: FUNCTION_BOUNDARY
     Alignment required for a function entry point, in bits.

 -- Macro: BIGGEST_ALIGNMENT
     Biggest alignment that any data type can require on this machine, in bits.  Note that this is not the biggest alignment that is supported, just the biggest alignment that, when violated, may cause a fault.

 -- Macro: MALLOC_ABI_ALIGNMENT
     Alignment, in bits, a C conformant malloc implementation has to provide.  If not defined, the default value is BITS_PER_WORD.

 -- Macro: ATTRIBUTE_ALIGNED_VALUE
     Alignment used by the __attribute__ ((aligned)) construct.  If not defined, the default value is BIGGEST_ALIGNMENT.

 -- Macro: MINIMUM_ATOMIC_ALIGNMENT
     If defined, the smallest alignment, in bits, that can be given to an object that can be referenced in one operation, without disturbing any nearby object.  Normally, this is BITS_PER_UNIT, but may be larger on machines that don't have byte or half-word store operations.

 -- Macro: BIGGEST_FIELD_ALIGNMENT
     Biggest alignment that any structure or union field can require on this machine, in bits.  If defined, this overrides BIGGEST_ALIGNMENT for structure and union fields only, unless the field alignment has been set by the __attribute__ ((aligned (N))) construct.

 -- Macro: ADJUST_FIELD_ALIGN (FIELD, COMPUTED)
     An expression for the alignment of a structure field FIELD if the alignment computed in the usual way (including applying of BIGGEST_ALIGNMENT and BIGGEST_FIELD_ALIGNMENT to the alignment) is COMPUTED.  It overrides alignment only if the field alignment has not been set by the __attribute__ ((aligned (N))) construct.

 -- Macro: MAX_STACK_ALIGNMENT
     Biggest stack alignment guaranteed by the backend.  Use this macro to specify the maximum alignment of a variable on stack.

     If not defined, the default value is STACK_BOUNDARY.

 -- Macro: MAX_OFILE_ALIGNMENT
     Biggest alignment supported by the object file format of this machine. Use this macro to limit the alignment which can be specified using the __attribute__ ((aligned (N))) construct.  If not defined, the default value is BIGGEST_ALIGNMENT.

     On systems that use ELF, the default (in config/elfos.h) is the largest supported 32-bit ELF section alignment representable on a 32-bit host e.g. (((unsigned HOST_WIDEST_INT) 1 << 28) * 8). On 32-bit ELF the largest supported section alignment in bits is (0x80000000 * 8), but this is not representable on 32-bit hosts.

 -- Macro: DATA_ALIGNMENT (TYPE, BASIC-ALIGN)
     If defined, a C expression to compute the alignment for a variable in the static store.  TYPE is the data type, and 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 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.  Another is to cause character arrays to be word-aligned so that strcpy calls that copy constants to character arrays can be done inline.

 -- Macro: CONSTANT_ALIGNMENT (CONSTANT, BASIC-ALIGN)
     If defined, a C expression to compute the alignment given to a constant that is being placed in memory.  CONSTANT is the constant and 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 BASIC-ALIGN is used.

     The typical use of this macro is to increase alignment for string constants to be word aligned so that strcpy calls that copy constants can be done inline.

 -- Macro: LOCAL_ALIGNMENT (TYPE, BASIC-ALIGN)
     If defined, a C expression to compute the alignment for a variable in the local store.  TYPE is the data type, and 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 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.

     If the value of this macro has a type, it should be an unsigned type.

 -- Target Hook: HOST_WIDE_INT TARGET_VECTOR_ALIGNMENT (const_tree TYPE)
     This hook can be used to define the alignment for a vector of type TYPE, in order to comply with a platform ABI.  The default is to require natural alignment for vector types.  The alignment returned by this hook must be a power-of-two multiple of the default alignment of the vector element type.

 -- Macro: STACK_SLOT_ALIGNMENT (TYPE, MODE, BASIC-ALIGN)
     If defined, a C expression to compute the alignment for stack slot. TYPE is the data type, MODE is the widest mode available, and BASIC-ALIGN is the alignment that the slot would ordinarily have.  The value of this macro is used instead of that alignment to align the slot.

     If this macro is not defined, then BASIC-ALIGN is used when TYPE is NULL.  Otherwise, LOCAL_ALIGNMENT will be used.

     This macro is to set alignment of stack slot to the maximum alignment of all possible modes which the slot may have.

     If the value of this macro has a type, it should be an unsigned type.

 -- Macro: LOCAL_DECL_ALIGNMENT (DECL)
     If defined, a C expression to compute the alignment for a local variable DECL.

     If this macro is not defined, then LOCAL_ALIGNMENT (TREE_TYPE (DECL), DECL_ALIGN (DECL)) is used.

     One use of this macro is to increase alignment of medium-size data to make it all fit in fewer cache lines.

     If the value of this macro has a type, it should be an unsigned type.

 -- Macro: MINIMUM_ALIGNMENT (EXP, MODE, ALIGN)
     If defined, a C expression to compute the minimum required alignment for dynamic stack realignment purposes for EXP (a type or decl), MODE, assuming normal alignment ALIGN.

     If this macro is not defined, then ALIGN will be used.

 -- Macro: EMPTY_FIELD_BOUNDARY
     Alignment in bits to be given to a structure bit-field that follows an empty field such as int : 0;.

     If PCC_BITFIELD_TYPE_MATTERS is true, it overrides this macro.

 -- Macro: STRUCTURE_SIZE_BOUNDARY
     Number of bits which any structure or union's size must be a multiple of. Each structure or union's size is rounded up to a multiple of this.

     If you do not define this macro, the default is the same as BITS_PER_UNIT.

 -- Macro: STRICT_ALIGNMENT
     Define this macro to be the value 1 if instructions will fail to work if given data not on the nominal alignment.  If instructions will merely go slower in that case, define this macro as 0.

 -- Macro: PCC_BITFIELD_TYPE_MATTERS
     Define this if you wish to imitate the way many other C compilers handle alignment of bit-fields and the structures that contain them.

     The behavior is that the type written for a named bit-field (int, short, or other integer type) imposes an alignment for the entire structure, as if the structure really did contain an ordinary field of that type.  In addition, the bit-field is placed within the structure so that it would fit within such a field, not crossing a boundary for it.

     Thus, on most machines, a named bit-field whose type is written as int would not cross a four-byte boundary, and would force four-byte alignment for the whole structure.  (The alignment used may not be four bytes; it is controlled by the other alignment parameters.)

     An unnamed bit-field will not affect the alignment of the containing structure.

     If the macro is defined, its definition should be a C expression; a nonzero value for the expression enables this behavior.

     Note that if this macro is not defined, or its value is zero, some bit-fields may cross more than one alignment boundary.  The compiler can support such references if there are insv, extv, and extzv insns that can directly reference memory.

     The other known way of making bit-fields work is to define STRUCTURE_SIZE_BOUNDARY as large as BIGGEST_ALIGNMENT. Then every structure can be accessed with fullwords.

     Unless the machine has bit-field instructions or you define STRUCTURE_SIZE_BOUNDARY that way, you must define PCC_BITFIELD_TYPE_MATTERS to have a nonzero value.

     If your aim is to make GCC use the same conventions for laying out bit-fields as are used by another compiler, here is how to investigate what the other compiler does.  Compile and run this program:

          struct foo1
          {
            char x;
            char :0;
            char y;
          };

          struct foo2
          {
            char x;
            int :0;
            char y;
          };

          main ()
          {
            printf ("Size of foo1 is %d\n",
                    sizeof (struct foo1));
            printf ("Size of foo2 is %d\n",
                    sizeof (struct foo2));
            exit (0);
          }

     If this prints 2 and 5, then the compiler's behavior is what you would get from PCC_BITFIELD_TYPE_MATTERS.

 -- Macro: BITFIELD_NBYTES_LIMITED
     Like PCC_BITFIELD_TYPE_MATTERS except that its effect is limited to aligning a bit-field within the structure.

 -- Target Hook: bool TARGET_ALIGN_ANON_BITFIELD (void)
     When PCC_BITFIELD_TYPE_MATTERS is true this hook will determine whether unnamed bitfields affect the alignment of the containing structure.  The hook should return true if the structure should inherit the alignment requirements of an unnamed bitfield's type.

 -- Target Hook: bool TARGET_NARROW_VOLATILE_BITFIELD (void)
     This target hook should return true if accesses to volatile bitfields should use the narrowest mode possible.  It should return false if these accesses should use the bitfield container type.

     The default is !TARGET_STRICT_ALIGN.

 -- Target Hook: bool TARGET_MEMBER_TYPE_FORCES_BLK (const_tree FIELD, enum machine_mode MODE)
     Return true if a structure, union or array containing FIELD should be accessed using BLKMODE.

     If FIELD is the only field in the structure, MODE is its mode, otherwise MODE is VOIDmode.  MODE is provided in the case where structures of one field would require the structure's mode to retain the field's mode.

     Normally, this is not needed.

 -- Macro: ROUND_TYPE_ALIGN (TYPE, COMPUTED, SPECIFIED)
     Define this macro as an expression for the alignment of a type (given by TYPE as a tree node) if the alignment computed in the usual way is COMPUTED and the alignment explicitly specified was SPECIFIED.

     The default is to use SPECIFIED if it is larger; otherwise, use the smaller of COMPUTED and BIGGEST_ALIGNMENT

 -- Macro: MAX_FIXED_MODE_SIZE
     An integer expression for the size in bits of the largest integer machine mode that should actually be used.  All integer machine modes of this size or smaller can be used for structures and unions with the appropriate sizes.  If this macro is undefined, GET_MODE_BITSIZE (DImode) is assumed.

 -- Macro: STACK_SAVEAREA_MODE (SAVE_LEVEL)
     If defined, an expression of type enum machine_mode that specifies the mode of the save area operand of a save_stack_LEVEL named pattern (see Standard Names). SAVE_LEVEL is one of SAVE_BLOCK, SAVE_FUNCTION, or SAVE_NONLOCAL and selects which of the three named patterns is having its mode specified.

     You need not define this macro if it always returns Pmode.  You would most commonly define this macro if the save_stack_LEVEL patterns need to support both a 32- and a 64-bit mode.

 -- Macro: STACK_SIZE_MODE
     If defined, an expression of type enum machine_mode that specifies the mode of the size increment operand of an allocate_stack named pattern (see Standard Names).

     You need not define this macro if it always returns word_mode. You would most commonly define this macro if the allocate_stack pattern needs to support both a 32- and a 64-bit mode.

 -- Target Hook: enum machine_mode TARGET_LIBGCC_CMP_RETURN_MODE (void)
     This target hook should return the mode to be used for the return value of compare instructions expanded to libgcc calls.  If not defined word_mode is returned which is the right choice for a majority of targets.

 -- Target Hook: enum machine_mode TARGET_LIBGCC_SHIFT_COUNT_MODE (void)
     This target hook should return the mode to be used for the shift count operand of shift instructions expanded to libgcc calls.  If not defined word_mode is returned which is the right choice for a majority of targets.

 -- Target Hook: enum machine_mode TARGET_UNWIND_WORD_MODE (void)
     Return machine mode to be used for _Unwind_Word type. The default is to use word_mode.

 -- Macro: ROUND_TOWARDS_ZERO
     If defined, this macro should be true if the prevailing rounding mode is towards zero.

     Defining this macro only affects the way libgcc.a emulates floating-point arithmetic.

     Not defining this macro is equivalent to returning zero.

 -- Macro: LARGEST_EXPONENT_IS_NORMAL (SIZE)
     This macro should return true if floats with SIZE bits do not have a NaN or infinity representation, but use the largest exponent for normal numbers instead.

     Defining this macro only affects the way libgcc.a emulates floating-point arithmetic.

     The default definition of this macro returns false for all sizes.

 -- Target Hook: bool TARGET_MS_BITFIELD_LAYOUT_P (const_tree RECORD_TYPE)
     This target hook returns true if bit-fields in the given RECORD_TYPE are to be laid out following the rules of Microsoft Visual C/C++, namely: (i) a bit-field won't share the same storage unit with the previous bit-field if their underlying types have different sizes, and the bit-field will be aligned to the highest alignment of the underlying types of itself and of the previous bit-field; (ii) a zero-sized bit-field will affect the alignment of the whole enclosing structure, even if it is unnamed; except that (iii) a zero-sized bit-field will be disregarded unless it follows another bit-field of nonzero size.  If this hook returns true, other macros that control bit-field layout are ignored.

     When a bit-field is inserted into a packed record, the whole size of the underlying type is used by one or more same-size adjacent bit-fields (that is, if its long:3, 32 bits is used in the record, and any additional adjacent long bit-fields are packed into the same chunk of 32 bits.  However, if the size changes, a new field of that size is allocated).  In an unpacked record, this is the same as using alignment, but not equivalent when packing.

     If both MS bit-fields and __attribute__((packed)) are used, the latter will take precedence.  If __attribute__((packed)) is used on a single field when MS bit-fields are in use, it will take precedence for that field, but the alignment of the rest of the structure may affect its placement.

 -- Target Hook: bool TARGET_DECIMAL_FLOAT_SUPPORTED_P (void)
     Returns true if the target supports decimal floating point.

 -- Target Hook: bool TARGET_FIXED_POINT_SUPPORTED_P (void)
     Returns true if the target supports fixed-point arithmetic.

 -- Target Hook: void TARGET_EXPAND_TO_RTL_HOOK (void)
     This hook is called just before expansion into rtl, allowing the target to perform additional initializations or analysis before the expansion. For example, the rs6000 port uses it to allocate a scratch stack slot for use in copying SDmode values between memory and floating point registers whenever the function being expanded has any SDmode usage.

 -- Target Hook: void TARGET_INSTANTIATE_DECLS (void)
     This hook allows the backend to perform additional instantiations on rtl that are not actually in any insns yet, but will be later.

 -- Target Hook: const char * TARGET_MANGLE_TYPE (const_tree TYPE)
     If your target defines any fundamental types, or any types your target uses should be mangled differently from the default, define this hook to return the appropriate encoding for these types as part of a C++ mangled name.  The TYPE argument is the tree structure representing the type to be mangled.  The hook may be applied to trees which are not target-specific fundamental types; it should return NULL for all such types, as well as arguments it does not recognize.  If the return value is not NULL, it must point to a statically-allocated string constant.

     Target-specific fundamental types might be new fundamental types or qualified versions of ordinary fundamental types.  Encode new fundamental types as u N NAME, where NAME is the name used for the type in source code, and N is the length of NAME in decimal.  Encode qualified versions of ordinary types as U N NAME CODE, where NAME is the name used for the type qualifier in source code, N is the length of NAME as above, and CODE is the code used to represent the unqualified version of this type.  (See write_builtin_type in cp/mangle.c for the list of codes.)  In both cases the spaces are for clarity; do not include any spaces in your string.

     This hook is applied to types prior to typedef resolution.  If the mangled name for a particular type depends only on that type's main variant, you can perform typedef resolution yourself using TYPE_MAIN_VARIANT before mangling.

     The default version of this hook always returns NULL, which is appropriate for a target that does not define any new fundamental types.

Layout of Source Language Data Types
====================================

These macros define the sizes and other characteristics of the standard basic data types used in programs being compiled.  Unlike the macros in the previous section, these apply to specific features of C and related languages, rather than to fundamental aspects of storage layout.

 -- Macro: INT_TYPE_SIZE
     A C expression for the size in bits of the type int on the target machine.  If you don't define this, the default is one word.

 -- Macro: SHORT_TYPE_SIZE
     A C expression for the size in bits of the type short on the target machine.  If you don't define this, the default is half a word. (If this would be less than one storage unit, it is rounded up to one unit.)

 -- Macro: LONG_TYPE_SIZE
     A C expression for the size in bits of the type long on the target machine.  If you don't define this, the default is one word.

 -- Macro: ADA_LONG_TYPE_SIZE
     On some machines, the size used for the Ada equivalent of the type long by a native Ada compiler differs from that used by C.  In that situation, define this macro to be a C expression to be used for the size of that type.  If you don't define this, the default is the value of LONG_TYPE_SIZE.

 -- Macro: LONG_LONG_TYPE_SIZE
     A C expression for the size in bits of the type long long on the target machine.  If you don't define this, the default is two words.  If you want to support GNU Ada on your machine, the value of this macro must be at least 64.

 -- Macro: CHAR_TYPE_SIZE
     A C expression for the size in bits of the type char on the target machine.  If you don't define this, the default is BITS_PER_UNIT.

 -- Macro: BOOL_TYPE_SIZE
     A C expression for the size in bits of the C++ type bool and C99 type _Bool on the target machine.  If you don't define this, and you probably shouldn't, the default is CHAR_TYPE_SIZE.

 -- Macro: FLOAT_TYPE_SIZE
     A C expression for the size in bits of the type float on the target machine.  If you don't define this, the default is one word.

 -- Macro: DOUBLE_TYPE_SIZE
     A C expression for the size in bits of the type double on the target machine.  If you don't define this, the default is two words.

 -- Macro: LONG_DOUBLE_TYPE_SIZE
     A C expression for the size in bits of the type long double on the target machine.  If you don't define this, the default is two words.

 -- Macro: SHORT_FRACT_TYPE_SIZE
     A C expression for the size in bits of the type short _Fract on the target machine.  If you don't define this, the default is BITS_PER_UNIT.

 -- Macro: FRACT_TYPE_SIZE
     A C expression for the size in bits of the type _Fract on the target machine.  If you don't define this, the default is BITS_PER_UNIT * 2.

 -- Macro: LONG_FRACT_TYPE_SIZE
     A C expression for the size in bits of the type long _Fract on the target machine.  If you don't define this, the default is BITS_PER_UNIT * 4.

 -- Macro: LONG_LONG_FRACT_TYPE_SIZE
     A C expression for the size in bits of the type long long _Fract on the target machine.  If you don't define this, the default is BITS_PER_UNIT * 8.

 -- Macro: SHORT_ACCUM_TYPE_SIZE
     A C expression for the size in bits of the type short _Accum on the target machine.  If you don't define this, the default is BITS_PER_UNIT * 2.

 -- Macro: ACCUM_TYPE_SIZE
     A C expression for the size in bits of the type _Accum on the target machine.  If you don't define this, the default is BITS_PER_UNIT * 4.

 -- Macro: LONG_ACCUM_TYPE_SIZE
     A C expression for the size in bits of the type long _Accum on the target machine.  If you don't define this, the default is BITS_PER_UNIT * 8.

 -- Macro: LONG_LONG_ACCUM_TYPE_SIZE
     A C expression for the size in bits of the type long long _Accum on the target machine.  If you don't define this, the default is BITS_PER_UNIT * 16.

 -- Macro: LIBGCC2_LONG_DOUBLE_TYPE_SIZE
     Define this macro if LONG_DOUBLE_TYPE_SIZE is not constant or if you want routines in libgcc2.a for a size other than LONG_DOUBLE_TYPE_SIZE.  If you don't define this, the default is LONG_DOUBLE_TYPE_SIZE.

 -- Macro: LIBGCC2_HAS_DF_MODE
     Define this macro if neither DOUBLE_TYPE_SIZE nor LIBGCC2_LONG_DOUBLE_TYPE_SIZE is DFmode but you want DFmode routines in libgcc2.a anyway.  If you don't define this and either DOUBLE_TYPE_SIZE or LIBGCC2_LONG_DOUBLE_TYPE_SIZE is 64 then the default is 1, otherwise it is 0.

 -- Macro: LIBGCC2_HAS_XF_MODE
     Define this macro if LIBGCC2_LONG_DOUBLE_TYPE_SIZE is not XFmode but you want XFmode routines in libgcc2.a anyway.  If you don't define this and LIBGCC2_LONG_DOUBLE_TYPE_SIZE is 80 then the default is 1, otherwise it is 0.

 -- Macro: LIBGCC2_HAS_TF_MODE
     Define this macro if LIBGCC2_LONG_DOUBLE_TYPE_SIZE is not TFmode but you want TFmode routines in libgcc2.a anyway.  If you don't define this and LIBGCC2_LONG_DOUBLE_TYPE_SIZE is 128 then the default is 1, otherwise it is 0.

 -- Macro: LIBGCC2_GNU_PREFIX
     This macro corresponds to the TARGET_LIBFUNC_GNU_PREFIX target hook and should be defined if that hook is overriden to be true.  It causes function names in libgcc to be changed to use a __gnu_ prefix for their name rather than the default __.  A port which uses this macro should also arrange to use t-gnu-prefix in the libgcc config.host.

 -- Macro: SF_SIZE
 -- Macro: DF_SIZE
 -- Macro: XF_SIZE
 -- Macro: TF_SIZE
     Define these macros to be the size in bits of the mantissa of SFmode, DFmode, XFmode and TFmode values, if the defaults in libgcc2.h are inappropriate.  By default, FLT_MANT_DIG is used for SF_SIZE, LDBL_MANT_DIG for XF_SIZE and TF_SIZE, and DBL_MANT_DIG or LDBL_MANT_DIG for DF_SIZE according to whether DOUBLE_TYPE_SIZE or LIBGCC2_LONG_DOUBLE_TYPE_SIZE is 64.

 -- Macro: TARGET_FLT_EVAL_METHOD
     A C expression for the value for FLT_EVAL_METHOD in float.h, assuming, if applicable, that the floating-point control word is in its default state.  If you do not define this macro the value of FLT_EVAL_METHOD will be zero.

 -- Macro: WIDEST_HARDWARE_FP_SIZE
     A C expression for the size in bits of the widest floating-point format supported by the hardware.  If you define this macro, you must specify a value less than or equal to the value of LONG_DOUBLE_TYPE_SIZE. If you do not define this macro, the value of LONG_DOUBLE_TYPE_SIZE is the default.

 -- Macro: DEFAULT_SIGNED_CHAR
     An expression whose value is 1 or 0, according to whether the type char should be signed or unsigned by default.  The user can always override this default with the options -fsigned-char and -funsigned-char.

 -- Target Hook: bool TARGET_DEFAULT_SHORT_ENUMS (void)
     This target hook should return true if the compiler should give an enum type only as many bytes as it takes to represent the range of possible values of that type.  It should return false if all enum types should be allocated like int.

     The default is to return false.

 -- Macro: SIZE_TYPE
     A C expression for a string describing the name of the data type to use for size values.  The typedef name size_t is defined using the contents of the string.

     The string can contain more than one keyword.  If so, separate them with spaces, and write first any length keyword, then unsigned if appropriate, and finally int.  The string must exactly match one of the data type names defined in the function c_common_nodes_and_builtins in the file c-family/c-common.c. You may not omit int or change the order---that would cause the compiler to crash on startup.

     If you don't define this macro, the default is "long unsigned int".

 -- Macro: SIZETYPE
     GCC defines internal types (sizetype, ssizetype, bitsizetype and sbitsizetype) for expressions dealing with size.  This macro is a C expression for a string describing the name of the data type from which the precision of sizetype is extracted.

     The string has the same restrictions as SIZE_TYPE string.

     If you don't define this macro, the default is SIZE_TYPE.

 -- Macro: PTRDIFF_TYPE
     A C expression for a string describing the name of the data type to use for the result of subtracting two pointers.  The typedef name ptrdiff_t is defined using the contents of the string.  See SIZE_TYPE above for more information.

     If you don't define this macro, the default is "long int".

 -- Macro: WCHAR_TYPE
     A C expression for a string describing the name of the data type to use for wide characters.  The typedef name wchar_t is defined using the contents of the string.  See SIZE_TYPE above for more information.

     If you don't define this macro, the default is "int".

 -- Macro: WCHAR_TYPE_SIZE
     A C expression for the size in bits of the data type for wide characters.  This is used in cpp, which cannot make use of WCHAR_TYPE.

 -- Macro: WINT_TYPE
     A C expression for a string describing the name of the data type to use for wide characters passed to printf and returned from getwc.  The typedef name wint_t is defined using the contents of the string.  See SIZE_TYPE above for more information.

     If you don't define this macro, the default is "unsigned int".

 -- Macro: INTMAX_TYPE
     A C expression for a string describing the name of the data type that can represent any value of any standard or extended signed integer type. The typedef name intmax_t is defined using the contents of the string.  See SIZE_TYPE above for more information.

     If you don't define this macro, the default is the first of "int", "long int", or "long long int" that has as much precision as long long int.

 -- Macro: UINTMAX_TYPE
     A C expression for a string describing the name of the data type that can represent any value of any standard or extended unsigned integer type.  The typedef name uintmax_t is defined using the contents of the string.  See SIZE_TYPE above for more information.

     If you don't define this macro, the default is the first of "unsigned int", "long unsigned int", or "long long unsigned int" that has as much precision as long long unsigned int.

 -- Macro: SIG_ATOMIC_TYPE
 -- Macro: INT8_TYPE
 -- Macro: INT16_TYPE
 -- Macro: INT32_TYPE
 -- Macro: INT64_TYPE
 -- Macro: UINT8_TYPE
 -- Macro: UINT16_TYPE
 -- Macro: UINT32_TYPE
 -- Macro: UINT64_TYPE
 -- Macro: INT_LEAST8_TYPE
 -- Macro: INT_LEAST16_TYPE
 -- Macro: INT_LEAST32_TYPE
 -- Macro: INT_LEAST64_TYPE
 -- Macro: UINT_LEAST8_TYPE
 -- Macro: UINT_LEAST16_TYPE
 -- Macro: UINT_LEAST32_TYPE
 -- Macro: UINT_LEAST64_TYPE
 -- Macro: INT_FAST8_TYPE
 -- Macro: INT_FAST16_TYPE
 -- Macro: INT_FAST32_TYPE
 -- Macro: INT_FAST64_TYPE
 -- Macro: UINT_FAST8_TYPE
 -- Macro: UINT_FAST16_TYPE
 -- Macro: UINT_FAST32_TYPE
 -- Macro: UINT_FAST64_TYPE
 -- Macro: INTPTR_TYPE
 -- Macro: UINTPTR_TYPE
     C expressions for the standard types sig_atomic_t, int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t, int_least8_t, int_least16_t, int_least32_t, int_least64_t, uint_least8_t, uint_least16_t, uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t, int_fast32_t, int_fast64_t, uint_fast8_t, uint_fast16_t, uint_fast32_t, uint_fast64_t, intptr_t, and uintptr_t.  See SIZE_TYPE above for more information.

     If any of these macros evaluates to a null pointer, the corresponding type is not supported; if GCC is configured to provide <stdint.h> in such a case, the header provided may not conform to C99, depending on the type in question.  The defaults for all of these macros are null pointers.

 -- Macro: TARGET_PTRMEMFUNC_VBIT_LOCATION
     The C++ compiler represents a pointer-to-member-function with a struct that looks like:

            struct {
              union {
                void (*fn)();
                ptrdiff_t vtable_index;
              };
              ptrdiff_t delta;
            };

     The C++ compiler must use one bit to indicate whether the function that will be called through a pointer-to-member-function is virtual. Normally, we assume that the low-order bit of a function pointer must always be zero.  Then, by ensuring that the vtable_index is odd, we can distinguish which variant of the union is in use.  But, on some platforms function pointers can be odd, and so this doesn't work.  In that case, we use the low-order bit of the delta field, and shift the remainder of the delta field to the left.

     GCC will automatically make the right selection about where to store this bit using the FUNCTION_BOUNDARY setting for your platform. However, some platforms such as ARM/Thumb have FUNCTION_BOUNDARY set such that functions always start at even addresses, but the lowest bit of pointers to functions indicate whether the function at that address is in ARM or Thumb mode.  If this is the case of your architecture, you should define this macro to ptrmemfunc_vbit_in_delta.

     In general, you should not have to define this macro.  On architectures in which function addresses are always even, according to FUNCTION_BOUNDARY, GCC will automatically define this macro to ptrmemfunc_vbit_in_pfn.

 -- Macro: TARGET_VTABLE_USES_DESCRIPTORS
     Normally, the C++ compiler uses function pointers in vtables.  This macro allows the target to change to use ``function descriptors'' instead.  Function descriptors are found on targets for whom a function pointer is actually a small data structure.  Normally the data structure consists of the actual code address plus a data pointer to which the function's data is relative.

     If vtables are used, the value of this macro should be the number of words that the function descriptor occupies.

 -- Macro: TARGET_VTABLE_ENTRY_ALIGN
     By default, the vtable entries are void pointers, the so the alignment is the same as pointer alignment.  The value of this macro specifies the alignment of the vtable entry in bits.  It should be defined only when special alignment is necessary. */

 -- Macro: TARGET_VTABLE_DATA_ENTRY_DISTANCE
     There are a few non-descriptor entries in the vtable at offsets below zero.  If these entries must be padded (say, to preserve the alignment specified by TARGET_VTABLE_ENTRY_ALIGN), set this to the number of words in each data entry.

Register Usage
==============

This section explains how to describe what registers the target machine has, and how (in general) they can be used.

The description of which registers a specific instruction can use is done with register classes; see Register Classes.  For information on using registers to access a stack frame, see Frame Registers. For passing values in registers, see Register Arguments. For returning values in registers, see Scalar Return.

Basic Characteristics of Registers
----------------------------------

Registers have various characteristics.

 -- Macro: FIRST_PSEUDO_REGISTER
     Number of hardware registers known to the compiler.  They receive numbers 0 through FIRST_PSEUDO_REGISTER-1; thus, the first pseudo register's number really is assigned the number FIRST_PSEUDO_REGISTER.

 -- Macro: FIXED_REGISTERS
     An initializer that says which registers are used for fixed purposes all throughout the compiled code and are therefore not available for general allocation.  These would include the stack pointer, the frame pointer (except on machines where that can be used as a general register when no frame pointer is needed), the program counter on machines where that is considered one of the addressable registers, and any other numbered register with a standard use.

     This information is expressed as a sequence of numbers, separated by commas and surrounded by braces.  The Nth number is 1 if register N is fixed, 0 otherwise.

     The table initialized from this macro, and the table initialized by the following one, may be overridden at run time either automatically, by the actions of the macro CONDITIONAL_REGISTER_USAGE, or by the user with the command options -ffixed-REG, -fcall-used-REG and -fcall-saved-REG.

 -- Macro: CALL_USED_REGISTERS
     Like FIXED_REGISTERS but has 1 for each register that is clobbered (in general) by function calls as well as for fixed registers.  This macro therefore identifies the registers that are not available for general allocation of values that must live across function calls.

     If a register has 0 in CALL_USED_REGISTERS, the compiler automatically saves it on function entry and restores it on function exit, if the register is used within the function.

 -- Macro: CALL_REALLY_USED_REGISTERS
     Like CALL_USED_REGISTERS except this macro doesn't require that the entire set of FIXED_REGISTERS be included. (CALL_USED_REGISTERS must be a superset of FIXED_REGISTERS). This macro is optional.  If not specified, it defaults to the value of CALL_USED_REGISTERS.

 -- Macro: HARD_REGNO_CALL_PART_CLOBBERED (REGNO, MODE)
     A C expression that is nonzero if it is not permissible to store a value of mode MODE in hard register number 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.

 -- Target Hook: void TARGET_CONDITIONAL_REGISTER_USAGE (void)
     This hook may conditionally modify five variables fixed_regs, call_used_regs, global_regs, reg_names, and reg_class_contents, to take into account any dependence of these register sets on target flags.  The first three of these are of type char [] (interpreted as Boolean vectors). global_regs is a const char *[], and reg_class_contents is a HARD_REG_SET.  Before the macro is called, fixed_regs, call_used_regs, reg_class_contents, and reg_names have been initialized from FIXED_REGISTERS, CALL_USED_REGISTERS, REG_CLASS_CONTENTS, and REGISTER_NAMES, respectively. global_regs has been cleared, and any -ffixed-REG, -fcall-used-REG and -fcall-saved-REG command options have been applied.

     If the usage of an entire class of registers depends on the target flags, you may indicate this to GCC by using this macro to modify fixed_regs and call_used_regs to 1 for each of the registers in the classes which should not be used by GCC.  Also define the macro REG_CLASS_FROM_LETTER / REG_CLASS_FROM_CONSTRAINT to return NO_REGS if it is called with a letter for a class that shouldn't be used.

     (However, if this class is not included in GENERAL_REGS and all of the insn patterns whose constraints permit this class are controlled by target switches, then GCC will automatically avoid using these registers when the target switches are opposed to them.)

 -- Macro: INCOMING_REGNO (OUT)
     Define this macro if the target machine has register windows.  This C expression returns the register number as seen by the called function corresponding to the register number OUT as seen by the calling function.  Return OUT if register number OUT is not an outbound register.

 -- Macro: OUTGOING_REGNO (IN)
     Define this macro if the target machine has register windows.  This C expression returns the register number as seen by the calling function corresponding to the register number IN as seen by the called function.  Return IN if register number IN is not an inbound register.

 -- Macro: LOCAL_REGNO (REGNO)
     Define this macro if the target machine has register windows.  This C expression returns true if the register is call-saved but is in the register window.  Unlike most call-saved registers, such registers need not be explicitly restored on function exit or during non-local gotos.

 -- Macro: PC_REGNUM
     If the program counter has a register number, define this as that register number.  Otherwise, do not define it.

Order of Allocation of Registers
--------------------------------

Registers are allocated in order.

 -- Macro: REG_ALLOC_ORDER
     If defined, an initializer for a vector of integers, containing the 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 (all else being equal).

     One use of this macro is on machines where the highest numbered registers must always be saved and the save-multiple-registers instruction supports only sequences of consecutive registers.  On such machines, define REG_ALLOC_ORDER to be an initializer that lists the highest numbered allocable register first.

 -- Macro: ADJUST_REG_ALLOC_ORDER
     A C statement (sans semicolon) to choose the order in which to allocate hard registers for pseudo-registers local to a basic block.

     Store the desired register order in the array reg_alloc_order. Element 0 should be the register to allocate first; element 1, the next register; and so on.

     The macro body should not assume anything about the contents of reg_alloc_order before execution of the macro.

     On most machines, it is not necessary to define this macro.

 -- Macro: HONOR_REG_ALLOC_ORDER
     Normally, IRA tries to estimate the costs for saving a register in the prologue and restoring it in the epilogue.  This discourages it from using call-saved registers.  If a machine wants to ensure that IRA allocates registers in the order given by REG_ALLOC_ORDER even if some call-saved registers appear earlier than call-used ones, this macro should be defined.

 -- Macro: IRA_HARD_REGNO_ADD_COST_MULTIPLIER (REGNO)
     In some case register allocation order is not enough for the Integrated Register Allocator (IRA) to generate a good code. If this macro is defined, it should return a floating point value based on REGNO.  The cost of using REGNO for a pseudo will be increased by approximately the pseudo's usage frequency times the value returned by this macro.  Not defining this macro is equivalent to having it always return 0.0.

     On most machines, it is not necessary to define this macro.

How Values Fit in Registers
---------------------------

This section discusses the macros that describe which kinds of values (specifically, which machine modes) each register can hold, and how many consecutive registers are needed for a given mode.

 -- Macro: HARD_REGNO_NREGS (REGNO, MODE)
     A C expression for the number of consecutive hard registers, starting at register number REGNO, required to hold a value of mode 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

          #define HARD_REGNO_NREGS(REGNO, MODE)            \
             ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1)  \
              / UNITS_PER_WORD)

 -- Macro: HARD_REGNO_NREGS_HAS_PADDING (REGNO, MODE)
     A C expression that is nonzero if a value of mode MODE, stored in memory, ends with padding that causes it to take up more space than in registers starting at register number REGNO (as determined by multiplying GCC's notion of the size of the register when containing this mode by the number of registers returned by HARD_REGNO_NREGS).  By default this is zero.

     For example, if a floating-point value is stored in three 32-bit registers but takes up 128 bits in memory, then this would be nonzero.

     This macros only needs to be defined if there are cases where subreg_get_info would otherwise wrongly determine that a subreg can be represented by an offset to the register number, when in fact such a subreg would contain some of the padding not stored in registers and so not be representable.

 -- Macro: HARD_REGNO_NREGS_WITH_PADDING (REGNO, MODE)
     For values of REGNO and MODE for which HARD_REGNO_NREGS_HAS_PADDING returns nonzero, a C expression returning the greater number of registers required to hold the value including any padding.  In the example above, the value would be four.

 -- Macro: REGMODE_NATURAL_SIZE (MODE)
     Define this macro if the natural size of registers that hold values of mode MODE is not the word size.  It is a C expression that should give the natural size in bytes for the specified mode.  It is used by the register allocator to try to optimize its results.  This happens for example on SPARC 64-bit where the natural size of floating-point registers is still 32-bit.

 -- Macro: HARD_REGNO_MODE_OK (REGNO, MODE)
     A C expression that is nonzero if it is permissible to store a value of mode MODE in hard register number REGNO (or in several registers starting with that one).  For a machine where all registers are equivalent, a suitable definition is

          #define HARD_REGNO_MODE_OK(REGNO, MODE) 1

     You need not include code to check for the numbers of fixed registers, because the allocation mechanism considers them to be always occupied.

     On some machines, double-precision values must be kept in even/odd register pairs.  You can implement that by defining this macro to reject odd register numbers for such modes.

     The minimum requirement for a mode to be OK in a register is that the movMODE instruction pattern support moves between the register and other hard register in the same class and that moving a value into the register and back out not alter it.

     Since the same instruction used to move word_mode will work for all narrower integer modes, it is not necessary on any machine for HARD_REGNO_MODE_OK to distinguish between these modes, provided you define patterns movhi, etc., to take advantage of this.  This is useful because of the interaction between HARD_REGNO_MODE_OK and MODES_TIEABLE_P; it is very desirable for all integer modes to be tieable.

     Many machines have special registers for floating point arithmetic. Often people assume that floating point machine modes are allowed only in floating point registers.  This is not true.  Any registers that can hold integers can safely hold a floating point machine mode, whether or not floating arithmetic can be done on it in those registers.  Integer move instructions can be used to move the values.

     On some machines, though, the converse is true: fixed-point machine modes may not go in floating registers.  This is true if the floating registers normalize any value stored in them, because storing a non-floating value there would garble it.  In this case, HARD_REGNO_MODE_OK should reject fixed-point machine modes in floating registers.  But if the floating registers do not automatically normalize, if you can store any bit pattern in one and retrieve it unchanged without a trap, then any machine mode may go in a floating register, so you can define this macro to say so.

     The primary significance of special floating registers is rather that they are the registers acceptable in floating point arithmetic instructions.  However, this is of no concern to HARD_REGNO_MODE_OK.  You handle it by writing the proper constraints for those instructions.

     On some machines, the floating registers are especially slow to access, so that it is better to store a value in a stack frame than in such a register if floating point arithmetic is not being done.  As long as the floating registers are not in class GENERAL_REGS, they will not be used unless some pattern's constraint asks for one.

 -- Macro: HARD_REGNO_RENAME_OK (FROM, TO)
     A C expression that is nonzero if it is OK to rename a hard register FROM to another hard register TO.

     One common use of this macro is to prevent renaming of a register to another register that is not saved by a prologue in an interrupt handler.

     The default is always nonzero.

 -- Macro: MODES_TIEABLE_P (MODE1, MODE2)
     A C expression that is nonzero if a value of mode MODE1 is accessible in mode MODE2 without copying.

     If HARD_REGNO_MODE_OK (R, MODE1) and HARD_REGNO_MODE_OK (R, MODE2) are always the same for any R, then MODES_TIEABLE_P (MODE1, MODE2) should be nonzero.  If they differ for any R, you should define this macro to return zero unless some other mechanism ensures the 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 GCC to perform better register allocation.

 -- Target Hook: bool TARGET_HARD_REGNO_SCRATCH_OK (unsigned int REGNO)
     This target hook should return true if it is OK to use a hard register REGNO as scratch reg in peephole2.

     One common use of this macro is to prevent using of a register that is not saved by a prologue in an interrupt handler.

     The default version of this hook always returns true.

 -- Macro: AVOID_CCMODE_COPIES
     Define this macro if the compiler should avoid copies to/from CCmode registers.  You should only define this macro if support for copying to/from CCmode is incomplete.

Handling Leaf Functions
-----------------------

On some machines, a leaf function (i.e., one which makes no calls) can run more efficiently if it does not make its own register window.  Often this means it is required to receive its arguments in the registers where they are passed by the caller, instead of the registers where they would normally arrive.

The special treatment for leaf functions generally applies only when other conditions are met; for example, often they may use only those registers for its own variables and temporaries.  We use the term ``leaf function'' to mean a function that is suitable for this special handling, so that functions with no calls are not necessarily ``leaf functions''.

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.

 -- Macro: LEAF_REGISTERS
     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 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.

     Define this macro only if the target machine offers a way to optimize the treatment of leaf functions.

 -- Macro: LEAF_REG_REMAP (REGNO)
     A C expression whose value is the register number to which REGNO should be renumbered, when a function is treated as a leaf function.

     If REGNO is a register number which should not appear in a leaf function before renumbering, then the expression should yield -1, which will cause the compiler to abort.

     Define this macro only if the target machine offers a way to optimize the treatment of leaf functions, and registers need to be renumbered to do this.

TARGET_ASM_FUNCTION_PROLOGUE and TARGET_ASM_FUNCTION_EPILOGUE must usually treat leaf functions specially.  They can test the C variable current_function_is_leaf which is nonzero for leaf functions.  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 current_function_uses_only_leaf_regs which is nonzero for leaf functions which only use leaf registers. current_function_uses_only_leaf_regs is valid after all passes that modify the instructions have been run and is only useful if LEAF_REGISTERS is defined.

Registers That Form a Stack
---------------------------

There are special features to handle computers where some of the ``registers'' form a stack.  Stack registers are normally written by pushing onto the stack, and are numbered relative to the top of the stack.

Currently, GCC can only handle one group of stack-like registers, and they must be consecutively numbered.  Furthermore, the existing support for stack-like registers is specific to the 80387 floating point coprocessor.  If you have a new architecture that uses stack-like registers, you will need to do substantial work on reg-stack.c and write your machine description to cooperate with it, as well as defining these macros.

 -- Macro: STACK_REGS
     Define this if the machine has any stack-like registers.

 -- Macro: STACK_REG_COVER_CLASS
     This is a cover class containing the stack registers.  Define this if the machine has any stack-like registers.

 -- Macro: FIRST_STACK_REG
     The number of the first stack-like register.  This one is the top of the stack.

 -- Macro: LAST_STACK_REG
     The number of the last stack-like register.  This one is the bottom of the stack.

Register Classes
================

On many machines, the numbered registers are not all equivalent. For example, certain registers may not be allowed for indexed addressing; certain registers may not be allowed in some instructions.  These machine restrictions are described to the compiler using register classes.

You define a number of register classes, giving each one a name and saying which of the registers belong to it.  Then you can specify register classes that are allowed as operands to particular instruction patterns.

In general, each register will belong to several classes.  In fact, one class must be named ALL_REGS and contain all the registers.  Another class must be named NO_REGS and contain no registers.  Often the union of two classes will be another class; however, this is not required.

One of the classes must be named GENERAL_REGS.  There is nothing terribly special about the name, but the operand constraint letters r and g specify this class.  If GENERAL_REGS is the same as ALL_REGS, just define it as a macro which expands to ALL_REGS.

Order the classes so that if class X is contained in class Y then X has a lower class number than Y.

The way classes other than GENERAL_REGS are specified in operand constraints is through machine-dependent operand constraint letters. You can define such letters to correspond to various classes, then use them in operand constraints.

You must define the narrowest register classes for allocatable registers, so that each class either has no subclasses, or that for some mode, the move cost between registers within the class is cheaper than moving a register in the class to or from memory (see Costs).

You should define a class for the union of two classes whenever some instruction allows both classes.  For example, if an instruction allows either a floating point (coprocessor) register or a general register for a certain operand, you should define a class FLOAT_OR_GENERAL_REGS which includes both of them.  Otherwise you will get suboptimal code, or even internal compiler errors when reload cannot find a register in the class computed via reg_class_subunion.

You must also specify certain redundant information about the register classes: for each class, which classes contain it and which ones are contained in it; for each pair of classes, the largest class contained in their union.

When a value occupying several consecutive registers is expected in a certain class, all the registers used must belong to that class. Therefore, register classes cannot be used to enforce a requirement for a register pair to start with an even-numbered register.  The way to specify this requirement is with HARD_REGNO_MODE_OK.

Register classes used for input-operands of bitwise-and or shift instructions have a special requirement: each such class must have, for each fixed-point machine mode, a subclass whose registers can transfer that mode to or from memory.  For example, on some machines, the operations for single-byte values (QImode) are limited to certain registers.  When this is so, each register class that is used in a bitwise-and or shift instruction must have a subclass consisting of registers from which single-byte values can be loaded or stored.  This is so that PREFERRED_RELOAD_CLASS can always have a possible value to return.

 -- Data type: enum reg_class
     An enumerated type that must be defined with all the register class names as enumerated values.  NO_REGS must be first.  ALL_REGS must be the last register class, followed by one more enumerated value, LIM_REG_CLASSES, which is not a register class but rather tells how many classes there are.

     Each register class has a number, which is the value of casting the class name to type int.  The number serves as an index in many of the tables described below.

 -- Macro: N_REG_CLASSES
     The number of distinct register classes, defined as follows:

          #define N_REG_CLASSES (int) LIM_REG_CLASSES

 -- Macro: REG_CLASS_NAMES
     An initializer containing the names of the register classes as C string constants.  These names are used in writing some of the debugging dumps.

 -- Macro: REG_CLASS_CONTENTS
     An initializer containing the contents of the register classes, as integers which are bit masks.  The Nth integer specifies the contents of class N.  The way the integer MASK is interpreted is that register R is in the class if MASK & (1 << R) is 1.

     When the machine has more than 32 registers, an integer does not suffice. Then the integers are replaced by sub-initializers, braced groupings containing several integers.  Each sub-initializer must be suitable as an initializer for the type HARD_REG_SET which is defined in hard-reg-set.h. In this situation, the first integer in each sub-initializer corresponds to registers 0 through 31, the second integer to registers 32 through 63, and so on.

 -- Macro: REGNO_REG_CLASS (REGNO)
     A C expression whose value is a register class containing hard register REGNO.  In general there is more than one such class; choose a class which is minimal, meaning that no smaller class also contains the register.

 -- Macro: BASE_REG_CLASS
     A macro whose definition is the name of the class to which a valid base register must belong.  A base register is one used in an address which is the register value plus a displacement.

 -- Macro: MODE_BASE_REG_CLASS (MODE)
     This is a variation of the BASE_REG_CLASS macro which allows the selection of a base register in a mode dependent manner.  If MODE is VOIDmode then it should return the same value as BASE_REG_CLASS.

 -- Macro: MODE_BASE_REG_REG_CLASS (MODE)
     A C expression whose value is the register class to which a valid base register must belong in order to be used in a base plus index register address.  You should define this macro if base plus index addresses have different requirements than other base register uses.

 -- Macro: MODE_CODE_BASE_REG_CLASS (MODE, ADDRESS_SPACE, OUTER_CODE, INDEX_CODE)
     A C expression whose value is the register class to which a valid base register for a memory reference in mode MODE to address space ADDRESS_SPACE must belong.  OUTER_CODE and INDEX_CODE define the context in which the base register occurs.  OUTER_CODE is the code of the immediately enclosing expression (MEM for the top level of an address, ADDRESS for something that occurs in an address_operand).  INDEX_CODE is the code of the corresponding index expression if OUTER_CODE is PLUS; SCRATCH otherwise.

 -- Macro: INDEX_REG_CLASS
     A macro whose definition is the name of the class to which a valid index register must belong.  An index register is one used in an address where its value is either multiplied by a scale factor or added to another register (as well as added to a displacement).

 -- Macro: REGNO_OK_FOR_BASE_P (NUM)
     A C expression which is nonzero if register number NUM is suitable for use as a base register in operand addresses.

 -- Macro: REGNO_MODE_OK_FOR_BASE_P (NUM, MODE)
     A C expression that is just like REGNO_OK_FOR_BASE_P, except that that expression may examine the mode of the memory reference in MODE.  You should define this macro if the mode of the memory reference affects whether a register may be used as a base register.  If you define this macro, the compiler will use it instead of REGNO_OK_FOR_BASE_P.  The mode may be VOIDmode for addresses that appear outside a MEM, i.e., as an address_operand.

 -- Macro: REGNO_MODE_OK_FOR_REG_BASE_P (NUM, MODE)
     A C expression which is nonzero if register number NUM is suitable for use as a base register in base plus index operand addresses, accessing memory in mode MODE.  It may be either a suitable hard register or a pseudo register that has been allocated such a hard register.  You should define this macro if base plus index addresses have different requirements than other base register uses.

     Use of this macro is deprecated; please use the more general REGNO_MODE_CODE_OK_FOR_BASE_P.

 -- Macro: REGNO_MODE_CODE_OK_FOR_BASE_P (NUM, MODE, ADDRESS_SPACE, OUTER_CODE, INDEX_CODE)
     A C expression which is nonzero if register number NUM is suitable for use as a base register in operand addresses, accessing memory in mode MODE in address space ADDRESS_SPACE. This is similar to REGNO_MODE_OK_FOR_BASE_P, except that that expression may examine the context in which the register appears in the memory reference.  OUTER_CODE is the code of the immediately enclosing expression (MEM if at the top level of the address, ADDRESS for something that occurs in an address_operand).  INDEX_CODE is the code of the corresponding index expression if OUTER_CODE is PLUS; SCRATCH otherwise.  The mode may be VOIDmode for addresses that appear outside a MEM, i.e., as an address_operand.

 -- Macro: REGNO_OK_FOR_INDEX_P (NUM)
     A C expression which is nonzero if register number NUM is suitable for use as an index register in operand addresses.  It may be either a suitable hard register or a pseudo register that has been allocated such a hard register.

     The difference between an index register and a base register is that the index register may be scaled.  If an address involves the sum of two registers, neither one of them scaled, then either one may be labeled the ``base'' and the other the ``index''; but whichever labeling is used must fit the machine's constraints of which registers may serve in each capacity.  The compiler will try both labelings, looking for one that is valid, and will reload one or both registers only if neither labeling works.

 -- Target Hook: reg_class_t TARGET_PREFERRED_RENAME_CLASS (reg_class_t RCLASS)
     A target hook that places additional preference on the register class to use when it is necessary to rename a register in class RCLASS to another class, or perhaps NO_REGS, if no preferred register class is found or hook preferred_rename_class is not implemented. Sometimes returning a more restrictive class makes better code.  For example, on ARM, thumb-2 instructions using LO_REGS may be smaller than instructions using GENERIC_REGS.  By returning LO_REGS from preferred_rename_class, code size can be reduced.

 -- Target Hook: reg_class_t TARGET_PREFERRED_RELOAD_CLASS (rtx X, reg_class_t RCLASS)
     A target hook that places additional restrictions on the register class to use when it is necessary to copy value X into a register in class RCLASS.  The value is a register class; perhaps RCLASS, or perhaps another, smaller class.

     The default version of this hook always returns value of rclass argument.

     Sometimes returning a more restrictive class makes better code.  For example, on the 68000, when X is an integer constant that is in range for a moveq instruction, the value of this macro is always DATA_REGS as long as RCLASS includes the data registers. Requiring a data register guarantees that a moveq will be used.

     One case where TARGET_PREFERRED_RELOAD_CLASS must not return RCLASS is if X is a legitimate constant which cannot be loaded into some register class.  By returning NO_REGS you can force X into a memory location.  For example, rs6000 can load immediate values into general-purpose registers, but does not have an instruction for loading an immediate value into a floating-point register, so TARGET_PREFERRED_RELOAD_CLASS returns NO_REGS when X is a floating-point constant.  If the constant can't be loaded into any kind of register, code generation will be better if TARGET_LEGITIMATE_CONSTANT_P makes the constant illegitimate instead of using TARGET_PREFERRED_RELOAD_CLASS.

     If an insn has pseudos in it after register allocation, reload will go through the alternatives and call repeatedly TARGET_PREFERRED_RELOAD_CLASS to find the best one.  Returning NO_REGS, in this case, makes reload add a ! in front of the constraint: the x86 back-end uses this feature to discourage usage of 387 registers when math is done in the SSE registers (and vice versa).

 -- Macro: PREFERRED_RELOAD_CLASS (X, CLASS)
     A C expression that places additional restrictions on the register class to use when it is necessary to copy value X into a register in class CLASS.  The value is a register class; perhaps CLASS, or perhaps another, smaller class.  On many machines, the following definition is safe:

          #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS

     Sometimes returning a more restrictive class makes better code.  For example, on the 68000, when X is an integer constant that is in range for a moveq instruction, the value of this macro is always DATA_REGS as long as CLASS includes the data registers. Requiring a data register guarantees that a moveq will be used.

     One case where PREFERRED_RELOAD_CLASS must not return CLASS is if X is a legitimate constant which cannot be loaded into some register class.  By returning NO_REGS you can force X into a memory location.  For example, rs6000 can load immediate values into general-purpose registers, but does not have an instruction for loading an immediate value into a floating-point register, so PREFERRED_RELOAD_CLASS returns NO_REGS when X is a floating-point constant.  If the constant can't be loaded into any kind of register, code generation will be better if TARGET_LEGITIMATE_CONSTANT_P makes the constant illegitimate instead of using TARGET_PREFERRED_RELOAD_CLASS.

     If an insn has pseudos in it after register allocation, reload will go through the alternatives and call repeatedly PREFERRED_RELOAD_CLASS to find the best one.  Returning NO_REGS, in this case, makes reload add a ! in front of the constraint: the x86 back-end uses this feature to discourage usage of 387 registers when math is done in the SSE registers (and vice versa).

 -- Target Hook: reg_class_t TARGET_PREFERRED_OUTPUT_RELOAD_CLASS (rtx X, reg_class_t RCLASS)
     Like TARGET_PREFERRED_RELOAD_CLASS, but for output reloads instead of input reloads.

     The default version of this hook always returns value of rclass argument.

     You can also use TARGET_PREFERRED_OUTPUT_RELOAD_CLASS to discourage reload from using some alternatives, like TARGET_PREFERRED_RELOAD_CLASS.

 -- Macro: LIMIT_RELOAD_CLASS (MODE, CLASS)
     A C expression that places additional restrictions on the register class to use when it is necessary to be able to hold a value of mode MODE in a reload register for which class CLASS would ordinarily be used.

     Unlike PREFERRED_RELOAD_CLASS, this macro should be used when there are certain modes that simply can't go in certain reload classes.

     The value is a register class; perhaps CLASS, or perhaps another, smaller class.

     Don't define this macro unless the target machine has limitations which require the macro to do something nontrivial.

 -- Target Hook: reg_class_t TARGET_SECONDARY_RELOAD (bool IN_P, rtx X, reg_class_t RELOAD_CLASS, enum machine_mode RELOAD_MODE, secondary_reload_info *SRI)
     Many machines have some registers that cannot be copied directly to or from memory or even from other types of registers.  An example is the MQ register, which on most machines, can only be copied to or from general registers, but not memory.  Below, we shall be using the term 'intermediate register' when a move operation cannot be performed directly, but has to be done by copying the source into the intermediate register first, and then copying the intermediate register to the destination.  An intermediate register always has the same mode as source and destination.  Since it holds the actual value being copied, reload might apply optimizations to re-use an intermediate register and eliding the copy from the source when it can determine that the intermediate register still holds the required value.

     Another kind of secondary reload is required on some machines which allow copying all registers to and from memory, but require a scratch register for stores to some memory locations (e.g., those with symbolic address on the RT, and those with certain symbolic address on the SPARC when compiling PIC).  Scratch registers need not have the same mode as the value being copied, and usually hold a different value than that being copied.  Special patterns in the md file are needed to describe how the copy is performed with the help of the scratch register; these patterns also describe the number, register class(es) and mode(s) of the scratch register(s).

     In some cases, both an intermediate and a scratch register are required.

     For input reloads, this target hook is called with nonzero IN_P, and X is an rtx that needs to be copied to a register of class RELOAD_CLASS in RELOAD_MODE.  For output reloads, this target hook is called with zero IN_P, and a register of class RELOAD_CLASS needs to be copied to rtx X in RELOAD_MODE.

     If copying a register of RELOAD_CLASS from/to X requires an intermediate register, the hook secondary_reload should return the register class required for this intermediate register. If no intermediate register is required, it should return NO_REGS. If more than one intermediate register is required, describe the one that is closest in the copy chain to the reload register.

     If scratch registers are needed, you also have to describe how to perform the copy from/to the reload register to/from this closest intermediate register.  Or if no intermediate register is required, but still a scratch register is needed, describe the copy  from/to the reload register to/from the reload operand X.

     You do this by setting sri->icode to the instruction code of a pattern in the md file which performs the move.  Operands 0 and 1 are the output and input of this copy, respectively.  Operands from operand 2 onward are for scratch operands.  These scratch operands must have a mode, and a single-register-class output constraint.

     When an intermediate register is used, the secondary_reload hook will be called again to determine how to copy the intermediate register to/from the reload operand X, so your hook must also have code to handle the register class of the intermediate operand.

     X might be a pseudo-register or a subreg of a pseudo-register, which could either be in a hard register or in memory. Use true_regnum to find out; it will return -1 if the pseudo is in memory and the hard register number if it is in a register.

     Scratch operands in memory (constraint "=m" / "=&m") are currently not supported.  For the time being, you will have to continue to use SECONDARY_MEMORY_NEEDED for that purpose.

     copy_cost also uses this target hook to find out how values are copied.  If you want it to include some extra cost for the need to allocate (a) scratch register(s), set sri->extra_cost to the additional cost. Or if two dependent moves are supposed to have a lower cost than the sum of the individual moves due to expected fortuitous scheduling and/or special forwarding logic, you can set sri->extra_cost to a negative amount.

 -- Macro: SECONDARY_RELOAD_CLASS (CLASS, MODE, X)
 -- Macro: SECONDARY_INPUT_RELOAD_CLASS (CLASS, MODE, X)
 -- Macro: SECONDARY_OUTPUT_RELOAD_CLASS (CLASS, MODE, X)
     These macros are obsolete, new ports should use the target hook TARGET_SECONDARY_RELOAD instead.

     These are obsolete macros, replaced by the TARGET_SECONDARY_RELOAD target hook.  Older ports still define these macros to indicate to the reload phase that it may need to allocate at least one register for a reload in addition to the register to contain the data.  Specifically, if copying X to a register CLASS in MODE requires an intermediate register, you were supposed to define SECONDARY_INPUT_RELOAD_CLASS to return the largest register class all of whose registers can be used as intermediate registers or scratch registers.

     If copying a register CLASS in MODE to X requires an intermediate or scratch register, SECONDARY_OUTPUT_RELOAD_CLASS was supposed to be defined be defined to return the largest register class required.  If the requirements for input and output reloads were the same, the macro SECONDARY_RELOAD_CLASS should have been used instead of defining both macros identically.

     The values returned by these macros are often GENERAL_REGS. Return NO_REGS if no spare register is needed; i.e., if X can be directly copied to or from a register of CLASS in MODE without requiring a scratch register.  Do not define this macro if it would always return NO_REGS.

     If a scratch register is required (either with or without an intermediate register), you were supposed to define patterns for reload_inM or reload_outM, as required (see Standard Names.  These patterns, which were normally implemented with a define_expand, should be similar to the movM patterns, except that operand 2 is the scratch register.

     These patterns need constraints for the reload register and scratch register that contain a single register class.  If the original reload register (whose class is CLASS) can meet the constraint given in the pattern, the value returned by these macros is used for the class of the scratch register.  Otherwise, two additional reload registers are required. Their classes are obtained from the constraints in the insn pattern.

     X might be a pseudo-register or a subreg of a pseudo-register, which could either be in a hard register or in memory. Use true_regnum to find out; it will return -1 if the pseudo is in memory and the hard register number if it is in a register.

     These macros should not be used in the case where a particular class of registers can only be copied to memory and not to another class of registers.  In that case, secondary reload registers are not needed and would not be helpful.  Instead, a stack location must be used to perform the copy and the movM pattern should use memory as an intermediate storage.  This case often occurs between floating-point and general registers.

 -- Macro: SECONDARY_MEMORY_NEEDED (CLASS1, CLASS2, M)
     Certain machines have the property that some registers cannot be copied to some other registers without using memory.  Define this macro on those machines to be a C expression that is nonzero if objects of mode M in registers of CLASS1 can only be copied to registers of class CLASS2 by storing a register of CLASS1 into memory and loading that memory location into a register of CLASS2.

     Do not define this macro if its value would always be zero.

 -- Macro: SECONDARY_MEMORY_NEEDED_RTX (MODE)
     Normally when SECONDARY_MEMORY_NEEDED is defined, the compiler allocates a stack slot for a memory location needed for register copies. If this macro is defined, the compiler instead uses the memory location defined by this macro.

     Do not define this macro if you do not define SECONDARY_MEMORY_NEEDED.

 -- Macro: SECONDARY_MEMORY_NEEDED_MODE (MODE)
     When the compiler needs a secondary memory location to copy between two registers of mode MODE, it normally allocates sufficient memory to hold a quantity of BITS_PER_WORD bits and performs the store and load operations in a mode that many bits wide and whose class is the same as that of MODE.

     This is right thing to do on most machines because it ensures that all bits of the register are copied and prevents accesses to the registers in a narrower mode, which some machines prohibit for floating-point registers.

     However, this default behavior is not correct on some machines, such as the DEC Alpha, that store short integers in floating-point registers differently than in integer registers.  On those machines, the default widening will not work correctly and you must define this macro to suppress that widening in some cases.  See the file alpha.h for details.

     Do not define this macro if you do not define SECONDARY_MEMORY_NEEDED or if widening MODE to a mode that is BITS_PER_WORD bits wide is correct for your machine.

 -- Target Hook: bool TARGET_CLASS_LIKELY_SPILLED_P (reg_class_t RCLASS)
     A target hook which returns true if pseudos that have been assigned to registers of class RCLASS would likely be spilled because registers of RCLASS are needed for spill registers.

     The default version of this target hook returns true if RCLASS has exactly one register and false otherwise.  On most machines, this default should be used.  For generally register-starved machines, such as i386, or machines with right register constraints, such as SH, this hook can be used to avoid excessive spilling.

     This hook is also used by some of the global intra-procedural code transformations to throtle code motion, to avoid increasing register pressure.

 -- Target Hook: unsigned char TARGET_CLASS_MAX_NREGS (reg_class_t RCLASS, enum machine_mode MODE)
     A target hook returns the maximum number of consecutive registers of class RCLASS needed to hold a value of mode MODE.

     This is closely related to the macro HARD_REGNO_NREGS.  In fact, the value returned by TARGET_CLASS_MAX_NREGS (RCLASS, MODE) target hook should be the maximum value of HARD_REGNO_NREGS (REGNO, MODE) for all REGNO values in the class RCLASS.

     This target hook helps control the handling of multiple-word values in the reload pass.

     The default version of this target hook returns the size of MODE in words.

 -- Macro: CLASS_MAX_NREGS (CLASS, MODE)
     A C expression for the maximum number of consecutive registers of class CLASS needed to hold a value of mode MODE.

     This is closely related to the macro HARD_REGNO_NREGS.  In fact, the value of the macro CLASS_MAX_NREGS (CLASS, MODE) should be the maximum value of HARD_REGNO_NREGS (REGNO, MODE) for all REGNO values in the class CLASS.

     This macro helps control the handling of multiple-word values in the reload pass.

 -- Macro: CANNOT_CHANGE_MODE_CLASS (FROM, TO, CLASS)
     If defined, a C expression that returns nonzero for a CLASS for which a change from mode FROM to mode TO is invalid.

     For the example, loading 32-bit integer or floating-point objects into floating-point registers on the Alpha extends them to 64 bits. Therefore loading a 64-bit object and then storing it as a 32-bit object does not store the low-order 32 bits, as would be the case for a normal register.  Therefore, alpha.h defines CANNOT_CHANGE_MODE_CLASS as below:

          #define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \
            (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \
             ? reg_classes_intersect_p (FLOAT_REGS, (CLASS)) : 0)

 -- Target Hook: bool TARGET_LRA_P (void)
     A target hook which returns true if we use LRA instead of reload pass.  It means that LRA was ported to the target.    The default version of this target hook returns always false.

 -- Target Hook: int TARGET_REGISTER_PRIORITY (int)
     A target hook which returns the register priority number to which the  register HARD_REGNO belongs to.  The bigger the number, the  more preferable the hard register usage (when all other conditions are  the same).  This hook can be used to prefer some hard register over  others in LRA.  For example, some x86-64 register usage needs  additional prefix which makes instructions longer.  The hook can  return lower priority number for such registers make them less favorable  and as result making the generated code smaller.    The default version of this target hook returns always zero.

 -- Target Hook: bool TARGET_DIFFERENT_ADDR_DISPLACEMENT_P (void)
     A target hook which returns true if an address with the same structure  can have different maximal legitimate displacement.  For example, the  displacement can depend on memory mode or on operand combinations in  the insn.    The default version of this target hook returns always false.

 -- Target Hook: reg_class_t TARGET_SPILL_CLASS (reg_class_t, enum MACHINE_MODE)
     This hook defines a class of registers which could be used for spilling  pseudos of the given mode and class, or NO_REGS if only memory  should be used.  Not defining this hook is equivalent to returning  NO_REGS for all inputs.

Obsolete Macros for Defining Constraints
========================================

Machine-specific constraints can be defined with these macros instead of the machine description constructs described in Define Constraints.  This mechanism is obsolete.  New ports should not use it; old ports should convert to the new mechanism.

 -- Macro: CONSTRAINT_LEN (CHAR, STR)
     For the constraint at the start of STR, which starts with the letter C, return the length.  This allows you to have register class / constant / extra constraints that are longer than a single letter; you don't need to define this macro if you can do with single-letter constraints only.  The definition of this macro should use DEFAULT_CONSTRAINT_LEN for all the characters that you don't want to handle specially. There are some sanity checks in genoutput.c that check the constraint lengths for the md file, so you can also use this macro to help you while you are transitioning from a byzantine single-letter-constraint scheme: when you return a negative length for a constraint you want to re-use, genoutput will complain about every instance where it is used in the md file.

 -- Macro: REG_CLASS_FROM_LETTER (CHAR)
     A C expression which defines the machine-dependent operand constraint letters for register classes.  If CHAR is such a letter, the value should be the register class corresponding to it.  Otherwise, the value should be NO_REGS.  The register letter r, corresponding to class GENERAL_REGS, will not be passed to this macro; you do not need to handle it.

 -- Macro: REG_CLASS_FROM_CONSTRAINT (CHAR, STR)
     Like REG_CLASS_FROM_LETTER, but you also get the constraint string passed in STR, so that you can use suffixes to distinguish between different variants.

 -- Macro: CONST_OK_FOR_LETTER_P (VALUE, C)
     A C expression that defines the machine-dependent operand constraint letters (I, J, K, ... P) that specify particular ranges of integer values.  If C is one of those letters, the expression should check that VALUE, an integer, is in the appropriate range and return 1 if so, 0 otherwise.  If C is not one of those letters, the value should be 0 regardless of VALUE.

 -- Macro: CONST_OK_FOR_CONSTRAINT_P (VALUE, C, STR)
     Like CONST_OK_FOR_LETTER_P, but you also get the constraint string passed in STR, so that you can use suffixes to distinguish between different variants.

 -- Macro: CONST_DOUBLE_OK_FOR_LETTER_P (VALUE, C)
     A C expression that defines the machine-dependent operand constraint letters that specify particular ranges of const_double values (G or H).

     If C is one of those letters, the expression should check that VALUE, an RTX of code const_double, is in the appropriate range and return 1 if so, 0 otherwise.  If C is not one of those letters, the value should be 0 regardless of VALUE.

     const_double is used for all floating-point constants and for DImode fixed-point constants.  A given letter can accept either or both kinds of values.  It can use GET_MODE to distinguish between these kinds.

 -- Macro: CONST_DOUBLE_OK_FOR_CONSTRAINT_P (VALUE, C, STR)
     Like CONST_DOUBLE_OK_FOR_LETTER_P, but you also get the constraint string passed in STR, so that you can use suffixes to distinguish between different variants.

 -- Macro: EXTRA_CONSTRAINT (VALUE, C)
     A C expression that defines the optional machine-dependent constraint letters that can be used to segregate specific types of operands, usually memory references, for the target machine.  Any letter that is not elsewhere defined and not matched by REG_CLASS_FROM_LETTER / REG_CLASS_FROM_CONSTRAINT may be used.  Normally this macro will not be defined.

     If it is required for a particular target machine, it should return 1 if VALUE corresponds to the operand type represented by the constraint letter C.  If C is not defined as an extra constraint, the value returned should be 0 regardless of VALUE.

     For example, on the ROMP, load instructions cannot have their output in r0 if the memory reference contains a symbolic address.  Constraint letter Q is defined as representing a memory address that does not contain a symbolic address.  An alternative is specified with a Q constraint on the input and r on the output.  The next alternative specifies m on the input and a register class that does not include r0 on the output.

 -- Macro: EXTRA_CONSTRAINT_STR (VALUE, C, STR)
     Like EXTRA_CONSTRAINT, but you also get the constraint string passed in STR, so that you can use suffixes to distinguish between different variants.

 -- Macro: EXTRA_MEMORY_CONSTRAINT (C, STR)
     A C expression that defines the optional machine-dependent constraint letters, amongst those accepted by EXTRA_CONSTRAINT, that should be treated like memory constraints by the reload pass.

     It should return 1 if the operand type represented by the constraint at the start of STR, the first letter of which is the letter C, comprises a subset of all memory references including all those whose address is simply a base register.  This allows the reload pass to reload an operand, if it does not directly correspond to the operand type of C, by copying its address into a base register.

     For example, on the S/390, some instructions do not accept arbitrary memory references, but only those that do not make use of an index register.  The constraint letter Q is defined via EXTRA_CONSTRAINT as representing a memory address of this type. If the letter Q is marked as EXTRA_MEMORY_CONSTRAINT, a Q constraint can handle any memory operand, because the reload pass knows it can be reloaded by copying the memory address into a base register if required.  This is analogous to the way an o constraint can handle any memory operand.

 -- Macro: EXTRA_ADDRESS_CONSTRAINT (C, STR)
     A C expression that defines the optional machine-dependent constraint letters, amongst those accepted by EXTRA_CONSTRAINT / EXTRA_CONSTRAINT_STR, that should be treated like address constraints by the reload pass.

     It should return 1 if the operand type represented by the constraint at the start of STR, which starts with the letter C, comprises a subset of all memory addresses including all those that consist of just a base register.  This allows the reload pass to reload an operand, if it does not directly correspond to the operand type of STR, by copying it into a base register.

     Any constraint marked as EXTRA_ADDRESS_CONSTRAINT can only be used with the address_operand predicate.  It is treated analogously to the p constraint.

Stack Layout and Calling Conventions
====================================

This describes the stack layout and calling conventions.

Basic Stack Layout
------------------

Here is the basic stack layout.

 -- Macro: STACK_GROWS_DOWNWARD
     Define this macro if pushing a word onto the stack moves the stack pointer to a smaller address.

     When we say, ``define this macro if ...'', it means that the compiler checks this macro only with #ifdef so the precise definition used does not matter.

 -- Macro: STACK_PUSH_CODE
     This macro defines the operation used when something is pushed on the stack.  In RTL, a push operation will be (set (mem (STACK_PUSH_CODE (reg sp))) ...)

     The choices are PRE_DEC, POST_DEC, PRE_INC, and POST_INC.  Which of these is correct depends on the stack direction and on whether the stack pointer points to the last item on the stack or whether it points to the space for the next item on the stack.

     The default is PRE_DEC when STACK_GROWS_DOWNWARD is defined, which is almost always right, and PRE_INC otherwise, which is often wrong.

 -- Macro: FRAME_GROWS_DOWNWARD
     Define this macro to nonzero value if the addresses of local variable slots are at negative offsets from the frame pointer.

 -- Macro: ARGS_GROW_DOWNWARD
     Define this macro if successive arguments to a function occupy decreasing addresses on the stack.

 -- Macro: STARTING_FRAME_OFFSET
     Offset from the frame pointer to the first local variable slot to be allocated.

     If FRAME_GROWS_DOWNWARD, find the next slot's offset by subtracting the first slot's length from STARTING_FRAME_OFFSET. Otherwise, it is found by adding the length of the first slot to the value STARTING_FRAME_OFFSET.

 -- Macro: STACK_ALIGNMENT_NEEDED
     Define to zero to disable final alignment of the stack during reload. The nonzero default for this macro is suitable for most ports.

     On ports where STARTING_FRAME_OFFSET is nonzero or where there is a register save block following the local block that doesn't require alignment to STACK_BOUNDARY, it may be beneficial to disable stack alignment and do it in the backend.

 -- Macro: STACK_POINTER_OFFSET
     Offset from the stack pointer register to the first location at which outgoing arguments are placed.  If not specified, the default value of zero is used.  This is the proper value for most machines.

     If ARGS_GROW_DOWNWARD, this is the offset to the location above the first location at which outgoing arguments are placed.

 -- Macro: FIRST_PARM_OFFSET (FUNDECL)
     Offset from the argument pointer register to the first argument's address.  On some machines it may depend on the data type of the function.

     If ARGS_GROW_DOWNWARD, this is the offset to the location above the first argument's address.

 -- Macro: STACK_DYNAMIC_OFFSET (FUNDECL)
     Offset from the stack pointer register to an item dynamically allocated on the stack, e.g., by alloca.

     The default value for this macro is STACK_POINTER_OFFSET plus the length of the outgoing arguments.  The default is correct for most machines.  See function.c for details.

 -- Macro: INITIAL_FRAME_ADDRESS_RTX
     A C expression whose value is RTL representing the address of the initial stack frame. This address is passed to RETURN_ADDR_RTX and DYNAMIC_CHAIN_ADDRESS.  If you don't define this macro, a reasonable default value will be used.  Define this macro in order to make frame pointer elimination work in the presence of __builtin_frame_address (count) and __builtin_return_address (count) for count not equal to zero.

 -- Macro: DYNAMIC_CHAIN_ADDRESS (FRAMEADDR)
     A C expression whose value is RTL representing the address in a stack frame where the pointer to the caller's frame is stored.  Assume that FRAMEADDR is an RTL expression for the address of the stack frame itself.

     If you don't define this macro, the default is to return the value of FRAMEADDR---that is, the stack frame address is also the address of the stack word that points to the previous frame.

 -- Macro: SETUP_FRAME_ADDRESSES
     If defined, a C expression that produces the machine-specific code to setup the stack so that arbitrary frames can be accessed.  For example, on the SPARC, we must flush all of the register windows to the stack before we can access arbitrary stack frames.  You will seldom need to define this macro.

 -- Target Hook: rtx TARGET_BUILTIN_SETJMP_FRAME_VALUE (void)
     This target hook should return an rtx that is used to store the address of the current frame into the built in setjmp buffer. The default value, virtual_stack_vars_rtx, is correct for most machines.  One reason you may need to define this target hook is if hard_frame_pointer_rtx is the appropriate value on your machine.

 -- Macro: FRAME_ADDR_RTX (FRAMEADDR)
     A C expression whose value is RTL representing the value of the frame address for the current frame.  FRAMEADDR is the frame pointer of the current frame.  This is used for __builtin_frame_address. You need only define this macro if the frame address is not the same as the frame pointer.  Most machines do not need to define it.

 -- Macro: RETURN_ADDR_RTX (COUNT, FRAMEADDR)
     A C expression whose value is RTL representing the value of the return address for the frame COUNT steps up from the current frame, after the prologue.  FRAMEADDR is the frame pointer of the COUNT frame, or the frame pointer of the COUNT - 1 frame if RETURN_ADDR_IN_PREVIOUS_FRAME is defined.

     The value of the expression must always be the correct address when COUNT is zero, but may be NULL_RTX if there is no way to determine the return address of other frames.

 -- Macro: RETURN_ADDR_IN_PREVIOUS_FRAME
     Define this if the return address of a particular stack frame is accessed from the frame pointer of the previous stack frame.

 -- Macro: INCOMING_RETURN_ADDR_RTX
     A C expression whose value is RTL representing the location of the incoming return address at the beginning of any function, before the prologue.  This RTL is either a REG, indicating that the return value is saved in REG, or a MEM representing a location in the stack.

     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 REG, you should also define DWARF_FRAME_RETURN_COLUMN to DWARF_FRAME_REGNUM (REGNO).

 -- Macro: DWARF_ALT_FRAME_RETURN_COLUMN
     A C expression whose value is an integer giving a DWARF 2 column number that may be used as an alternative return column.  The column must not correspond to any gcc hard register (that is, it must not be in the range of DWARF_FRAME_REGNUM).

     This macro can be useful if DWARF_FRAME_RETURN_COLUMN is set to a general register, but an alternative column needs to be used for signal frames.  Some targets have also used different frame return columns over time.

 -- Macro: DWARF_ZERO_REG
     A C expression whose value is an integer giving a DWARF 2 register number that is considered to always have the value zero.  This should only be defined if the target has an architected zero register, and someone decided it was a good idea to use that register number to terminate the stack backtrace.  New ports should avoid this.

 -- Target Hook: void TARGET_DWARF_HANDLE_FRAME_UNSPEC (const char *LABEL, rtx PATTERN, int INDEX)
     This target hook allows the backend to emit frame-related insns that contain UNSPECs or UNSPEC_VOLATILEs.  The DWARF 2 call frame debugging info engine will invoke it on insns of the form

          (set (reg) (unspec [...] UNSPEC_INDEX))

     and

          (set (reg) (unspec_volatile [...] UNSPECV_INDEX)).

     to let the backend emit the call frame instructions.  LABEL is the CFI label attached to the insn, PATTERN is the pattern of the insn and INDEX is UNSPEC_INDEX or UNSPECV_INDEX.

 -- Macro: INCOMING_FRAME_SP_OFFSET
     A C expression whose value is an integer giving the offset, in bytes, from the value of the stack pointer register to the top of the stack frame at the beginning of any function, before the prologue.  The top of the frame is defined to be the value of the stack pointer in the previous frame, just before the call instruction.

     You only need to define this macro if you want to support call frame debugging information like that provided by DWARF 2.

 -- Macro: ARG_POINTER_CFA_OFFSET (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 INCOMING_FRAME_SP_OFFSET.  Which is unfortunately not usable during virtual register instantiation.

     The default value for this macro is FIRST_PARM_OFFSET (fundecl) + crtl->args.pretend_args_size, 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.

 -- Macro: FRAME_POINTER_CFA_OFFSET (FUNDECL)
     If defined, a C expression whose value is an integer giving the offset in bytes from the frame pointer to the canonical frame address (cfa). The final value should coincide with that calculated by INCOMING_FRAME_SP_OFFSET.

     Normally the CFA is calculated as an offset from the argument pointer, via ARG_POINTER_CFA_OFFSET, but if the argument pointer is variable due to the ABI, this may not be possible.  If this macro is defined, it implies that the virtual register instantiation should be based on the frame pointer instead of the argument pointer.  Only one of FRAME_POINTER_CFA_OFFSET and ARG_POINTER_CFA_OFFSET should be defined.

 -- Macro: CFA_FRAME_BASE_OFFSET (FUNDECL)
     If defined, a C expression whose value is an integer giving the offset in bytes from the canonical frame address (cfa) to the frame base used in DWARF 2 debug information.  The default is zero.  A different value may reduce the size of debug information on some ports.

Exception Handling Support
--------------------------

 -- Macro: EH_RETURN_DATA_REGNO (N)
     A C expression whose value is the Nth register number used for data by exception handlers, or INVALID_REGNUM if fewer than N registers are usable.

     The exception handling library routines communicate with the exception handlers via a set of agreed upon registers.  Ideally these registers should be call-clobbered; it is possible to use call-saved registers, but may negatively impact code size.  The target must support at least 2 data registers, but should define 4 if there are enough free registers.

     You must define this macro if you want to support call frame exception handling like that provided by DWARF 2.

 -- Macro: EH_RETURN_STACKADJ_RTX
     A C expression whose value is RTL representing a location in which to store a stack adjustment to be applied before function return. This is used to unwind the stack to an exception handler's call frame. It will be assigned zero on code paths that return normally.

     Typically this is a call-clobbered hard register that is otherwise untouched by the epilogue, but could also be a stack slot.

     Do not define this macro if the stack pointer is saved and restored by the regular prolog and epilog code in the call frame itself; in this case, the exception handling library routines will update the stack location to be restored in place.  Otherwise, you must define this macro if you want to support call frame exception handling like that provided by DWARF 2.

 -- Macro: EH_RETURN_HANDLER_RTX
     A C expression whose value is RTL representing a location in which to store the address of an exception handler to which we should return.  It will not be assigned on code paths that return normally.

     Typically this is the location in the call frame at which the normal return address is stored.  For targets that return by popping an address off the stack, this might be a memory address just below the target call frame rather than inside the current call frame.  If defined, EH_RETURN_STACKADJ_RTX will have already been assigned, so it may be used to calculate the location of the target call frame.

     Some targets have more complex requirements than storing to an address calculable during initial code generation.  In that case the eh_return instruction pattern should be used instead.

     If you want to support call frame exception handling, you must define either this macro or the eh_return instruction pattern.

 -- Macro: RETURN_ADDR_OFFSET
     If defined, an integer-valued C expression for which rtl will be generated to add it to the exception handler address before it is searched in the exception handling tables, and to subtract it again from the address before using it to return to the exception handler.

 -- Macro: ASM_PREFERRED_EH_DATA_FORMAT (CODE, GLOBAL)
     This macro chooses the encoding of pointers embedded in the exception handling sections.  If at all possible, this should be defined such that the exception handling section will not require dynamic relocations, and so may be read-only.

     CODE is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is true if the symbol may be affected by dynamic relocations. The macro should return a combination of the DW_EH_PE_* defines as found in dwarf2.h.

     If this macro is not defined, pointers will not be encoded but represented directly.

 -- Macro: ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX (FILE, ENCODING, SIZE, ADDR, DONE)
     This macro allows the target to emit whatever special magic is required to represent the encoding chosen by ASM_PREFERRED_EH_DATA_FORMAT. Generic code takes care of pc-relative and indirect encodings; this must be defined if the target uses text-relative or data-relative encodings.

     This is a C statement that branches to DONE if the format was handled.  ENCODING is the format chosen, SIZE is the number of bytes that the format occupies, ADDR is the SYMBOL_REF to be emitted.

 -- Macro: MD_FALLBACK_FRAME_STATE_FOR (CONTEXT, FS)
     This macro allows the target to add CPU and operating system specific code to the call-frame unwinder for use when there is no unwind data available.  The most common reason to implement this macro is to unwind through signal frames.

     This macro is called from uw_frame_state_for in unwind-dw2.c, unwind-dw2-xtensa.c and unwind-ia64.c.  CONTEXT is an _Unwind_Context; FS is an _Unwind_FrameState.  Examine context->ra for the address of the code being executed and context->cfa for the stack pointer value.  If the frame can be decoded, the register save addresses should be updated in FS and the macro should evaluate to _URC_NO_REASON.  If the frame cannot be decoded, the macro should evaluate to _URC_END_OF_STACK.

     For proper signal handling in Java this macro is accompanied by MAKE_THROW_FRAME, defined in libjava/include/*-signal.h headers.

 -- Macro: MD_HANDLE_UNWABI (CONTEXT, FS)
     This macro allows the target to add operating system specific code to the call-frame unwinder to handle the IA-64 .unwabi unwinding directive, usually used for signal or interrupt frames.

     This macro is called from uw_update_context in libgcc's unwind-ia64.c.  CONTEXT is an _Unwind_Context; FS is an _Unwind_FrameState.  Examine fs->unwabi for the abi and context in the .unwabi directive.  If the .unwabi directive can be handled, the register save addresses should be updated in FS.

 -- Macro: TARGET_USES_WEAK_UNWIND_INFO
     A C expression that evaluates to true if the target requires unwind info to be given comdat linkage.  Define it to be 1 if comdat linkage is necessary.  The default is 0.

Specifying How Stack Checking is Done
-------------------------------------

GCC will check that stack references are within the boundaries of the stack, if the option -fstack-check is specified, in one of three ways:

 1. If the value of the STACK_CHECK_BUILTIN macro is nonzero, GCC will assume that you have arranged for full stack checking to be done at appropriate places in the configuration files.  GCC will not do other special processing.

 2. If STACK_CHECK_BUILTIN is zero and the value of the STACK_CHECK_STATIC_BUILTIN macro is nonzero, GCC will assume that you have arranged for static stack checking (checking of the static stack frame of functions) to be done at appropriate places in the configuration files.  GCC will only emit code to do dynamic stack checking (checking on dynamic stack allocations) using the third approach below.

 3. 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.

If neither STACK_CHECK_BUILTIN nor STACK_CHECK_STATIC_BUILTIN is defined, GCC will change its allocation strategy for large objects if the option -fstack-check is specified: they will always be allocated dynamically if their size exceeds STACK_CHECK_MAX_VAR_SIZE bytes.

 -- Macro: STACK_CHECK_BUILTIN
     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 required by the ABI of your machine or if you would like to do stack checking in some more efficient way than the generic approach.  The default value of this macro is zero.

 -- Macro: STACK_CHECK_STATIC_BUILTIN
     A nonzero value if static stack checking is done by the configuration files in a machine-dependent manner.  You should define this macro if you would like to do static stack checking in some more efficient way than the generic approach.  The default value of this macro is zero.

 -- Macro: STACK_CHECK_PROBE_INTERVAL_EXP
     An integer specifying the interval at which GCC must generate stack probe instructions, defined as 2 raised to this integer.  You will normally define this macro so that the interval be no larger than the size of the ``guard pages'' at the end of a stack area.  The default value of 12 (4096-byte interval) is suitable for most systems.

 -- Macro: STACK_CHECK_MOVING_SP
     An integer which is nonzero if GCC should move the stack pointer page by page when doing probes.  This can be necessary on systems where the stack pointer contains the bottom address of the memory area accessible to the executing thread at any point in time.  In this situation an alternate signal stack is required in order to be able to recover from a stack overflow.  The default value of this macro is zero.

 -- Macro: STACK_CHECK_PROTECT
     The number of bytes of stack needed to recover from a stack overflow, for languages where such a recovery is supported.  The default value of 75 words with the setjmp/longjmp-based exception handling mechanism and 8192 bytes with other exception handling mechanisms should be adequate for most machines.

The following macros are relevant only if neither STACK_CHECK_BUILTIN nor STACK_CHECK_STATIC_BUILTIN is defined; you can omit them altogether in the opposite case.

 -- Macro: STACK_CHECK_MAX_FRAME_SIZE
     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 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.

 -- Macro: STACK_CHECK_FIXED_FRAME_SIZE
     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 use the default of four words.

 -- Macro: STACK_CHECK_MAX_VAR_SIZE
     The maximum size, in bytes, of an object that GCC will place in the fixed area of the stack frame when the user specifies -fstack-check. GCC computed the default from the values of the above macros and you will normally not need to override that default.

Registers That Address the Stack Frame
--------------------------------------

This discusses registers that address the stack frame.

 -- Macro: STACK_POINTER_REGNUM
     The register number of the stack pointer register, which must also be a fixed register according to FIXED_REGISTERS.  On most machines, the hardware determines which register this is.

 -- Macro: FRAME_POINTER_REGNUM
     The register number of the frame pointer register, which is used to access automatic variables in the stack frame.  On some machines, the hardware determines which register this is.  On other machines, you can choose any register you wish for this purpose.

 -- Macro: HARD_FRAME_POINTER_REGNUM
     On some machines the offset between the frame pointer and starting offset of the automatic variables is not known until after register allocation has been done (for example, because the saved registers are between these two locations).  On those machines, define FRAME_POINTER_REGNUM the number of a special, fixed register to be used internally until the offset is known, and define HARD_FRAME_POINTER_REGNUM to be the actual hard register number used for the frame pointer.

     You should define this macro only in the very rare circumstances when it is not possible to calculate the offset between the frame pointer and the automatic variables until after register allocation has been completed.  When this macro is defined, you must also indicate in your definition of ELIMINABLE_REGS how to eliminate FRAME_POINTER_REGNUM into either HARD_FRAME_POINTER_REGNUM or STACK_POINTER_REGNUM.

     Do not define this macro if it would be the same as FRAME_POINTER_REGNUM.

 -- Macro: ARG_POINTER_REGNUM
     The register number of the arg pointer register, which is used to access the function's argument list.  On some machines, this is the same as the frame pointer register.  On some machines, the hardware determines which register this is.  On other machines, you can choose any register you wish for this purpose.  If this is not the same register as the frame pointer register, then you must mark it as a fixed register according to FIXED_REGISTERS, or arrange to be able to eliminate it (see Elimination).

 -- Macro: HARD_FRAME_POINTER_IS_FRAME_POINTER
     Define this to a preprocessor constant that is nonzero if hard_frame_pointer_rtx and frame_pointer_rtx should be the same.  The default definition is (HARD_FRAME_POINTER_REGNUM == FRAME_POINTER_REGNUM); you only need to define this macro if that definition is not suitable for use in preprocessor conditionals.

 -- Macro: HARD_FRAME_POINTER_IS_ARG_POINTER
     Define this to a preprocessor constant that is nonzero if hard_frame_pointer_rtx and arg_pointer_rtx should be the same.  The default definition is (HARD_FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM); you only need to define this macro if that definition is not suitable for use in preprocessor conditionals.

 -- Macro: RETURN_ADDRESS_POINTER_REGNUM
     The register number of the return address pointer register, which is used to access the current function's return address from the stack.  On some machines, the return address is not at a fixed offset from the frame pointer or stack pointer or argument pointer.  This register can be defined to point to the return address on the stack, and then be converted by ELIMINABLE_REGS into either the frame pointer or stack pointer.

     Do not define this macro unless there is no other way to get the return address from the stack.

 -- Macro: STATIC_CHAIN_REGNUM
 -- Macro: STATIC_CHAIN_INCOMING_REGNUM
     Register numbers used for passing a function's static chain pointer.  If register windows are used, the register number as seen by the called function is STATIC_CHAIN_INCOMING_REGNUM, while the register number as seen by the calling function is STATIC_CHAIN_REGNUM.  If these registers are the same, STATIC_CHAIN_INCOMING_REGNUM need not be defined.

     The static chain register need not be a fixed register.

     If the static chain is passed in memory, these macros should not be defined; instead, the TARGET_STATIC_CHAIN hook should be used.

 -- Target Hook: rtx TARGET_STATIC_CHAIN (const_tree FNDECL, bool INCOMING_P)
     This hook replaces the use of STATIC_CHAIN_REGNUM et al for targets that may use different static chain locations for different nested functions.  This may be required if the target has function attributes that affect the calling conventions of the function and those calling conventions use different static chain locations.

     The default version of this hook uses STATIC_CHAIN_REGNUM et al.

     If the static chain is passed in memory, this hook should be used to provide rtx giving mem expressions that denote where they are stored. Often the mem expression as seen by the caller will be at an offset from the stack pointer and the mem expression as seen by the callee will be at an offset from the frame pointer. The variables stack_pointer_rtx, frame_pointer_rtx, and arg_pointer_rtx will have been initialized and should be used to refer to those items.

 -- Macro: DWARF_FRAME_REGISTERS
     This macro specifies the maximum number of hard registers that can be saved in a call frame.  This is used to size data structures used in DWARF2 exception handling.

     Prior to GCC 3.0, this macro was needed in order to establish a stable exception handling ABI in the face of adding new hard registers for ISA extensions.  In GCC 3.0 and later, the EH ABI is insulated from changes in the number of hard registers.  Nevertheless, this macro can still be used to reduce the runtime memory requirements of the exception handling routines, which can be substantial if the ISA contains a lot of registers that are not call-saved.

     If this macro is not defined, it defaults to FIRST_PSEUDO_REGISTER.

 -- Macro: PRE_GCC3_DWARF_FRAME_REGISTERS

     This macro is similar to DWARF_FRAME_REGISTERS, but is provided for backward compatibility in pre GCC 3.0 compiled code.

     If this macro is not defined, it defaults to DWARF_FRAME_REGISTERS.

 -- Macro: DWARF_REG_TO_UNWIND_COLUMN (REGNO)

     Define this macro if the target's representation for dwarf registers is different than the internal representation for unwind column. Given a dwarf register, this macro should return the internal unwind column number to use instead.

     See the PowerPC's SPE target for an example.

 -- Macro: DWARF_FRAME_REGNUM (REGNO)

     Define this macro if the target's representation for dwarf registers used in .eh_frame or .debug_frame is different from that used in other debug info sections.  Given a GCC hard register number, this macro should return the .eh_frame register number.  The default is DBX_REGISTER_NUMBER (REGNO).

 -- Macro: DWARF2_FRAME_REG_OUT (REGNO, FOR_EH)

     Define this macro to map register numbers held in the call frame info that GCC has collected using DWARF_FRAME_REGNUM to those that should be output in .debug_frame (FOR_EH is zero) and .eh_frame (FOR_EH is nonzero).  The default is to return REGNO.

 -- Macro: REG_VALUE_IN_UNWIND_CONTEXT

     Define this macro if the target stores register values as _Unwind_Word type in unwind context.  It should be defined if target register size is larger than the size of void *.  The default is to store register values as void * type.

 -- Macro: ASSUME_EXTENDED_UNWIND_CONTEXT

     Define this macro to be 1 if the target always uses extended unwind context with version, args_size and by_value fields.  If it is undefined, it will be defined to 1 when REG_VALUE_IN_UNWIND_CONTEXT is defined and 0 otherwise.

Eliminating Frame Pointer and Arg Pointer
-----------------------------------------

This is about eliminating the frame pointer and arg pointer.

 -- Target Hook: bool TARGET_FRAME_POINTER_REQUIRED (void)
     This target hook should return true if a function must have and use a frame pointer.  This target hook is called in the reload pass.  If its return value is true the function will have a frame pointer.

     This target hook can in principle examine the current function and decide according to the facts, but on most machines the constant false or the constant true suffices.  Use false when the machine allows code to be generated with no frame pointer, and doing so saves some time or space. Use true when there is no possible advantage to avoiding a frame pointer.

     In certain cases, the compiler does not know how to produce valid code without a frame pointer.  The compiler recognizes those cases and automatically gives the function a frame pointer regardless of what TARGET_FRAME_POINTER_REQUIRED returns.  You don't need to worry about them.

     In a function that does not require a frame pointer, the frame pointer register can be allocated for ordinary usage, unless you mark it as a fixed register.  See FIXED_REGISTERS for more information.

     Default return value is false.

 -- Macro: INITIAL_FRAME_POINTER_OFFSET (DEPTH-VAR)
     A C statement to store in the variable DEPTH-VAR the difference between the frame pointer and the stack pointer values immediately after the function prologue.  The value would be computed from information such as the result of get_frame_size () and the tables of registers regs_ever_live and call_used_regs.

     If ELIMINABLE_REGS is defined, this macro will be not be used and need not be defined.  Otherwise, it must be defined even if TARGET_FRAME_POINTER_REQUIRED always returns true; in that case, you may set DEPTH-VAR to anything.

 -- Macro: ELIMINABLE_REGS
     If defined, this macro specifies a table of register pairs used to eliminate unneeded registers that point into the stack frame.  If it is not defined, the only elimination attempted by the compiler is to replace references to the frame pointer with references to the stack pointer.

     The definition of this macro is a list of structure initializations, each of which specifies an original and replacement register.

     On some machines, the position of the argument pointer is not known until the compilation is completed.  In such a case, a separate hard register must be used for the argument pointer.  This register can be eliminated by replacing it with either the frame pointer or the argument pointer, depending on whether or not the frame pointer has been eliminated.

     In this case, you might specify:

          #define ELIMINABLE_REGS  \
          {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
           {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
           {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}}

     Note that the elimination of the argument pointer with the stack pointer is specified first since that is the preferred elimination.

 -- Target Hook: bool TARGET_CAN_ELIMINATE (const int FROM_REG, const int TO_REG)
     This target hook should returns true if the compiler is allowed to try to replace register number FROM_REG with register number TO_REG.  This target hook need only be defined if ELIMINABLE_REGS is defined, and will usually be true, since most of the cases preventing register elimination are things that the compiler already knows about.

     Default return value is true.

 -- Macro: INITIAL_ELIMINATION_OFFSET (FROM-REG, TO-REG, OFFSET-VAR)
     This macro is similar to INITIAL_FRAME_POINTER_OFFSET.  It specifies the initial difference between the specified pair of registers.  This macro must be defined if ELIMINABLE_REGS is defined.

Passing Function Arguments on the Stack
---------------------------------------

The macros in this section control how arguments are passed on the stack.  See the following section for other macros that control passing certain arguments in registers.

 -- Target Hook: bool TARGET_PROMOTE_PROTOTYPES (const_tree FNTYPE)
     This target hook returns true if an argument declared in a prototype as an integral type smaller than int should actually be passed as an int.  In addition to avoiding errors in certain cases of mismatch, it also makes for better code on certain machines. The default is to not promote prototypes.

 -- Macro: 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.

 -- Macro: PUSH_ARGS_REVERSED
     A C expression.  If nonzero, function arguments will be evaluated from last to first, rather than from first to last.  If this macro is not defined, it defaults to PUSH_ARGS on targets where the stack and args grow in opposite directions, and 0 otherwise.

 -- Macro: PUSH_ROUNDING (NPUSHED)
     A C expression that is the number of bytes actually pushed onto the stack when an instruction attempts to push NPUSHED bytes.

     On some machines, the definition

          #define PUSH_ROUNDING(BYTES) (BYTES)

     will suffice.  But on other machines, instructions that appear to push one byte actually push two bytes in an attempt to maintain alignment.  Then the definition should be

          #define PUSH_ROUNDING(BYTES) (((BYTES) + 1) & ~1)

     If the value of this macro has a type, it should be an unsigned type.

 -- Macro: ACCUMULATE_OUTGOING_ARGS
     A C expression.  If nonzero, the maximum amount of space required for outgoing arguments will be computed and placed into crtl->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.

     Setting both PUSH_ARGS and ACCUMULATE_OUTGOING_ARGS is not proper.

 -- Macro: REG_PARM_STACK_SPACE (FNDECL)
     Define this macro if functions should assume that stack space has been allocated for arguments even when their values are passed in 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 FNDECL, which can be zero if GCC is calling a library function. The argument FNDECL can be the FUNCTION_DECL, or the type itself of the function.

     This space can be allocated by the caller, or be a part of the machine-dependent stack frame: OUTGOING_REG_PARM_STACK_SPACE says which.

 -- Macro: OUTGOING_REG_PARM_STACK_SPACE (FNTYPE)
     Define this to a nonzero value if it is the responsibility of the caller to allocate the area reserved for arguments passed in registers when calling a function of FNTYPE.  FNTYPE may be NULL if the function called is a library function.

     If ACCUMULATE_OUTGOING_ARGS is defined, this macro controls whether the space for these arguments counts in the value of crtl->outgoing_args_size.

 -- Macro: STACK_PARMS_IN_REG_PARM_AREA
     Define this macro if REG_PARM_STACK_SPACE is defined, but the stack parameters don't skip the area specified by it.

     Normally, when a parameter is not passed in registers, it is placed on the stack beyond the REG_PARM_STACK_SPACE area.  Defining this macro suppresses this behavior and causes the parameter to be passed on the stack in its natural location.

 -- Target Hook: int TARGET_RETURN_POPS_ARGS (tree FUNDECL, tree FUNTYPE, int SIZE)
     This target hook returns the number of bytes of its own arguments that a function pops on returning, or 0 if the function pops no arguments and the caller must therefore pop them all after the function returns.

     FUNDECL is a C variable whose value is a tree node that describes the function in question.  Normally it is a node of type FUNCTION_DECL that describes the declaration of the function. From this you can obtain the DECL_ATTRIBUTES of the function.

     FUNTYPE is a C variable whose value is a tree node that describes the function in question.  Normally it is a node of type FUNCTION_TYPE that describes the data type of the function. From this it is possible to obtain the data types of the value and arguments (if known).

     When a call to a library function is being considered, FUNDECL will contain an identifier node for the library function.  Thus, if you need to distinguish among various library functions, you can do so by their names.  Note that ``library function'' in this context means a function used to perform arithmetic, whose name is known specially in the compiler and was not mentioned in the C code being compiled.

     SIZE is the number of bytes of arguments passed on the stack.  If a variable number of bytes is passed, it is zero, and argument popping will always be the responsibility of the calling function.

     On the VAX, all functions always pop their arguments, so the definition of this macro is SIZE.  On the 68000, using the standard calling convention, no functions pop their arguments, so the value of the macro is always 0 in this case.  But an alternative calling convention is available in which functions that take a fixed number of arguments pop them but other functions (such as printf) pop nothing (the caller pops all).  When this convention is in use, FUNTYPE is examined to determine whether a function takes a fixed number of arguments.

 -- Macro: CALL_POPS_ARGS (CUM)
     A C expression that should indicate the number of bytes a call sequence pops off the stack.  It is added to the value of RETURN_POPS_ARGS when compiling a function call.

     CUM is the variable in which all arguments to the called function have been accumulated.

     On certain architectures, such as the SH5, a call trampoline is used that pops certain registers off the stack, depending on the arguments that have been passed to the function.  Since this is a property of the call site, not of the called function, RETURN_POPS_ARGS is not appropriate.

Passing Arguments in Registers
------------------------------

This section describes the macros which let you control how various types of arguments are passed in registers or how they are arranged in the stack.

 -- Target Hook: rtx TARGET_FUNCTION_ARG (cumulative_args_t CA, enum machine_mode MODE, const_tree TYPE, bool NAMED)
     Return an RTX indicating whether a function argument is passed in a register and if so, which register.

     The arguments are CA, which summarizes all the previous arguments; MODE, the machine mode of the argument; TYPE, the data type of the argument as a tree node or 0 if that is not known (which happens for C support library functions); and NAMED, which is true for an ordinary argument and false for nameless arguments that correspond to ... in the called function's prototype.  TYPE can be an incomplete type if a syntax error has previously occurred.

     The return value is usually either a reg RTX for the hard register in which to pass the argument, or zero to pass the argument on the stack.

     The value of the expression can also be a parallel RTX.  This is used when an argument is passed in multiple locations.  The mode of the parallel should be the mode of the entire argument.  The parallel holds any number of expr_list pairs; each one describes where part of the argument is passed.  In each expr_list the first operand must be a 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 expr_list is a const_int which gives the offset in bytes into the entire argument of where this part starts. As a special exception the first expr_list in the parallel RTX may have a first operand of zero.  This indicates that the entire argument is also stored on the stack.

     The last time this hook is called, it is called with MODE == VOIDmode, and its result is passed to the call or call_value pattern as operands 2 and 3 respectively.

     The usual way to make the ISO library stdarg.h work on a machine where some arguments are usually passed in registers, is to cause nameless arguments to be passed on the stack instead.  This is done by making TARGET_FUNCTION_ARG return 0 whenever NAMED is false.

     You may use the hook targetm.calls.must_pass_in_stack in the definition of this macro to determine if this argument is of a type that must be passed in the stack.  If REG_PARM_STACK_SPACE is not defined and TARGET_FUNCTION_ARG returns nonzero for such an argument, the compiler will abort.  If REG_PARM_STACK_SPACE is defined, the argument will be computed in the stack and then loaded into a register.

 -- Target Hook: bool TARGET_MUST_PASS_IN_STACK (enum machine_mode MODE, const_tree TYPE)
     This target hook should return true if we should not pass TYPE solely in registers.  The file expr.h defines a definition that is usually appropriate, refer to expr.h for additional documentation.

 -- Target Hook: rtx TARGET_FUNCTION_INCOMING_ARG (cumulative_args_t CA, enum machine_mode MODE, const_tree TYPE, bool NAMED)
     Define this hook if the target machine has ``register windows'', so that the register in which a function sees an arguments is not necessarily the same as the one in which the caller passed the argument.

     For such machines, TARGET_FUNCTION_ARG computes the register in which the caller passes the value, and TARGET_FUNCTION_INCOMING_ARG should be defined in a similar fashion to tell the function being called where the arguments will arrive.

     If TARGET_FUNCTION_INCOMING_ARG is not defined, TARGET_FUNCTION_ARG serves both purposes.

 -- Target Hook: int TARGET_ARG_PARTIAL_BYTES (cumulative_args_t CUM, enum machine_mode MODE, tree TYPE, bool NAMED)
     This target hook returns the number of bytes at the beginning of an argument that must be put in registers.  The value must be zero for arguments that are passed entirely in registers or that are entirely pushed on the stack.

     On some machines, certain arguments must be passed partially in registers and partially in memory.  On these machines, typically the first few words of arguments are passed in registers, and the rest on the stack.  If a multi-word argument (a double or a structure) crosses that boundary, its first few words must be passed in registers and the rest must be pushed.  This macro tells the compiler when this occurs, and how many bytes should go in registers.

     TARGET_FUNCTION_ARG for these arguments should return the first register to be used by the caller for this argument; likewise TARGET_FUNCTION_INCOMING_ARG, for the called function.

 -- Target Hook: bool TARGET_PASS_BY_REFERENCE (cumulative_args_t CUM, enum machine_mode MODE, const_tree TYPE, bool NAMED)
     This target hook should return true if an argument at the position indicated by CUM should be passed by reference.  This predicate is queried after target independent reasons for being passed by reference, such as TREE_ADDRESSABLE (type).

     If the hook returns true, a copy of that argument is made in memory and a pointer to the argument is passed instead of the argument itself. The pointer is passed in whatever way is appropriate for passing a pointer to that type.

 -- Target Hook: bool TARGET_CALLEE_COPIES (cumulative_args_t CUM, enum machine_mode MODE, const_tree TYPE, bool NAMED)
     The function argument described by the parameters to this hook is known to be passed by reference.  The hook should return true if the function argument should be copied by the callee instead of copied by the caller.

     For any argument for which the hook returns true, if it can be determined that the argument is not modified, then a copy need not be generated.

     The default version of this hook always returns false.

 -- Macro: CUMULATIVE_ARGS
     A C type for declaring a variable that is used as the first argument of TARGET_FUNCTION_ARG and other related values.  For some target machines, the type int suffices and can hold the number of bytes of argument so far.

     There is no need to record in CUMULATIVE_ARGS anything about the arguments that have been passed on the stack.  The compiler has other variables to keep track of that.  For target machines on which all arguments are passed on the stack, there is no need to store anything in CUMULATIVE_ARGS; however, the data structure must exist and should not be empty, so use int.

 -- Macro: OVERRIDE_ABI_FORMAT (FNDECL)
     If defined, this macro is called before generating any code for a function, but after the CFUN descriptor for the function has been created.  The back end may use this macro to update CFUN to reflect an ABI other than that which would normally be used by default. If the compiler is generating code for a compiler-generated function, FNDECL may be NULL.

 -- Macro: INIT_CUMULATIVE_ARGS (CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS)
     A C statement (sans semicolon) for initializing the variable CUM for the state at the beginning of the argument list.  The variable has type CUMULATIVE_ARGS.  The value of FNTYPE is the tree node for the data type of the function which will receive the args, or 0 if the args are to a compiler support library function. For direct calls that are not libcalls, FNDECL contain the declaration node of the function.  FNDECL is also set when INIT_CUMULATIVE_ARGS is used to find arguments for the function being compiled.  N_NAMED_ARGS is set to the number of named arguments, including a structure return address if it is passed as a parameter, when making a call.  When processing incoming arguments, N_NAMED_ARGS is set to -1.

     When processing a call to a compiler support library function, LIBNAME identifies which one.  It is a symbol_ref rtx which contains the name of the function, as a string.  LIBNAME is 0 when an ordinary C function call is being processed.  Thus, each time this macro is called, either LIBNAME or FNTYPE is nonzero, but never both of them at once.

 -- Macro: INIT_CUMULATIVE_LIBCALL_ARGS (CUM, MODE, LIBNAME)
     Like INIT_CUMULATIVE_ARGS but only used for outgoing libcalls, it gets a MODE argument instead of FNTYPE, that would be NULL.  INDIRECT would always be zero, too.  If this macro is not defined, INIT_CUMULATIVE_ARGS (cum, NULL_RTX, libname, 0) is used instead.

 -- Macro: INIT_CUMULATIVE_INCOMING_ARGS (CUM, FNTYPE, LIBNAME)
     Like INIT_CUMULATIVE_ARGS but overrides it for the purposes of finding the arguments for the function being compiled.  If this macro is undefined, INIT_CUMULATIVE_ARGS is used instead.

     The value passed for LIBNAME is always 0, since library routines with special calling conventions are never compiled with GCC.  The argument LIBNAME exists for symmetry with INIT_CUMULATIVE_ARGS.

 -- Target Hook: void TARGET_FUNCTION_ARG_ADVANCE (cumulative_args_t CA, enum machine_mode MODE, const_tree TYPE, bool NAMED)
     This hook updates the summarizer variable pointed to by CA to advance past an argument in the argument list.  The values MODE, TYPE and NAMED describe that argument.  Once this is done, the variable CUM is suitable for analyzing the following argument with TARGET_FUNCTION_ARG, etc.

     This hook need not do anything if the argument in question was passed on the stack.  The compiler knows how to track the amount of stack space used for arguments without any special help.

 -- Macro: FUNCTION_ARG_OFFSET (MODE, TYPE)
     If defined, a C expression that is the number of bytes to add to the offset of the argument passed in memory.  This is needed for the SPU, which passes char and short arguments in the preferred slot that is in the middle of the quad word instead of starting at the top.

 -- Macro: FUNCTION_ARG_PADDING (MODE, TYPE)
     If defined, a C expression which determines whether, and in which direction, to pad out an argument with extra space.  The value should be of type enum direction: either upward to pad above the argument, downward to pad below, or none to inhibit padding.

     The amount of padding is not controlled by this macro, but by the target hook TARGET_FUNCTION_ARG_ROUND_BOUNDARY.  It is always just enough to reach the next multiple of that boundary.

     This macro has a default definition which is right for most systems. For little-endian machines, the default is to pad upward.  For big-endian machines, the default is to pad downward for an argument of constant size shorter than an int, and upward otherwise.

 -- Macro: 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 PARM_BOUNDARY.  If this macro is not defined, all such arguments are padded down if BYTES_BIG_ENDIAN is true.

 -- Macro: BLOCK_REG_PADDING (MODE, TYPE, FIRST)
     Specify padding for the last element of a block move between registers and memory.  FIRST is nonzero if this is the only element.  Defining this macro allows better control of register function parameters on big-endian machines, without using PARALLEL rtl.  In particular, MUST_PASS_IN_STACK need not test padding and mode of types in registers, as there is no longer a "wrong" part of a register;  For example, a three byte aggregate may be passed in the high part of a register if so required.

 -- Target Hook: unsigned int TARGET_FUNCTION_ARG_BOUNDARY (enum machine_mode MODE, const_tree TYPE)
     This hook returns the alignment boundary, in bits, of an argument with the specified mode and type.  The default hook returns PARM_BOUNDARY for all arguments.

 -- Target Hook: unsigned int TARGET_FUNCTION_ARG_ROUND_BOUNDARY (enum machine_mode MODE, const_tree TYPE)
     Normally, the size of an argument is rounded up to PARM_BOUNDARY, which is the default value for this hook.  You can define this hook to return a different value if an argument size must be rounded to a larger value.

 -- Macro: FUNCTION_ARG_REGNO_P (REGNO)
     A C expression that is nonzero if REGNO is the number of a hard register in which function arguments are sometimes passed.  This does not include implicit arguments such as the static chain and the structure-value address.  On many machines, no registers can be used for this purpose since all function arguments are pushed on the stack.

 -- Target Hook: bool TARGET_SPLIT_COMPLEX_ARG (const_tree TYPE)
     This hook should return true if parameter of type TYPE are passed as two scalar parameters.  By default, GCC will attempt to pack complex arguments into the target's word size.  Some ABIs require complex arguments to be split and treated as their individual components.  For example, on AIX64, complex floats should be passed in a pair of floating point registers, even though a complex float would fit in one 64-bit floating point register.

     The default value of this hook is NULL, which is treated as always false.

 -- Target Hook: tree TARGET_BUILD_BUILTIN_VA_LIST (void)
     This hook returns a type node for va_list for the target. The default version of the hook returns void*.

 -- Target Hook: int TARGET_ENUM_VA_LIST_P (int IDX, const char **PNAME, tree *PTREE)
     This target hook is used in function c_common_nodes_and_builtins to iterate through the target specific builtin types for va_list. The variable IDX is used as iterator. PNAME has to be a pointer to a const char * and PTREE a pointer to a tree typed variable. The arguments PNAME and PTREE are used to store the result of this macro and are set to the name of the va_list builtin type and its internal type. If the return value of this macro is zero, then there is no more element. Otherwise the IDX should be increased for the next call of this macro to iterate through all types.

 -- Target Hook: tree TARGET_FN_ABI_VA_LIST (tree FNDECL)
     This hook returns the va_list type of the calling convention specified by FNDECL. The default version of this hook returns va_list_type_node.

 -- Target Hook: tree TARGET_CANONICAL_VA_LIST_TYPE (tree TYPE)
     This hook returns the va_list type of the calling convention specified by the type of TYPE. If TYPE is not a valid va_list type, it returns NULL_TREE.

 -- Target Hook: tree TARGET_GIMPLIFY_VA_ARG_EXPR (tree VALIST, tree TYPE, gimple_seq *PRE_P, gimple_seq *POST_P)
     This hook performs target-specific gimplification of VA_ARG_EXPR.  The first two parameters correspond to the arguments to va_arg; the latter two are as in gimplify.c:gimplify_expr.

 -- Target Hook: bool TARGET_VALID_POINTER_MODE (enum machine_mode MODE)
     Define this to return nonzero if the port can handle pointers with machine mode MODE.  The default version of this hook returns true for both ptr_mode and Pmode.

 -- Target Hook: bool TARGET_REF_MAY_ALIAS_ERRNO (struct ao_ref_s *REF)
     Define this to return nonzero if the memory reference REF  may alias with the system C library errno location.  The default  version of this hook assumes the system C library errno location  is either a declaration of type int or accessed by dereferencing  a pointer to int.

 -- Target Hook: bool TARGET_SCALAR_MODE_SUPPORTED_P (enum machine_mode MODE)
     Define this to return nonzero if the port is prepared to handle insns involving scalar mode MODE.  For a scalar mode to be considered supported, all the basic arithmetic and comparisons must work.

     The default version of this hook returns true for any mode required to handle the basic C types (as defined by the port). Included here are the double-word arithmetic supported by the code in optabs.c.

 -- Target Hook: bool TARGET_VECTOR_MODE_SUPPORTED_P (enum machine_mode MODE)
     Define this to return nonzero if the port is prepared to handle insns involving vector mode MODE.  At the very least, it must have move patterns for this mode.

 -- Target Hook: bool TARGET_ARRAY_MODE_SUPPORTED_P (enum machine_mode MODE, unsigned HOST_WIDE_INT NELEMS)
     Return true if GCC should try to use a scalar mode to store an array of NELEMS elements, given that each element has mode MODE. Returning true here overrides the usual MAX_FIXED_MODE limit and allows GCC to use any defined integer mode.

     One use of this hook is to support vector load and store operations that operate on several homogeneous vectors.  For example, ARM NEON has operations like:

          int8x8x3_t vld3_s8 (const int8_t *)

     where the return type is defined as:

          typedef struct int8x8x3_t
          {
            int8x8_t val[3];
          } int8x8x3_t;

     If this hook allows val to have a scalar mode, then int8x8x3_t can have the same mode.  GCC can then store int8x8x3_ts in registers rather than forcing them onto the stack.

 -- Target Hook: bool TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P (enum machine_mode MODE)
     Define this to return nonzero for machine modes for which the port has small register classes.  If this target hook returns nonzero for a given MODE, the compiler will try to minimize the lifetime of registers in MODE.  The hook may be called with VOIDmode as argument. In this case, the hook is expected to return nonzero if it returns nonzero for any mode.

     On some machines, it is risky to let hard registers live across arbitrary insns.  Typically, these machines have instructions that require values to be in specific registers (like an accumulator), and reload will fail if the required hard register is used for another purpose across such an insn.

     Passes before reload do not know which hard registers will be used in an instruction, but the machine modes of the registers set or used in the instruction are already known.  And for some machines, register classes are small for, say, integer registers but not for floating point registers.  For example, the AMD x86-64 architecture requires specific registers for the legacy x86 integer instructions, but there are many SSE registers for floating point operations.  On such targets, a good strategy may be to return nonzero from this hook for INTEGRAL_MODE_P machine modes but zero for the SSE register classes.

     The default version of this hook returns false for any mode.  It is always safe to redefine this hook to return with a nonzero value.  But if you unnecessarily define it, you will reduce the amount of optimizations that can be performed in some cases.  If you do not define this hook to return a nonzero value when it is required, the compiler will run out of spill registers and print a fatal error message.

 -- Target Hook: unsigned int TARGET_FLAGS_REGNUM
     If the target has a dedicated flags register, and it needs to use the post-reload comparison elimination pass, then this value should be set appropriately.

How Scalar Function Values Are Returned
---------------------------------------

This section discusses the macros that control returning scalars as values---values that can fit in registers.

 -- Target Hook: rtx TARGET_FUNCTION_VALUE (const_tree RET_TYPE, const_tree FN_DECL_OR_TYPE, bool OUTGOING)

     Define this to return an RTX representing the place where a function returns or receives a value of data type RET_TYPE, a tree node representing a data type.  FN_DECL_OR_TYPE is a tree node representing FUNCTION_DECL or FUNCTION_TYPE of a function being called.  If OUTGOING is false, the hook should compute the register in which the caller will see the return value. Otherwise, the hook should return an RTX representing the place where a function returns a value.

     On many machines, only TYPE_MODE (RET_TYPE) is relevant. (Actually, on most machines, scalar values are returned in the same place regardless of mode.)  The value of the expression is usually a reg RTX for the hard register where the return value is stored. The value can also be a parallel RTX, if the return value is in multiple places.  See TARGET_FUNCTION_ARG for an explanation of the parallel form.   Note that the callee will populate every location specified in the parallel, but if the first element of the parallel contains the whole return value, callers will use that element as the canonical location and ignore the others.  The m68k port uses this type of parallel to return pointers in both %a0 (the canonical location) and %d0.

     If TARGET_PROMOTE_FUNCTION_RETURN returns true, you must apply the same promotion rules specified in PROMOTE_MODE if VALTYPE is a scalar type.

     If the precise function being called is known, FUNC is a tree node (FUNCTION_DECL) for it; otherwise, FUNC is a null pointer.  This makes it possible to use a different value-returning convention for specific functions when all their calls are known.

     Some target machines have ``register windows'' so that the register in which a function returns its value is not the same as the one in which the caller sees the value.  For such machines, you should return different RTX depending on OUTGOING.

     TARGET_FUNCTION_VALUE is not used for return values with aggregate data types, because these are returned in another way.  See TARGET_STRUCT_VALUE_RTX and related macros, below.

 -- Macro: FUNCTION_VALUE (VALTYPE, FUNC)
     This macro has been deprecated.  Use TARGET_FUNCTION_VALUE for a new target instead.

 -- Macro: LIBCALL_VALUE (MODE)
     A C expression to create an RTX representing the place where a library function returns a value of mode MODE.

     Note that ``library function'' in this context means a compiler support routine, used to perform arithmetic, whose name is known specially by the compiler and was not mentioned in the C code being compiled.

 -- Target Hook: rtx TARGET_LIBCALL_VALUE (enum machine_mode MODE, const_rtx FUN)
     Define this hook if the back-end needs to know the name of the libcall function in order to determine where the result should be returned.

     The mode of the result is given by MODE and the name of the called library function is given by FUN.  The hook should return an RTX representing the place where the library function result will be returned.

     If this hook is not defined, then LIBCALL_VALUE will be used.

 -- Macro: FUNCTION_VALUE_REGNO_P (REGNO)
     A C expression that is nonzero if REGNO is the number of a hard register in which the values of called function may come back.

     A register whose use for returning values is limited to serving as the second of a pair (for a value of type double, say) need not be recognized by this macro.  So for most machines, this definition suffices:

          #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)

     If the machine has register windows, so that the caller and the called function use different registers for the return value, this macro should recognize only the caller's register numbers.

     This macro has been deprecated.  Use TARGET_FUNCTION_VALUE_REGNO_P for a new target instead.

 -- Target Hook: bool TARGET_FUNCTION_VALUE_REGNO_P (const unsigned int REGNO)
     A target hook that return true if REGNO is the number of a hard register in which the values of called function may come back.

     A register whose use for returning values is limited to serving as the second of a pair (for a value of type double, say) need not be recognized by this target hook.

     If the machine has register windows, so that the caller and the called function use different registers for the return value, this target hook should recognize only the caller's register numbers.

     If this hook is not defined, then FUNCTION_VALUE_REGNO_P will be used.

 -- Macro: APPLY_RESULT_SIZE
     Define this macro if untyped_call and untyped_return need more space than is implied by FUNCTION_VALUE_REGNO_P for saving and restoring an arbitrary return value.

 -- Target Hook: bool TARGET_RETURN_IN_MSB (const_tree TYPE)
     This hook should return true if values of type TYPE are returned at the most significant end of a register (in other words, if they are padded at the least significant end).  You can assume that TYPE is returned in a register; the caller is required to check this.

     Note that the register provided by TARGET_FUNCTION_VALUE must be able to hold the complete return value.  For example, if a 1-, 2- or 3-byte structure is returned at the most significant end of a 4-byte register, TARGET_FUNCTION_VALUE should provide an SImode rtx.

How Large Values Are Returned
-----------------------------

When a function value's mode is BLKmode (and in some other cases), the value is not returned according to TARGET_FUNCTION_VALUE (see Scalar Return).  Instead, the caller passes the address of a block of memory in which the value should be stored.  This address is called the structure value address.

This section describes how to control returning structure values in memory.

 -- Target Hook: bool TARGET_RETURN_IN_MEMORY (const_tree TYPE, const_tree FNTYPE)
     This target hook should return a nonzero value to say to return the function value in memory, just as large structures are always returned. Here TYPE will be the data type of the value, and FNTYPE will be the type of the function doing the returning, or NULL for libcalls.

     Note that values of mode BLKmode must be explicitly handled by this function.  Also, the option -fpcc-struct-return takes effect regardless of this macro.  On most systems, it is possible to leave the hook undefined; this causes a default definition to be used, whose value is the constant 1 for BLKmode values, and 0 otherwise.

     Do not use this hook to indicate that structures and unions should always be returned in memory.  You should instead use DEFAULT_PCC_STRUCT_RETURN to indicate this.

 -- Macro: DEFAULT_PCC_STRUCT_RETURN
     Define this macro to be 1 if all structure and union return values must be in memory.  Since this results in slower code, this should be defined only if needed for compatibility with other compilers or with an ABI. If you define this macro to be 0, then the conventions used for structure and union return values are decided by the TARGET_RETURN_IN_MEMORY target hook.

     If not defined, this defaults to the value 1.

 -- Target Hook: rtx TARGET_STRUCT_VALUE_RTX (tree FNDECL, int INCOMING)
     This target hook should return the location of the structure value address (normally a mem or reg), or 0 if the address is passed as an ``invisible'' first argument.  Note that FNDECL may be NULL, for libcalls.  You do not need to define this target hook if the address is always passed as an ``invisible'' first argument.

     On some architectures the place where the structure value address is found by the called function is not the same place that the caller put it.  This can be due to register windows, or it could be because the function prologue moves it to a different place. INCOMING is 1 or 2 when the location is needed in the context of the called function, and 0 in the context of the caller.

     If INCOMING is nonzero and the address is to be found on the stack, return a mem which refers to the frame pointer. If INCOMING is 2, the result is being used to fetch the structure value address at the beginning of a function.  If you need to emit adjusting code, you should do it at this point.

 -- Macro: PCC_STATIC_STRUCT_RETURN
     Define this macro if the usual system convention on the target machine for returning structures and unions is for the called function to return the address of a static variable containing the value.

     Do not define this if the usual system convention is for the caller to pass an address to the subroutine.

     This macro has effect in -fpcc-struct-return mode, but it does nothing when you use -freg-struct-return mode.

 -- Target Hook: enum machine_mode TARGET_GET_RAW_RESULT_MODE (int REGNO)
     This target hook returns the mode to be used when accessing raw return registers in __builtin_return.  Define this macro if the value in REG_RAW_MODE is not correct.

 -- Target Hook: enum machine_mode TARGET_GET_RAW_ARG_MODE (int REGNO)
     This target hook returns the mode to be used when accessing raw argument registers in __builtin_apply_args.  Define this macro if the value in REG_RAW_MODE is not correct.

Caller-Saves Register Allocation
--------------------------------

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.

 -- Macro: CALLER_SAVE_PROFITABLE (REFS, CALLS)
     A C expression to determine whether it is worthwhile to consider placing a pseudo-register in a call-clobbered hard register and saving and restoring it around each function call.  The expression should be 1 when this is worth doing, and 0 otherwise.

     If you don't define this macro, a default is used which is good on most machines: 4 * CALLS < REFS.

 -- Macro: HARD_REGNO_CALLER_SAVE_MODE (REGNO, NREGS)
     A C expression specifying which mode is required for saving NREGS of a pseudo-register in call-clobbered hard register REGNO.  If REGNO is unsuitable for caller save, VOIDmode should be returned.  For most machines this macro need not be defined since GCC will select the smallest suitable mode.

Function Entry and Exit
-----------------------

This section describes the macros that output function entry (prologue) and exit (epilogue) code.

 -- Target Hook: void TARGET_ASM_FUNCTION_PROLOGUE (FILE *FILE, HOST_WIDE_INT SIZE)
     If defined, a function that outputs the assembler code for entry to a function.  The prologue is responsible for setting up the stack frame, initializing the frame pointer register, saving registers that must be saved, and allocating SIZE additional bytes of storage for the local variables.  SIZE is an integer.  FILE is a stdio stream to which the assembler code should be output.

     The label for the beginning of the function need not be output by this macro.  That has already been done when the macro is run.

     To determine which registers to save, the macro can refer to the array regs_ever_live: element R is nonzero if hard register R is used anywhere within the function.  This implies the function prologue should save register R, provided it is not one of the call-used registers.  (TARGET_ASM_FUNCTION_EPILOGUE must likewise use regs_ever_live.)

     On machines that have ``register windows'', the function entry code does not save on the stack the registers that are in the windows, even if they are supposed to be preserved by function calls; instead it takes appropriate steps to ``push'' the register stack, if any non-call-used registers are used in the function.

     On machines where functions may or may not have frame-pointers, the function entry code must vary accordingly; it must set up the frame pointer if one is wanted, and not otherwise.  To determine whether a frame pointer is in wanted, the macro can refer to the variable frame_pointer_needed.  The variable's value will be 1 at run time in a function that needs a frame pointer.  See Elimination.

     The function entry code is responsible for allocating any stack space required for the function.  This stack space consists of the regions listed below.  In most cases, these regions are allocated in the order listed, with the last listed region closest to the top of the stack (the lowest address if STACK_GROWS_DOWNWARD is defined, and the highest address if it is not defined).  You can use a different order for a machine if doing so is more convenient or required for compatibility reasons.  Except in cases where required by standard or by a debugger, there is no reason why the stack layout used by GCC need agree with that used by other compilers for a machine.

 -- Target Hook: void TARGET_ASM_FUNCTION_END_PROLOGUE (FILE *FILE)
     If defined, a function that outputs assembler code at the end of a prologue.  This should be used when the function prologue is being emitted as RTL, and you have some extra assembler that needs to be emitted.  See prologue instruction pattern.

 -- Target Hook: void TARGET_ASM_FUNCTION_BEGIN_EPILOGUE (FILE *FILE)
     If defined, a function that outputs assembler code at the start of an epilogue.  This should be used when the function epilogue is being emitted as RTL, and you have some extra assembler that needs to be emitted.  See epilogue instruction pattern.

 -- Target Hook: void TARGET_ASM_FUNCTION_EPILOGUE (FILE *FILE, HOST_WIDE_INT SIZE)
     If defined, a function that outputs the assembler code for exit from a function.  The epilogue is responsible for restoring the saved registers and stack pointer to their values when the function was called, and returning control to the caller.  This macro takes the same arguments as the macro TARGET_ASM_FUNCTION_PROLOGUE, and the registers to restore are determined from regs_ever_live and CALL_USED_REGISTERS in the same way.

     On some machines, there is a single instruction that does all the work of returning from the function.  On these machines, give that instruction the name return and do not define the macro TARGET_ASM_FUNCTION_EPILOGUE at all.

     Do not define a pattern named return if you want the TARGET_ASM_FUNCTION_EPILOGUE to be used.  If you want the target switches to control whether return instructions or epilogues are used, define a return pattern with a validity condition that tests the target switches appropriately.  If the return pattern's validity condition is false, epilogues will be used.

     On machines where functions may or may not have frame-pointers, the function exit code must vary accordingly.  Sometimes the code for these two cases is completely different.  To determine whether a frame pointer is wanted, the macro can refer to the variable frame_pointer_needed.  The variable's value will be 1 when compiling a function that needs a frame pointer.

     Normally, TARGET_ASM_FUNCTION_PROLOGUE and TARGET_ASM_FUNCTION_EPILOGUE must treat leaf functions specially. The C variable current_function_is_leaf is nonzero for such a function.  See 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 given -mrtd pops arguments in functions that take a fixed number of arguments.

     Your definition of the macro RETURN_POPS_ARGS decides which functions pop their own arguments.  TARGET_ASM_FUNCTION_EPILOGUE needs to know what was decided.  The number of bytes of the current function's arguments that this function should pop is available in crtl->args.pops_args.  See Scalar Return.

  * A region of crtl->args.pretend_args_size bytes of uninitialized space just underneath the first argument arriving on the stack.  (This may not be at the very start of the allocated stack region if the calling sequence has pushed anything else since pushing the stack arguments.  But usually, on such machines, nothing else has been pushed yet, because the function prologue itself does all the pushing.)  This region is used on machines where an argument may be passed partly in registers and partly in memory, and, in some cases to support the features in <stdarg.h>.

  * An area of memory used to save certain registers used by the function. The size of this area, which may also include space for such things as the return address and pointers to previous stack frames, is machine-specific and usually depends on which registers have been used in the function.  Machines with register windows often do not require a save area.

  * A region of at least SIZE bytes, possibly rounded up to an allocation boundary, to contain the local variables of the function.  On some machines, this region and the save area may occur in the opposite order, with the save area closer to the top of the stack.

  * Optionally, when ACCUMULATE_OUTGOING_ARGS is defined, a region of crtl->outgoing_args_size bytes to be used for outgoing argument lists of the function.  See Stack Arguments.

 -- Macro: EXIT_IGNORE_STACK
     Define this macro as a C expression that is nonzero if the return instruction or the function epilogue ignores the value of the stack pointer; in other words, if it is safe to delete an instruction to adjust the stack pointer before a return from the function.  The default is 0.

     Note that this macro's value is relevant only for functions for which frame pointers are maintained.  It is never safe to delete a final stack adjustment in a function that has no frame pointer, and the compiler knows this regardless of EXIT_IGNORE_STACK.

 -- Macro: EPILOGUE_USES (REGNO)
     Define this macro as a C expression that is nonzero for registers that are used by the epilogue or the return pattern.  The stack and frame pointer registers are already assumed to be used as needed.

 -- Macro: EH_USES (REGNO)
     Define this macro as a C expression that is nonzero for registers that are used by the exception handling mechanism, and so should be considered live on entry to an exception edge.

 -- Target Hook: void TARGET_ASM_OUTPUT_MI_THUNK (FILE *FILE, tree THUNK_FNDECL, HOST_WIDE_INT DELTA, HOST_WIDE_INT VCALL_OFFSET, tree FUNCTION)
     A function that outputs the assembler code for a thunk function, used to implement C++ virtual function calls with multiple inheritance.  The thunk acts as a wrapper around a virtual function, adjusting the implicit object parameter before handing control off to the real function.

     First, emit code to add the integer DELTA to the location that contains the incoming first argument.  Assume that this argument contains a pointer, and is the one used to pass the this pointer in C++.  This is the incoming argument before the function prologue, e.g. %o0 on a sparc.  The addition must preserve the values of all other incoming arguments.

     Then, if VCALL_OFFSET is nonzero, an additional adjustment should be made after adding delta.  In particular, if P is the adjusted pointer, the following adjustment should be made:

          p += (*((ptrdiff_t **)p))[vcall_offset/sizeof(ptrdiff_t)]

     After the additions, emit code to jump to FUNCTION, which is a FUNCTION_DECL.  This is a direct pure jump, not a call, and does not touch the return address.  Hence returning from FUNCTION will return to whoever called the current thunk.

     The effect must be as if FUNCTION had been called directly with the adjusted first argument.  This macro is responsible for emitting all of the code for a thunk function; TARGET_ASM_FUNCTION_PROLOGUE and TARGET_ASM_FUNCTION_EPILOGUE are not invoked.

     The THUNK_FNDECL is redundant.  (DELTA and FUNCTION have already been extracted from it.)  It might possibly be useful on some targets, but probably not.

     If you do not define this macro, the target-independent code in the C++ front end will generate a less efficient heavyweight thunk that calls FUNCTION instead of jumping to it.  The generic approach does not support varargs.

 -- Target Hook: bool TARGET_ASM_CAN_OUTPUT_MI_THUNK (const_tree THUNK_FNDECL, HOST_WIDE_INT DELTA, HOST_WIDE_INT VCALL_OFFSET, const_tree FUNCTION)
     A function that returns true if TARGET_ASM_OUTPUT_MI_THUNK would be able to output the assembler code for the thunk function specified by the arguments it is passed, and false otherwise.  In the latter case, the generic approach will be used by the C++ front end, with the limitations previously exposed.

Generating Code for Profiling
-----------------------------

These macros will help you generate code for profiling.

 -- Macro: FUNCTION_PROFILER (FILE, LABELNO)
     A C statement or compound statement to output to FILE some assembler code to call the profiling subroutine mcount.

     The details of how mcount expects to be called are 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.

     Older implementations of mcount expect the address of a counter variable to be loaded into some register.  The name of this variable is LP followed by the number LABELNO, so you would generate the name using LP%d in a fprintf.

 -- Macro: PROFILE_HOOK
     A C statement or compound statement to output to FILE some assembly code to call the profiling subroutine mcount even the target does not support profiling.

 -- Macro: NO_PROFILE_COUNTERS
     Define this macro to be an expression with a nonzero value if the mcount subroutine on your system does not need a counter variable allocated for each function.  This is true for almost all modern implementations.  If you define this macro, you must not use the LABELNO argument to FUNCTION_PROFILER.

 -- Macro: PROFILE_BEFORE_PROLOGUE
     Define this macro if the code for function profiling should come before the function prologue.  Normally, the profiling code comes after.

Permitting tail calls
---------------------

 -- Target Hook: bool TARGET_FUNCTION_OK_FOR_SIBCALL (tree DECL, tree EXP)
     True if it is ok to do sibling call optimization for the specified call expression EXP.  DECL will be the called function, or NULL if this is an indirect call.

     It is not uncommon for limitations of calling conventions to prevent tail calls to functions outside the current unit of translation, or during PIC compilation.  The hook is used to enforce these restrictions, as the sibcall md pattern can not fail, or fall over to a ``normal'' call.  The criteria for successful sibling call optimization may vary greatly between different architectures.

 -- Target Hook: void TARGET_EXTRA_LIVE_ON_ENTRY (bitmap REGS)
     Add any hard registers to REGS that are live on entry to the function.  This hook only needs to be defined to provide registers that cannot be found by examination of FUNCTION_ARG_REGNO_P, the callee saved registers, STATIC_CHAIN_INCOMING_REGNUM, STATIC_CHAIN_REGNUM, TARGET_STRUCT_VALUE_RTX, FRAME_POINTER_REGNUM, EH_USES, FRAME_POINTER_REGNUM, ARG_POINTER_REGNUM, and the PIC_OFFSET_TABLE_REGNUM.

 -- Target Hook: void TARGET_SET_UP_BY_PROLOGUE (struct hard_reg_set_container *)
     This hook should add additional registers that are computed by the prologue to the hard regset for shrink-wrapping optimization purposes.

 -- Target Hook: bool TARGET_WARN_FUNC_RETURN (tree)
     True if a function's return statements should be checked for matching the function's return type.  This includes checking for falling off the end of a non-void function.  Return false if no such check should be made.

Stack smashing protection
-------------------------

 -- Target Hook: tree TARGET_STACK_PROTECT_GUARD (void)
     This hook returns a DECL node for the external variable to use for the stack protection guard.  This variable is initialized by the runtime to some random value and is used to initialize the guard value that is placed at the top of the local stack frame.  The type of this variable must be ptr_type_node.

     The default version of this hook creates a variable called __stack_chk_guard, which is normally defined in libgcc2.c.

 -- Target Hook: tree TARGET_STACK_PROTECT_FAIL (void)
     This hook returns a CALL_EXPR that alerts the runtime that the stack protect guard variable has been modified.  This expression should involve a call to a noreturn function.

     The default version of this hook invokes a function called __stack_chk_fail, taking no arguments.  This function is normally defined in libgcc2.c.

 -- Common Target Hook: bool TARGET_SUPPORTS_SPLIT_STACK (bool REPORT, struct gcc_options *OPTS)
     Whether this target supports splitting the stack when the options described in OPTS have been passed.  This is called after options have been parsed, so the target may reject splitting the stack in some configurations.  The default version of this hook returns false.  If REPORT is true, this function may issue a warning or error; if REPORT is false, it must simply return a value

Implementing the Varargs Macros
===============================

GCC comes with an implementation of <varargs.h> and <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 conditionals to include it.

ISO <stdarg.h> differs from traditional <varargs.h> mainly in the calling convention for va_start.  The traditional implementation takes just one argument, which is the variable in which to store the argument pointer.  The ISO implementation of va_start takes an additional second argument.  The user is supposed to write the last named argument of the function here.

However, va_start should not use this argument.  The way to find the end of the named arguments is with the built-in functions described below.

 -- Macro: __builtin_saveregs ()
     Use this built-in function to save the argument registers in memory so that the varargs mechanism can access them.  Both ISO and traditional versions of va_start must use __builtin_saveregs, unless you use TARGET_SETUP_INCOMING_VARARGS (see below) instead.

     On some machines, __builtin_saveregs is open-coded under the control of the target hook TARGET_EXPAND_BUILTIN_SAVEREGS.  On other machines, it calls a routine written in assembler language, found in libgcc2.c.

     Code generated for the call to __builtin_saveregs appears at the beginning of the function, as opposed to where the call to __builtin_saveregs is written, regardless of what the code is. This is because the registers must be saved before the function starts to use them for its own purposes.

 -- Macro: __builtin_next_arg (LASTARG)
     This builtin returns the address of the first anonymous stack argument, as type void *.  If ARGS_GROW_DOWNWARD, it returns the address of the location above the first anonymous stack argument.  Use it in va_start to initialize the pointer for fetching arguments from the stack.  Also use it in va_start to verify that the second parameter LASTARG is the last named argument of the current function.

 -- Macro: __builtin_classify_type (OBJECT)
     Since each machine has its own conventions for which data types are passed in which kind of register, your implementation of va_arg has to embody these conventions.  The easiest way to categorize the specified data type is to use __builtin_classify_type together with sizeof and __alignof__.

     __builtin_classify_type ignores the value of OBJECT, considering only its data type.  It returns an integer describing what kind of type that is---integer, floating, pointer, structure, and so on.

     The file typeclass.h defines an enumeration that you can use to interpret the values of __builtin_classify_type.

These machine description macros help implement varargs:

 -- Target Hook: rtx TARGET_EXPAND_BUILTIN_SAVEREGS (void)
     If defined, this hook produces the machine-specific code for a call to __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 __builtin_saveregs.

 -- Target Hook: void TARGET_SETUP_INCOMING_VARARGS (cumulative_args_t ARGS_SO_FAR, enum machine_mode MODE, tree TYPE, int *PRETEND_ARGS_SIZE, int SECOND_TIME)
     This target hook offers an alternative to using __builtin_saveregs and defining the hook TARGET_EXPAND_BUILTIN_SAVEREGS.  Use it to store the anonymous register arguments into the stack so that all the arguments appear to have been passed consecutively on the stack.  Once this is done, you can use the standard implementation of varargs that works for machines that pass all their arguments on the stack.

     The argument ARGS_SO_FAR points to the CUMULATIVE_ARGS data structure, containing the values that are obtained after processing the named arguments.  The arguments MODE and TYPE describe the last named argument---its machine mode and its data type as a tree node.

     The target hook should do two things: first, push onto the stack all the argument registers not used for the named arguments, and second, store the size of the data thus pushed into the int-valued variable pointed to by PRETEND_ARGS_SIZE.  The value that you store here will serve as additional offset for setting up the stack frame.

     Because you must generate code to push the anonymous arguments at compile time without knowing their data types, TARGET_SETUP_INCOMING_VARARGS is only useful on machines that have just a single category of argument register and use it uniformly for all data types.

     If the argument SECOND_TIME is nonzero, it means that the arguments of the function are being analyzed for the second time.  This happens for an inline function, which is not actually compiled until the end of the source file.  The hook TARGET_SETUP_INCOMING_VARARGS should not generate any instructions in this case.

 -- Target Hook: bool TARGET_STRICT_ARGUMENT_NAMING (cumulative_args_t CA)
     Define this hook to return true if the location where a function argument is passed depends on whether or not it is a named argument.

     This hook controls how the NAMED argument to TARGET_FUNCTION_ARG is set for varargs and stdarg functions.  If this hook returns true, the NAMED argument is always true for named arguments, and false for unnamed arguments.  If it returns false, but TARGET_PRETEND_OUTGOING_VARARGS_NAMED returns true, then all arguments are treated as named.  Otherwise, all named arguments except the last are treated as named.

     You need not define this hook if it always returns false.

 -- Target Hook: bool TARGET_PRETEND_OUTGOING_VARARGS_NAMED (cumulative_args_t CA)
     If you need to conditionally change ABIs so that one works with TARGET_SETUP_INCOMING_VARARGS, but the other works like neither TARGET_SETUP_INCOMING_VARARGS nor TARGET_STRICT_ARGUMENT_NAMING was defined, then define this hook to return true if TARGET_SETUP_INCOMING_VARARGS is used, false otherwise. Otherwise, you should not define this hook.

Trampolines for Nested Functions
================================

A 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 GCC how to generate code to allocate and initialize a trampoline.

The instructions in the trampoline must do two things: load a constant address into the static chain register, and jump to the real address of the nested function.  On CISC machines such as the m68k, this requires two instructions, a move immediate and a jump.  Then the two addresses exist in the trampoline as word-long immediate operands.  On RISC machines, it is often necessary to load each address into a register in two parts.  Then pieces of each address form separate immediate operands.

The code generated to initialize the trampoline must store the variable parts---the static chain value and the function address---into the immediate operands of the instructions.  On a CISC machine, this is simply a matter of copying each address to a memory reference at the proper offset from the start of the trampoline.  On a RISC machine, it may be necessary to take out pieces of the address and store them separately.

 -- Target Hook: void TARGET_ASM_TRAMPOLINE_TEMPLATE (FILE *F)
     This hook is called by assemble_trampoline_template to output, on the stream F, assembler code for a block of data that contains the constant parts of a trampoline.  This code should not include a label---the label is taken care of automatically.

     If you do not define this hook, it means no template is needed for the target.  Do not define this hook on systems where the block move code to copy the trampoline into place would be larger than the code to generate it on the spot.

 -- Macro: TRAMPOLINE_SECTION
     Return the section into which the trampoline template is to be placed (see Sections).  The default value is readonly_data_section.

 -- Macro: TRAMPOLINE_SIZE
     A C expression for the size in bytes of the trampoline, as an integer.

 -- Macro: TRAMPOLINE_ALIGNMENT
     Alignment required for trampolines, in bits.

     If you don't define this macro, the value of FUNCTION_ALIGNMENT is used for aligning trampolines.

 -- Target Hook: void TARGET_TRAMPOLINE_INIT (rtx M_TRAMP, tree FNDECL, rtx STATIC_CHAIN)
     This hook is called to initialize a trampoline. M_TRAMP is an RTX for the memory block for the trampoline; FNDECL is the FUNCTION_DECL for the nested function; STATIC_CHAIN is an RTX for the static chain value that should be passed to the function when it is called.

     If the target defines TARGET_ASM_TRAMPOLINE_TEMPLATE, then the first thing this hook should do is emit a block move into M_TRAMP from the memory block returned by assemble_trampoline_template. Note that the block move need only cover the constant parts of the trampoline.  If the target isolates the variable parts of the trampoline to the end, not all TRAMPOLINE_SIZE bytes need be copied.

     If the target requires any other actions, such as flushing caches or enabling stack execution, these actions should be performed after initializing the trampoline proper.

 -- Target Hook: rtx TARGET_TRAMPOLINE_ADJUST_ADDRESS (rtx ADDR)
     This hook should perform any machine-specific adjustment in the address of the trampoline.  Its argument contains the address of the memory block that was passed to TARGET_TRAMPOLINE_INIT.  In case the address to be used for a function call should be different from the address at which the template was stored, the different address should be returned; otherwise ADDR should be returned unchanged. If this hook is not defined, ADDR will be used for function calls.

Implementing trampolines is difficult on many machines because they have separate instruction and data caches.  Writing into a stack location fails to clear the memory in the instruction cache, so when the program jumps to that location, it executes the old contents.

Here are two possible solutions.  One is to clear the relevant parts of the instruction cache whenever a trampoline is set up.  The other is to make all trampolines identical, by having them jump to a standard subroutine.  The former technique makes trampoline execution faster; the latter makes initialization faster.

To clear the instruction cache when a trampoline is initialized, define the following macro.

 -- Macro: CLEAR_INSN_CACHE (BEG, END)
     If defined, expands to a C expression clearing the instruction cache in the specified interval.  The definition of this macro would typically be a series of asm statements.  Both BEG and END are both pointer expressions.

To use a standard subroutine, define the following macro.  In addition, you must make sure that the instructions in a trampoline fill an entire cache line with identical instructions, or else ensure that the beginning of the trampoline code is always aligned at the same point in its cache line.  Look in m68k.h as a guide.

 -- Macro: TRANSFER_FROM_TRAMPOLINE
     Define this macro if trampolines need a special subroutine to do their work.  The macro should expand to a series of asm statements which will be compiled with GCC.  They go in a library function named __transfer_from_trampoline.

     If you need to avoid executing the ordinary prologue code of a compiled C function when you jump to the subroutine, you can do so by placing a special label of your own in the assembler code.  Use one asm statement to generate an assembler label, and another to make the label global.  Then trampolines can use that label to jump directly to your special assembler code.

Implicit Calls to Library Routines
==================================

Here is an explanation of implicit calls to library routines.

 -- Macro: DECLARE_LIBRARY_RENAMES
     This macro, if defined, should expand to a piece of C code that will get expanded when compiling functions for libgcc.a.  It can be used to provide alternate names for GCC's internal library functions if there are ABI-mandated names that the compiler should provide.

 -- Target Hook: void TARGET_INIT_LIBFUNCS (void)
     This hook should declare additional library routines or rename existing ones, using the functions set_optab_libfunc and init_one_libfunc defined in optabs.c. init_optabs calls this macro after initializing all the normal library routines.

     The default is to do nothing.  Most ports don't need to define this hook.

 -- Target Hook: bool TARGET_LIBFUNC_GNU_PREFIX
     If false (the default), internal library routines start with two underscores.  If set to true, these routines start with __gnu_ instead.  E.g., __muldi3 changes to __gnu_muldi3.  This currently only affects functions defined in libgcc2.c.  If this is set to true, the tm.h file must also #define LIBGCC2_GNU_PREFIX.

 -- Macro: FLOAT_LIB_COMPARE_RETURNS_BOOL (MODE, COMPARISON)
     This macro should return true if the library routine that implements the floating point comparison operator COMPARISON in mode MODE will return a boolean, and FALSE if it will return a tristate.

     GCC's own floating point libraries return tristates from the comparison operators, so the default returns false always.  Most ports don't need to define this macro.

 -- Macro: TARGET_LIB_INT_CMP_BIASED
     This macro should evaluate to true if the integer comparison functions (like __cmpdi2) return 0 to indicate that the first operand is smaller than the second, 1 to indicate that they are equal, and 2 to indicate that the first operand is greater than the second. If this macro evaluates to false the comparison functions return -1, 0, and 1 instead of 0, 1, and 2.  If the target uses the routines in libgcc.a, you do not need to define this macro.

 -- Macro: TARGET_EDOM
     The value of EDOM on the target machine, as a C integer constant expression.  If you don't define this macro, GCC does not attempt to deposit the value of EDOM into errno directly.  Look in /usr/include/errno.h to find the value of EDOM on your system.

     If you do not define TARGET_EDOM, then compiled code reports domain errors by calling the library function and letting it report the error.  If mathematical functions on your system use matherr when there is an error, then you should leave TARGET_EDOM undefined so that matherr is used normally.

 -- Macro: GEN_ERRNO_RTX
     Define this macro as a C expression to create an rtl expression that refers to the global ``variable'' errno.  (On certain systems, errno may not actually be a variable.)  If you don't define this macro, a reasonable default is used.

 -- Macro: TARGET_C99_FUNCTIONS
     When this macro is nonzero, GCC will implicitly optimize sin calls into sinf and similarly for other functions defined by C99 standard.  The default is zero because a number of existing systems lack support for these functions in their runtime so this macro needs to be redefined to one on systems that do support the C99 runtime.

 -- Macro: TARGET_HAS_SINCOS
     When this macro is nonzero, GCC will implicitly optimize calls to sin and cos with the same argument to a call to sincos.  The default is zero.  The target has to provide the following functions:

          void sincos(double x, double *sin, double *cos);
          void sincosf(float x, float *sin, float *cos);
          void sincosl(long double x, long double *sin, long double *cos);

 -- Macro: NEXT_OBJC_RUNTIME
     Set this macro to 1 to use the "NeXT" Objective-C message sending conventions by default.  This calling convention involves passing the object, the selector and the method arguments all at once to the method-lookup library function. This is the usual setting when targeting Darwin/Mac OS X systems, which have the NeXT runtime installed.

     If the macro is set to 0, the "GNU" Objective-C message sending convention will be used by default.  This convention passes just the object and the selector to the method-lookup function, which returns a pointer to the method.

     In either case, it remains possible to select code-generation for the alternate scheme, by means of compiler command line switches.

Addressing Modes
================

This is about addressing modes.

 -- Macro: HAVE_PRE_INCREMENT
 -- Macro: HAVE_PRE_DECREMENT
 -- Macro: HAVE_POST_INCREMENT
 -- Macro: HAVE_POST_DECREMENT
     A C expression that is nonzero if the machine supports pre-increment, pre-decrement, post-increment, or post-decrement addressing respectively.

 -- Macro: HAVE_PRE_MODIFY_DISP
 -- Macro: HAVE_POST_MODIFY_DISP
     A C expression that is nonzero if the machine supports pre- or post-address side-effect generation involving constants other than the size of the memory operand.

 -- Macro: HAVE_PRE_MODIFY_REG
 -- Macro: HAVE_POST_MODIFY_REG
     A C expression that is nonzero if the machine supports pre- or post-address side-effect generation involving a register displacement.

 -- Macro: CONSTANT_ADDRESS_P (X)
     A C expression that is 1 if the RTX X is a constant which is a valid address.  On most machines the default definition of (CONSTANT_P (X) && GET_CODE (X) != CONST_DOUBLE) is acceptable, but a few machines are more restrictive as to which constant addresses are supported.

 -- Macro: CONSTANT_P (X)
     CONSTANT_P, which is defined by target-independent code, accepts integer-values expressions whose values are not explicitly known, such as symbol_ref, label_ref, and high expressions and const arithmetic expressions, in addition to const_int and const_double expressions.

 -- Macro: MAX_REGS_PER_ADDRESS
     A number, the maximum number of registers that can appear in a valid memory address.  Note that it is up to you to specify a value equal to the maximum number that TARGET_LEGITIMATE_ADDRESS_P would ever accept.

 -- Target Hook: bool TARGET_LEGITIMATE_ADDRESS_P (enum machine_mode MODE, rtx X, bool STRICT)
     A function that returns whether X (an RTX) is a legitimate memory address on the target machine for a memory operand of mode MODE.

     Legitimate addresses are defined in two variants: a strict variant and a non-strict one.  The STRICT parameter chooses which variant is desired by the caller.

     The strict variant is used in the reload pass.  It must be defined so that any pseudo-register that has not been allocated a hard register is considered a memory reference.  This is because in contexts where some kind of register is required, a pseudo-register with no hard register must be rejected.  For non-hard registers, the strict variant should look up the reg_renumber array; it should then proceed using the hard register number in the array, or treat the pseudo as a memory reference if the array holds -1.

     The non-strict variant is used in other passes.  It must be defined to accept all pseudo-registers in every context where some kind of register is required.

     Normally, constant addresses which are the sum of a symbol_ref and an integer are stored inside a const RTX to mark them as constant.  Therefore, there is no need to recognize such sums specifically as legitimate addresses.  Normally you would simply recognize any const as legitimate.

     Usually PRINT_OPERAND_ADDRESS is not prepared to handle constant sums that are not marked with  const.  It assumes that a naked plus indicates indexing.  If so, then you must reject such naked constant sums as illegitimate addresses, so that none of them will be given to PRINT_OPERAND_ADDRESS.

     On some machines, whether a symbolic address is legitimate depends on the section that the address refers to.  On these machines, define the target hook TARGET_ENCODE_SECTION_INFO to store the information into the symbol_ref, and then check for it here.  When you see a const, you will have to look inside it to find the symbol_ref in order to determine the section.  See Assembler Format.

     Some ports are still using a deprecated legacy substitute for this hook, the GO_IF_LEGITIMATE_ADDRESS macro.  This macro has this syntax:

          #define GO_IF_LEGITIMATE_ADDRESS (MODE, X, LABEL)

     and should goto LABEL if the address X is a valid address on the target machine for a memory operand of mode MODE.

     Compiler source files that want to use the strict variant of this macro define the macro REG_OK_STRICT.  You should use an #ifdef REG_OK_STRICT conditional to define the strict variant in that case and the non-strict variant otherwise.

     Using the hook is usually simpler because it limits the number of files that are recompiled when changes are made.

 -- Macro: TARGET_MEM_CONSTRAINT
     A single character to be used instead of the default 'm' character for general memory addresses.  This defines the constraint letter which matches the memory addresses accepted by TARGET_LEGITIMATE_ADDRESS_P.  Define this macro if you want to support new address formats in your back end without changing the semantics of the 'm' constraint.  This is necessary in order to preserve functionality of inline assembly constructs using the 'm' constraint.

 -- Macro: FIND_BASE_TERM (X)
     A C expression to determine the base term of address X, or to provide a simplified version of X from which alias.c can easily find the base term.  This macro is used in only two places: find_base_value and find_base_term in alias.c.

     It is always safe for this macro to not be defined.  It exists so that alias analysis can understand machine-dependent addresses.

     The typical use of this macro is to handle addresses containing a label_ref or symbol_ref within an UNSPEC.

 -- Target Hook: rtx TARGET_LEGITIMIZE_ADDRESS (rtx X, rtx OLDX, enum machine_mode MODE)
     This hook is given an invalid memory address X for an operand of mode MODE and should try to return a valid memory address.

     X will always be the result of a call to break_out_memory_refs, and OLDX will be the operand that was given to that function to produce X.

     The code of the hook should not alter the substructure of X.  If it transforms X into a more legitimate form, it should return the new X.

     It is not necessary for this hook to come up with a legitimate address, with the exception of native TLS addresses (see Emulated TLS). The compiler has standard ways of doing so in all cases.  In fact, if the target supports only emulated TLS, it is safe to omit this hook or make it return X if it cannot find a valid way to legitimize the address.  But often a machine-dependent strategy can generate better code.

 -- Macro: LEGITIMIZE_RELOAD_ADDRESS (X, MODE, OPNUM, TYPE, IND_LEVELS, WIN)
     A C compound statement that attempts to replace X, which is an address that needs reloading, with a valid memory address for an operand of mode MODE.  WIN will be a C statement label elsewhere in the code. It is not necessary to define this macro, but it might be useful for performance reasons.

     For example, on the i386, it is sometimes possible to use a single reload register instead of two by reloading a sum of two pseudo registers into a register.  On the other hand, for number of RISC processors offsets are limited so that often an intermediate address needs to be generated in order to address a stack slot.  By defining LEGITIMIZE_RELOAD_ADDRESS appropriately, the intermediate addresses generated for adjacent some stack slots can be made identical, and thus be shared.

     Note: This macro should be used with caution.  It is necessary to know something of how reload works in order to effectively use this, and it is quite easy to produce macros that build in too much knowledge of reload internals.

     Note: This macro must be able to reload an address created by a previous invocation of this macro.  If it fails to handle such addresses then the compiler may generate incorrect code or abort.

     The macro definition should use push_reload to indicate parts that need reloading; OPNUM, TYPE and IND_LEVELS are usually suitable to be passed unaltered to push_reload.

     The code generated by this macro must not alter the substructure of X.  If it transforms X into a more legitimate form, it should assign X (which will always be a C variable) a new value. This also applies to parts that you change indirectly by calling push_reload.

     The macro definition may use strict_memory_address_p to test if the address has become legitimate.

     If you want to change only a part of X, one standard way of doing this is to use copy_rtx.  Note, however, that it unshares only a single level of rtl.  Thus, if the part to be changed is not at the top level, you'll need to replace first the top level. It is not necessary for this macro to come up with a legitimate address;  but often a machine-dependent strategy can generate better code.

 -- Target Hook: bool TARGET_MODE_DEPENDENT_ADDRESS_P (const_rtx ADDR, addr_space_t ADDRSPACE)
     This hook returns true if memory address ADDR in address space ADDRSPACE can have different meanings depending on the machine mode of the memory reference it is used for or if the address is valid for some modes but not others.

     Autoincrement and autodecrement addresses typically have mode-dependent effects because the amount of the increment or decrement is the size of the operand being addressed.  Some machines have other mode-dependent addresses.  Many RISC machines have no mode-dependent addresses.

     You may assume that ADDR is a valid address for the machine.

     The default version of this hook returns false.

 -- Target Hook: bool TARGET_LEGITIMATE_CONSTANT_P (enum machine_mode MODE, rtx X)
     This hook returns true if X is a legitimate constant for a MODE-mode immediate operand on the target machine.  You can assume that X satisfies CONSTANT_P, so you need not check this.

     The default definition returns true.

 -- Target Hook: rtx TARGET_DELEGITIMIZE_ADDRESS (rtx X)
     This hook is used to undo the possibly obfuscating effects of the LEGITIMIZE_ADDRESS and LEGITIMIZE_RELOAD_ADDRESS target macros.  Some backend implementations of these macros wrap symbol references inside an UNSPEC rtx to represent PIC or similar addressing modes.  This target hook allows GCC's optimizers to understand the semantics of these opaque UNSPECs by converting them back into their original form.

 -- Target Hook: bool TARGET_CONST_NOT_OK_FOR_DEBUG_P (rtx X)
     This hook should return true if X should not be emitted into debug sections.

 -- Target Hook: bool TARGET_CANNOT_FORCE_CONST_MEM (enum machine_mode MODE, rtx X)
     This hook should return true if X is of a form that cannot (or should not) be spilled to the constant pool.  MODE is the mode of X.

     The default version of this hook returns false.

     The primary reason to define this hook is to prevent reload from deciding that a non-legitimate constant would be better reloaded from the constant pool instead of spilling and reloading a register holding the constant.  This restriction is often true of addresses of TLS symbols for various targets.

 -- Target Hook: bool TARGET_USE_BLOCKS_FOR_CONSTANT_P (enum machine_mode MODE, const_rtx X)
     This hook should return true if pool entries for constant X can be placed in an object_block structure.  MODE is the mode of X.

     The default version returns false for all constants.

 -- Target Hook: bool TARGET_USE_BLOCKS_FOR_DECL_P (const_tree DECL)
     This hook should return true if pool entries for DECL should be placed in an object_block structure.

     The default version returns true for all decls.

 -- Target Hook: tree TARGET_BUILTIN_RECIPROCAL (unsigned FN, bool MD_FN, bool SQRT)
     This hook should return the DECL of a function that implements reciprocal of the builtin function with builtin function code FN, or NULL_TREE if such a function is not available.  MD_FN is true when FN is a code of a machine-dependent builtin function.  When SQRT is true, additional optimizations that apply only to the reciprocal of a square root function are performed, and only reciprocals of sqrt function are valid.

 -- Target Hook: tree TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD (void)
     This hook should return the DECL of a function F that given an address ADDR as an argument returns a mask M that can be used to extract from two vectors the relevant data that resides in ADDR in case ADDR is not properly aligned.

     The autovectorizer, when vectorizing a load operation from an address ADDR that may be unaligned, will generate two vector loads from the two aligned addresses around ADDR. It then generates a REALIGN_LOAD operation to extract the relevant data from the two loaded vectors. The first two arguments to REALIGN_LOAD, V1 and V2, are the two vectors, each of size VS, and the third argument, OFF, defines how the data will be extracted from these two vectors: if OFF is 0, then the returned vector is V2; otherwise, the returned vector is composed from the last VS-OFF elements of V1 concatenated to the first OFF elements of V2.

     If this hook is defined, the autovectorizer will generate a call to F (using the DECL tree that this hook returns) and will use the return value of F as the argument OFF to REALIGN_LOAD. Therefore, the mask M returned by F should comply with the semantics expected by REALIGN_LOAD described above. If this hook is not defined, then ADDR will be used as the argument OFF to REALIGN_LOAD, in which case the low log2(VS) - 1 bits of ADDR will be considered.

 -- Target Hook: int TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST (enum vect_cost_for_stmt TYPE_OF_COST, tree VECTYPE, int MISALIGN)
     Returns cost of different scalar or vector statements for vectorization cost model. For vector memory operations the cost may depend on type (VECTYPE) and misalignment value (MISALIGN).

 -- Target Hook: bool TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE (const_tree TYPE, bool IS_PACKED)
     Return true if vector alignment is reachable (by peeling N iterations) for the given type.

 -- Target Hook: bool TARGET_VECTORIZE_VEC_PERM_CONST_OK (enum MACHINE_MODE, const unsigned char *SEL)
     Return true if a vector created for vec_perm_const is valid.

 -- Target Hook: tree TARGET_VECTORIZE_BUILTIN_CONVERSION (unsigned CODE, tree DEST_TYPE, tree SRC_TYPE)
     This hook should return the DECL of a function that implements conversion of the input vector of type SRC_TYPE to type DEST_TYPE. The value of CODE is one of the enumerators in enum tree_code and specifies how the conversion is to be applied (truncation, rounding, etc.).

     If this hook is defined, the autovectorizer will use the TARGET_VECTORIZE_BUILTIN_CONVERSION target hook when vectorizing conversion. Otherwise, it will return NULL_TREE.

 -- Target Hook: tree TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION (tree FNDECL, tree VEC_TYPE_OUT, tree VEC_TYPE_IN)
     This hook should return the decl of a function that implements the vectorized variant of the builtin function with builtin function code CODE or NULL_TREE if such a function is not available. The value of FNDECL is the builtin function declaration.  The return type of the vectorized function shall be of vector type VEC_TYPE_OUT and the argument types should be VEC_TYPE_IN.

 -- Target Hook: bool TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT (enum machine_mode MODE, const_tree TYPE, int MISALIGNMENT, bool IS_PACKED)
     This hook should return true if the target supports misaligned vector store/load of a specific factor denoted in the MISALIGNMENT parameter.  The vector store/load should be of machine mode MODE and the elements in the vectors should be of type TYPE.  IS_PACKED parameter is true if the memory access is defined in a packed struct.

 -- Target Hook: enum machine_mode TARGET_VECTORIZE_PREFERRED_SIMD_MODE (enum machine_mode MODE)
     This hook should return the preferred mode for vectorizing scalar mode MODE.  The default is equal to word_mode, because the vectorizer can do some transformations even in absence of specialized SIMD hardware.

 -- Target Hook: unsigned int TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_SIZES (void)
     This hook should return a mask of sizes that should be iterated over after trying to autovectorize using the vector size derived from the mode returned by TARGET_VECTORIZE_PREFERRED_SIMD_MODE. The default is zero which means to not iterate over other vector sizes.

 -- Target Hook: void * TARGET_VECTORIZE_INIT_COST (struct loop *LOOP_INFO)
     This hook should initialize target-specific data structures in preparation for modeling the costs of vectorizing a loop or basic block.  The default allocates three unsigned integers for accumulating costs for the prologue, body, and epilogue of the loop or basic block.  If LOOP_INFO is non-NULL, it identifies the loop being vectorized; otherwise a single block is being vectorized.

 -- Target Hook: unsigned TARGET_VECTORIZE_ADD_STMT_COST (void *DATA, int COUNT, enum vect_cost_for_stmt KIND, struct _stmt_vec_info *STMT_INFO, int MISALIGN, enum vect_cost_model_location WHERE)
     This hook should update the target-specific DATA in response to adding COUNT copies of the given KIND of statement to a loop or basic block.  The default adds the builtin vectorizer cost for the copies of the statement to the accumulator specified by WHERE, (the prologue, body, or epilogue) and returns the amount added.  The return value should be viewed as a tentative cost that may later be revised.

 -- Target Hook: void TARGET_VECTORIZE_FINISH_COST (void *DATA, unsigned *PROLOGUE_COST, unsigned *BODY_COST, unsigned *EPILOGUE_COST)
     This hook should complete calculations of the cost of vectorizing a loop or basic block based on DATA, and return the prologue, body, and epilogue costs as unsigned integers.  The default returns the value of the three accumulators.

 -- Target Hook: void TARGET_VECTORIZE_DESTROY_COST_DATA (void *DATA)
     This hook should release DATA and any related data structures allocated by TARGET_VECTORIZE_INIT_COST.  The default releases the accumulator.

 -- Target Hook: tree TARGET_VECTORIZE_BUILTIN_TM_LOAD (tree)
     This hook should return the built-in decl needed to load a vector of the given type within a transaction.

 -- Target Hook: tree TARGET_VECTORIZE_BUILTIN_TM_STORE (tree)
     This hook should return the built-in decl needed to store a vector of the given type within a transaction.

 -- Target Hook: tree TARGET_VECTORIZE_BUILTIN_GATHER (const_tree MEM_VECTYPE, const_tree INDEX_TYPE, int SCALE)
     Target builtin that implements vector gather operation.  MEM_VECTYPE is the vector type of the load and INDEX_TYPE is scalar type of the index, scaled by SCALE. The default is NULL_TREE which means to not vectorize gather loads.

Anchored Addresses
==================

GCC usually addresses every static object as a separate entity. For example, if we have:

     static int a, b, c;
     int foo (void) { return a + b + c; }

the code for foo will usually calculate three separate symbolic addresses: those of a, b and c.  On some targets, it would be better to calculate just one symbolic address and access the three variables relative to it.  The equivalent pseudocode would be something like:

     int foo (void)
     {
       register int *xr = &x;
       return xr[&a - &x] + xr[&b - &x] + xr[&c - &x];
     }

(which isn't valid C).  We refer to shared addresses like x as ``section anchors''.  Their use is controlled by -fsection-anchors.

The hooks below describe the target properties that GCC needs to know in order to make effective use of section anchors.  It won't use section anchors at all unless either TARGET_MIN_ANCHOR_OFFSET or TARGET_MAX_ANCHOR_OFFSET is set to a nonzero value.

 -- Target Hook: HOST_WIDE_INT TARGET_MIN_ANCHOR_OFFSET
     The minimum offset that should be applied to a section anchor. On most targets, it should be the smallest offset that can be applied to a base register while still giving a legitimate address for every mode.  The default value is 0.

 -- Target Hook: HOST_WIDE_INT TARGET_MAX_ANCHOR_OFFSET
     Like TARGET_MIN_ANCHOR_OFFSET, but the maximum (inclusive) offset that should be applied to section anchors.  The default value is 0.

 -- Target Hook: void TARGET_ASM_OUTPUT_ANCHOR (rtx X)
     Write the assembly code to define section anchor X, which is a SYMBOL_REF for which SYMBOL_REF_ANCHOR_P (X) is true. The hook is called with the assembly output position set to the beginning of SYMBOL_REF_BLOCK (X).

     If ASM_OUTPUT_DEF is available, the hook's default definition uses it to define the symbol as . + SYMBOL_REF_BLOCK_OFFSET (X). If ASM_OUTPUT_DEF is not available, the hook's default definition is NULL, which disables the use of section anchors altogether.

 -- Target Hook: bool TARGET_USE_ANCHORS_FOR_SYMBOL_P (const_rtx X)
     Return true if GCC should attempt to use anchors to access SYMBOL_REF X.  You can assume SYMBOL_REF_HAS_BLOCK_INFO_P (X) and !SYMBOL_REF_ANCHOR_P (X).

     The default version is correct for most targets, but you might need to intercept this hook to handle things like target-specific attributes or target-specific sections.

Condition Code Status
=====================

The macros in this section can be split in two families, according to the two ways of representing condition codes in GCC.

The first representation is the so called (cc0) representation (see Jump Patterns), where all instructions can have an implicit clobber of the condition codes.  The second is the condition code register representation, which provides better schedulability for architectures that do have a condition code register, but on which most instructions do not affect it.  The latter category includes most RISC machines.

The implicit clobbering poses a strong restriction on the placement of the definition and use of the condition code, which need to be in adjacent insns for machines using (cc0).  This can prevent important optimizations on some machines.  For example, on the IBM RS/6000, there is a delay for taken branches unless the condition code register is set three instructions earlier than the conditional branch.  The instruction scheduler cannot perform this optimization if it is not permitted to separate the definition and use of the condition code register.

For this reason, it is possible and suggested to use a register to represent the condition code for new ports.  If there is a specific condition code register in the machine, use a hard register.  If the condition code or comparison result can be placed in any general register, or if there are multiple condition registers, use a pseudo register. Registers used to store the condition code value will usually have a mode that is in class MODE_CC.

Alternatively, you can use BImode if the comparison operator is specified already in the compare instruction.  In this case, you are not interested in most macros in this section.

Representation of condition codes using (cc0)
---------------------------------------------

The file conditions.h defines a variable cc_status to describe how the condition code was computed (in case the interpretation of the condition code depends on the instruction that it was set by).  This variable contains the RTL expressions on which the condition code is currently based, and several standard flags.

Sometimes additional machine-specific flags must be defined in the machine description header file.  It can also add additional machine-specific information by defining CC_STATUS_MDEP.

 -- Macro: CC_STATUS_MDEP
     C code for a data type which is used for declaring the mdep component of cc_status.  It defaults to int.

     This macro is not used on machines that do not use cc0.

 -- Macro: CC_STATUS_MDEP_INIT
     A C expression to initialize the mdep field to ``empty''. The default definition does nothing, since most machines don't use the field anyway.  If you want to use the field, you should probably define this macro to initialize it.

     This macro is not used on machines that do not use cc0.

 -- Macro: NOTICE_UPDATE_CC (EXP, INSN)
     A C compound statement to set the components of cc_status appropriately for an insn INSN whose body is EXP.  It is this macro's responsibility to recognize insns that set the condition code as a byproduct of other activity as well as those that explicitly set (cc0).

     This macro is not used on machines that do not use cc0.

     If there are insns that do not set the condition code but do alter other machine registers, this macro must check to see whether they invalidate the expressions that the condition code is recorded as reflecting.  For example, on the 68000, insns that store in address registers do not set the condition code, which means that usually NOTICE_UPDATE_CC can leave cc_status unaltered for such insns.  But suppose that the previous insn set the condition code based on location a4@(102) and the current insn stores a new value in a4.  Although the condition code is not changed by this, it will no longer be true that it reflects the contents of a4@(102).  Therefore, NOTICE_UPDATE_CC must alter cc_status in this case to say that nothing is known about the condition code value.

     The definition of NOTICE_UPDATE_CC must be prepared to deal with the results of peephole optimization: insns whose patterns are parallel RTXs containing various reg, mem or constants which are just the operands.  The RTL structure of these insns is not sufficient to indicate what the insns actually do.  What NOTICE_UPDATE_CC should do when it sees one is just to run CC_STATUS_INIT.

     A possible definition of NOTICE_UPDATE_CC is to call a function that looks at an attribute (see Insn Attributes) named, for example, cc.  This avoids having detailed information about patterns in two places, the md file and in NOTICE_UPDATE_CC.

Representation of condition codes using registers
-------------------------------------------------

 -- Macro: SELECT_CC_MODE (OP, X, Y)
     On many machines, the condition code may be produced by other instructions than compares, for example the branch can use directly the condition code set by a subtract instruction.  However, on some machines when the condition code is set this way some bits (such as the overflow bit) are not set in the same way as a test instruction, so that a different branch instruction must be used for some conditional branches.  When this happens, use the machine mode of the condition code register to record different formats of the condition code register.  Modes can also be used to record which compare instruction (e.g. a signed or an unsigned comparison) produced the condition codes.

     If other modes than CCmode are required, add them to MACHINE-modes.def and define SELECT_CC_MODE to choose a mode given an operand of a compare.  This is needed because the modes have to be chosen not only during RTL generation but also, for example, by instruction combination.  The result of SELECT_CC_MODE should be consistent with the mode used in the patterns; for example to support the case of the add on the SPARC discussed above, we have the pattern

          (define_insn ""
            [(set (reg:CC_NOOV 0)
                  (compare:CC_NOOV
                    (plus:SI (match_operand:SI 0 "register_operand" "%r")
                             (match_operand:SI 1 "arith_operand" "rI"))
                    (const_int 0)))]
            ""
            "...")

     together with a SELECT_CC_MODE that returns CC_NOOVmode for comparisons whose argument is a plus:

          #define SELECT_CC_MODE(OP,X,Y) \
            (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT          \
             ? ((OP == EQ || OP == NE) ? CCFPmode : CCFPEmode)    \
             : ((GET_CODE (X) == PLUS || GET_CODE (X) == MINUS    \
                 || GET_CODE (X) == NEG) \
                ? CC_NOOVmode : CCmode))

     Another reason to use modes is to retain information on which operands were used by the comparison; see REVERSIBLE_CC_MODE later in this section.

     You should define this macro if and only if you define extra CC modes in MACHINE-modes.def.

 -- Target Hook: void TARGET_CANONICALIZE_COMPARISON (int *CODE, rtx *OP0, rtx *OP1, bool OP0_PRESERVE_VALUE) (CODE, OP0, OP1, OP0_PRESERVE_VALUE)
     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 GT comparison, but you can use an LT comparison instead and swap the order of the operands.

     On such machines, implement this hook to do any required conversions. CODE is the initial comparison code and OP0 and OP1 are the left and right operands of the comparison, respectively.  If OP0_PRESERVE_VALUE is true the implementation is not allowed to change the value of OP0 since the value might be used in RTXs which aren't comparisons.  E.g. the implementation is not allowed to swap operands in that case.

     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 md file.

     You need not to implement this hook if it would never change the comparison code or operands.

 -- Macro: REVERSIBLE_CC_MODE (MODE)
     A C expression whose value is one if it is always safe to reverse a comparison whose mode is MODE.  If SELECT_CC_MODE can ever return MODE for a floating-point inequality comparison, then REVERSIBLE_CC_MODE (MODE) must be zero.

     You need not define this macro if it would always returns zero or if the floating-point format is anything other than IEEE_FLOAT_FORMAT. For example, here is the definition used on the SPARC, where floating-point inequality comparisons are always given CCFPEmode:

          #define REVERSIBLE_CC_MODE(MODE)  ((MODE) != CCFPEmode)

 -- Macro: REVERSE_CONDITION (CODE, MODE)
     A C expression whose value is reversed condition code of the CODE for comparison done in CC_MODE MODE.  The macro is used only in case REVERSIBLE_CC_MODE (MODE) is nonzero.  Define this macro in case machine has some non-standard way how to reverse certain conditionals.  For instance in case all floating point conditions are non-trapping, compiler may freely convert unordered compares to ordered one.  Then definition may look like:

          #define REVERSE_CONDITION(CODE, MODE) \
             ((MODE) != CCFPmode ? reverse_condition (CODE) \
              : reverse_condition_maybe_unordered (CODE))

 -- Target Hook: bool TARGET_FIXED_CONDITION_CODE_REGS (unsigned int *P1, unsigned int *P2)
     On targets which do not use (cc0), and which use a hard register rather than a pseudo-register to hold condition codes, the regular CSE passes are often not able to identify cases in which the hard register is set to a common value.  Use this hook to enable a small pass which optimizes such cases.  This hook should return true to enable this pass, and it should set the integers to which its arguments point to the hard register numbers used for condition codes. When there is only one such register, as is true on most systems, the integer pointed to by P2 should be set to INVALID_REGNUM.

     The default version of this hook returns false.

 -- Target Hook: enum machine_mode TARGET_CC_MODES_COMPATIBLE (enum machine_mode M1, enum machine_mode M2)
     On targets which use multiple condition code modes in class MODE_CC, it is sometimes the case that a comparison can be validly done in more than one mode.  On such a system, define this target hook to take two mode arguments and to return a mode in which both comparisons may be validly done.  If there is no such mode, return VOIDmode.

     The default version of this hook checks whether the modes are the same.  If they are, it returns that mode.  If they are different, it returns VOIDmode.

Macros to control conditional execution
---------------------------------------

There is one macro that may need to be defined for targets supporting conditional execution, independent of how they represent conditional branches.

Describing Relative Costs of Operations
=======================================

These macros let you describe the relative speed of various operations on the target machine.

 -- Macro: REGISTER_MOVE_COST (MODE, FROM, TO)
     A C expression for the cost of moving data of mode MODE from a register in class FROM to one in class TO.  The classes are expressed using the enumeration values such as GENERAL_REGS.  A value of 2 is the default; other values are interpreted relative to that.

     It is not required that the cost always equal 2 when FROM is the same as TO; on some machines it is expensive to move between registers if they are not general registers.

     If reload sees an insn consisting of a single set between two hard registers, and if REGISTER_MOVE_COST applied to their classes returns a value of 2, reload does not check to ensure that the constraints of the insn are met.  Setting a cost of other than 2 will allow reload to verify that the constraints are met.  You should do this if the movM pattern's constraints do not allow such copying.

     These macros are obsolete, new ports should use the target hook TARGET_REGISTER_MOVE_COST instead.

 -- Target Hook: int TARGET_REGISTER_MOVE_COST (enum machine_mode MODE, reg_class_t FROM, reg_class_t TO)
     This target hook should return the cost of moving data of mode MODE from a register in class FROM to one in class TO.  The classes are expressed using the enumeration values such as GENERAL_REGS. A value of 2 is the default; other values are interpreted relative to that.

     It is not required that the cost always equal 2 when FROM is the same as TO; on some machines it is expensive to move between registers if they are not general registers.

     If reload sees an insn consisting of a single set between two hard registers, and if TARGET_REGISTER_MOVE_COST applied to their classes returns a value of 2, reload does not check to ensure that the constraints of the insn are met.  Setting a cost of other than 2 will allow reload to verify that the constraints are met.  You should do this if the movM pattern's constraints do not allow such copying.

     The default version of this function returns 2.

 -- Macro: MEMORY_MOVE_COST (MODE, CLASS, IN)
     A C expression for the cost of moving data of mode MODE between a register of class CLASS and memory; IN is zero if the value is to be written to memory, nonzero if it is to be read in.  This cost is relative to those in REGISTER_MOVE_COST.  If moving between 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, 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 CLASS but the reload mechanism is more complex than copying via an intermediate, define this macro to reflect the actual cost of the move.

     GCC defines the function 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 4 is not correct for your machine, define this macro to add some other value to the result of that function.  The arguments to that function are the same as to this macro.

     These macros are obsolete, new ports should use the target hook TARGET_MEMORY_MOVE_COST instead.

 -- Target Hook: int TARGET_MEMORY_MOVE_COST (enum machine_mode MODE, reg_class_t RCLASS, bool IN)
     This target hook should return the cost of moving data of mode MODE between a register of class RCLASS and memory; IN is false if the value is to be written to memory, true if it is to be read in. This cost is relative to those in TARGET_REGISTER_MOVE_COST. If moving between registers and memory is more expensive than between two registers, you should add this target hook to express the relative cost.

     If you do not add this target hook, GCC uses a default cost of 4 plus the cost of copying via a secondary reload register, if one is needed.  If your machine requires a secondary reload register to copy between memory and a register of RCLASS but the reload mechanism is more complex than copying via an intermediate, use this target hook to reflect the actual cost of the move.

     GCC defines the function 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 4 is not correct for your machine, use this target hook to add some other value to the result of that function.  The arguments to that function are the same as to this target hook.

 -- Macro: BRANCH_COST (SPEED_P, PREDICTABLE_P)
     A C expression for the cost of a branch instruction.  A value of 1 is the default; other values are interpreted relative to that. Parameter SPEED_P is true when the branch in question should be optimized for speed.  When it is false, BRANCH_COST should return a value optimal for code size rather than performance.  PREDICTABLE_P is true for well-predicted branches. On many architectures the BRANCH_COST can be reduced then.

Here are additional macros which do not specify precise relative costs, but only that certain actions are more expensive than GCC would ordinarily expect.

 -- Macro: SLOW_BYTE_ACCESS
     Define this macro as a C expression which is nonzero if accessing less than a word of memory (i.e. a char or a short) is no faster than accessing a word of memory, i.e., if such access require more than one instruction or if there is no difference in cost between byte and (aligned) word loads.

     When this macro is not defined, the compiler will access a field by finding the smallest containing object; when it is defined, a fullword load will be used if alignment permits.  Unless bytes accesses are faster than word accesses, using word accesses is preferable since it may eliminate subsequent memory access if subsequent accesses occur to other fields in the same word of the structure, but to different bytes.

 -- Macro: SLOW_UNALIGNED_ACCESS (MODE, ALIGNMENT)
     Define this macro to be the value 1 if memory accesses described by the MODE and 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 nonzero, the compiler will act as if STRICT_ALIGNMENT were nonzero when generating code for block moves.  This can cause significantly more instructions to be produced. Therefore, do not set this macro nonzero 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 this macro is defined, it should produce a nonzero value when STRICT_ALIGNMENT is nonzero.

 -- Macro: MOVE_RATIO (SPEED)
     The threshold of number of scalar memory-to-memory move insns, 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 define_expand that emits a sequence of insns, this macro counts the number of such sequences.

     The parameter SPEED is true if the code is currently being optimized for speed rather than size.

     If you don't define this, a reasonable default is used.

 -- Macro: MOVE_BY_PIECES_P (SIZE, ALIGNMENT)
     A C expression used to determine whether 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 move_by_pieces_ninsns returns less than MOVE_RATIO.

 -- Macro: MOVE_MAX_PIECES
     A C expression used by move_by_pieces to determine the largest unit a load or store used to copy memory is.  Defaults to MOVE_MAX.

 -- Macro: CLEAR_RATIO (SPEED)
     The threshold of number of scalar move insns, below which a sequence of insns should be generated to clear memory instead of a string clear insn or a library call.  Increasing the value will always make code faster, but eventually incurs high cost in increased code size.

     The parameter SPEED is true if the code is currently being optimized for speed rather than size.

     If you don't define this, a reasonable default is used.

 -- Macro: CLEAR_BY_PIECES_P (SIZE, ALIGNMENT)
     A C expression used to determine whether clear_by_pieces will be used to clear a chunk of memory, or whether some other block clear mechanism will be used.  Defaults to 1 if move_by_pieces_ninsns returns less than CLEAR_RATIO.

 -- Macro: SET_RATIO (SPEED)
     The threshold of number of scalar move insns, 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.

     The parameter SPEED is true if the code is currently being optimized for speed rather than size.

     If you don't define this, it defaults to the value of MOVE_RATIO.

 -- Macro: SET_BY_PIECES_P (SIZE, ALIGNMENT)
     A C expression used to determine whether 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 __builtin_memset when storing values other than constant zero. Defaults to 1 if move_by_pieces_ninsns returns less than SET_RATIO.

 -- Macro: STORE_BY_PIECES_P (SIZE, ALIGNMENT)
     A C expression used to determine whether store_by_pieces will be used to set a chunk of memory to a constant string value, or whether some other mechanism will be used.  Used by __builtin_strcpy when called with a constant source string. Defaults to 1 if move_by_pieces_ninsns returns less than MOVE_RATIO.

 -- Macro: USE_LOAD_POST_INCREMENT (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 HAVE_POST_INCREMENT.

 -- Macro: USE_LOAD_POST_DECREMENT (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 HAVE_POST_DECREMENT.

 -- Macro: USE_LOAD_PRE_INCREMENT (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 HAVE_PRE_INCREMENT.

 -- Macro: USE_LOAD_PRE_DECREMENT (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 HAVE_PRE_DECREMENT.

 -- Macro: USE_STORE_POST_INCREMENT (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 HAVE_POST_INCREMENT.

 -- Macro: USE_STORE_POST_DECREMENT (MODE)
     A C expression used to determine whether a store postdecrement is a good thing to use for a given mode.  Defaults to the value of HAVE_POST_DECREMENT.

 -- Macro: USE_STORE_PRE_INCREMENT (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 HAVE_PRE_INCREMENT.

 -- Macro: USE_STORE_PRE_DECREMENT (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 HAVE_PRE_DECREMENT.

 -- Macro: NO_FUNCTION_CSE
     Define this macro if it is as good or better to call a constant function address than to call an address kept in a register.

 -- Macro: LOGICAL_OP_NON_SHORT_CIRCUIT
     Define this macro if a non-short-circuit operation produced by fold_range_test () is optimal.  This macro defaults to true if BRANCH_COST is greater than or equal to the value 2.

 -- Target Hook: bool TARGET_RTX_COSTS (rtx X, int CODE, int OUTER_CODE, int OPNO, int *TOTAL, bool SPEED)
     This target hook describes the relative costs of RTL expressions.

     The cost may depend on the precise form of the expression, which is available for examination in X, and the fact that X appears as operand OPNO of an expression with rtx code OUTER_CODE. That is, the hook can assume that there is some rtx Y such that GET_CODE (Y) == OUTER_CODE and such that either (a) XEXP (Y, OPNO) == X or (b) XVEC (Y, OPNO) contains X.

     CODE is X's expression code---redundant, since it can be obtained with GET_CODE (X).

     In implementing this hook, you can use the construct COSTS_N_INSNS (N) to specify a cost equal to N fast instructions.

     On entry to the hook, *TOTAL contains a default estimate for the cost of the expression.  The hook should modify this value as necessary.  Traditionally, the default costs are COSTS_N_INSNS (5) for multiplications, COSTS_N_INSNS (7) for division and modulus operations, and COSTS_N_INSNS (1) for all other operations.

     When optimizing for code size, i.e. when speed is false, this target hook should be used to estimate the relative size cost of an expression, again relative to COSTS_N_INSNS.

     The hook returns true when all subexpressions of X have been processed, and false when rtx_cost should recurse.

 -- Target Hook: int TARGET_ADDRESS_COST (rtx ADDRESS, enum machine_mode MODE, addr_space_t AS, bool SPEED)
     This hook computes the cost of an addressing mode that contains ADDRESS.  If not defined, the cost is computed from the ADDRESS expression and the TARGET_RTX_COST hook.

     For most CISC machines, the default cost is a good approximation of the true cost of the addressing mode.  However, on RISC machines, all instructions normally have the same length and execution time.  Hence all addresses will have equal costs.

     In cases where more than one form of an address is known, the form with the lowest cost will be used.  If multiple forms have the same, lowest, cost, the one that is the most complex will be used.

     For example, suppose an address that is equal to the sum of a register and a constant is used twice in the same basic block.  When this macro is not defined, the address will be computed in a register and memory references will be indirect through that register.  On machines where the cost of the addressing mode containing the sum is no higher than that of a simple indirect reference, this will produce an additional instruction and possibly require an additional register.  Proper specification of this macro eliminates this overhead for such machines.

     This hook is never called with an invalid address.

     On machines where an address involving more than one register is as cheap as an address computation involving only one register, defining TARGET_ADDRESS_COST to reflect this can cause two registers to be live over a region of code where only one would have been if TARGET_ADDRESS_COST were not defined in that manner.  This effect should be considered in the definition of this macro.  Equivalent costs should probably only be given to addresses with different numbers of registers on machines with lots of registers.

Adjusting the Instruction Scheduler
===================================

The instruction scheduler may need a fair amount of machine-specific adjustment in order to produce good code.  GCC provides several target hooks for this purpose.  It is usually enough to define just a few of them: try the first ones in this list first.

 -- Target Hook: int TARGET_SCHED_ISSUE_RATE (void)
     This hook returns the maximum number of instructions that can ever issue at the same time on the target machine.  The default is one. Although the insn scheduler can define itself the possibility of issue an insn on the same cycle, the value can serve as an additional constraint to issue insns on the same simulated processor cycle (see hooks TARGET_SCHED_REORDER and TARGET_SCHED_REORDER2). This value must be constant over the entire compilation.  If you need it to vary depending on what the instructions are, you must use TARGET_SCHED_VARIABLE_ISSUE.

 -- Target Hook: int TARGET_SCHED_VARIABLE_ISSUE (FILE *FILE, int VERBOSE, rtx INSN, int MORE)
     This hook is executed by the scheduler after it has scheduled an insn from the ready list.  It should return the number of insns which can still be issued in the current cycle.  The default is MORE - 1 for insns other than CLOBBER and USE, which normally are not counted against the issue rate. You should define this hook if some insns take more machine resources than others, so that fewer insns can follow them in the same cycle. FILE is either a null pointer, or a stdio stream to write any debug output to.  VERBOSE is the verbose level provided by -fsched-verbose-N.  INSN is the instruction that was scheduled.

 -- Target Hook: int TARGET_SCHED_ADJUST_COST (rtx INSN, rtx LINK, rtx DEP_INSN, int COST)
     This function corrects the value of COST based on the relationship between INSN and DEP_INSN through the dependence LINK.  It should return the new value.  The default is to make no adjustment to COST.  This can be used for example to specify to the scheduler using the traditional pipeline description that an output- or anti-dependence does not incur the same cost as a data-dependence.  If the scheduler using the automaton based pipeline description, the cost of anti-dependence is zero and the cost of output-dependence is maximum of one and the difference of latency times of the first and the second insns.  If these values are not acceptable, you could use the hook to modify them too.  See also Processor pipeline description.

 -- Target Hook: int TARGET_SCHED_ADJUST_PRIORITY (rtx INSN, int PRIORITY)
     This hook adjusts the integer scheduling priority PRIORITY of INSN.  It should return the new priority.  Increase the priority to execute INSN earlier, reduce the priority to execute INSN later.  Do not define this hook if you do not need to adjust the scheduling priorities of insns.

 -- Target Hook: int TARGET_SCHED_REORDER (FILE *FILE, int VERBOSE, rtx *READY, int *N_READYP, int CLOCK)
     This hook 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 VLIW machines). FILE is either a null pointer, or a stdio stream to write any debug output to.  VERBOSE is the verbose level provided by -fsched-verbose-N.  READY is a pointer to the ready list of instructions that are ready to be scheduled.  N_READYP is a pointer to the number of elements in the ready list.  The scheduler reads the ready list in reverse order, starting with READY[*N_READYP - 1] and going to READY[0].  CLOCK is the timer tick of the scheduler.  You may modify the ready list and the number of ready insns.  The return value is the number of insns that can issue this cycle; normally this is just issue_rate.  See also TARGET_SCHED_REORDER2.

 -- Target Hook: int TARGET_SCHED_REORDER2 (FILE *FILE, int VERBOSE, rtx *READY, int *N_READYP, int CLOCK)
     Like TARGET_SCHED_REORDER, but called at a different time.  That function is called whenever the scheduler starts a new cycle.  This one is called once per iteration over a cycle, immediately after TARGET_SCHED_VARIABLE_ISSUE; it can reorder the ready list and return the number of insns to be scheduled in the same cycle.  Defining this hook can be useful if there are frequent situations where scheduling one insn causes other insns to become ready in the same cycle.  These other insns can then be taken into account properly.

 -- Target Hook: void TARGET_SCHED_DEPENDENCIES_EVALUATION_HOOK (rtx HEAD, rtx TAIL)
     This hook is called after evaluation forward dependencies of insns in chain given by two parameter values (HEAD and TAIL correspondingly) but before insns scheduling of the insn chain.  For example, it can be used for better insn classification if it requires analysis of dependencies.  This hook can use backward and forward dependencies of the insn scheduler because they are already calculated.

 -- Target Hook: void TARGET_SCHED_INIT (FILE *FILE, int VERBOSE, int MAX_READY)
     This hook is executed by the scheduler at the beginning of each block of instructions that are to be scheduled.  FILE is either a null pointer, or a stdio stream to write any debug output to.  VERBOSE is the verbose level provided by -fsched-verbose-N. MAX_READY is the maximum number of insns in the current scheduling region that can be live at the same time.  This can be used to allocate scratch space if it is needed, e.g. by TARGET_SCHED_REORDER.

 -- Target Hook: void TARGET_SCHED_FINISH (FILE *FILE, int VERBOSE)
     This hook is executed by the scheduler at the end of each block of instructions that are to be scheduled.  It can be used to perform cleanup of any actions done by the other scheduling hooks.  FILE is either a null pointer, or a stdio stream to write any debug output to.  VERBOSE is the verbose level provided by -fsched-verbose-N.

 -- Target Hook: void TARGET_SCHED_INIT_GLOBAL (FILE *FILE, int VERBOSE, int OLD_MAX_UID)
     This hook is executed by the scheduler after function level initializations. FILE is either a null pointer, or a stdio stream to write any debug output to. VERBOSE is the verbose level provided by -fsched-verbose-N. OLD_MAX_UID is the maximum insn uid when scheduling begins.

 -- Target Hook: void TARGET_SCHED_FINISH_GLOBAL (FILE *FILE, int VERBOSE)
     This is the cleanup hook corresponding to TARGET_SCHED_INIT_GLOBAL. FILE is either a null pointer, or a stdio stream to write any debug output to. VERBOSE is the verbose level provided by -fsched-verbose-N.

 -- Target Hook: rtx TARGET_SCHED_DFA_PRE_CYCLE_INSN (void)
     The hook returns an RTL insn.  The automaton state used in the pipeline hazard recognizer is changed as if the insn were scheduled when the new simulated processor cycle starts.  Usage of the hook may simplify the automaton pipeline description for some VLIW processors.  If the hook is defined, it is used only for the automaton based pipeline description.  The default is not to change the state when the new simulated processor cycle starts.

 -- Target Hook: void TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN (void)
     The hook can be used to initialize data used by the previous hook.

 -- Target Hook: rtx TARGET_SCHED_DFA_POST_CYCLE_INSN (void)
     The hook is analogous to TARGET_SCHED_DFA_PRE_CYCLE_INSN but used to changed the state as if the insn were scheduled when the new simulated processor cycle finishes.

 -- Target Hook: void TARGET_SCHED_INIT_DFA_POST_CYCLE_INSN (void)
     The hook is analogous to TARGET_SCHED_INIT_DFA_PRE_CYCLE_INSN but used to initialize data used by the previous hook.

 -- Target Hook: void TARGET_SCHED_DFA_PRE_ADVANCE_CYCLE (void)
     The hook to notify target that the current simulated cycle is about to finish. The hook is analogous to TARGET_SCHED_DFA_PRE_CYCLE_INSN but used to change the state in more complicated situations - e.g., when advancing state on a single insn is not enough.

 -- Target Hook: void TARGET_SCHED_DFA_POST_ADVANCE_CYCLE (void)
     The hook to notify target that new simulated cycle has just started. The hook is analogous to TARGET_SCHED_DFA_POST_CYCLE_INSN but used to change the state in more complicated situations - e.g., when advancing state on a single insn is not enough.

 -- Target Hook: int TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD (void)
     This hook controls better choosing an insn from the ready insn queue for the DFA-based insn scheduler.  Usually the scheduler chooses the first insn from the queue.  If the hook returns a positive value, an additional scheduler code tries all permutations of TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD () subsequent ready insns to choose an insn whose issue will result in maximal number of issued insns on the same cycle.  For the VLIW processor, the code could actually solve the problem of packing simple insns into the VLIW insn.  Of course, if the rules of VLIW packing are described in the automaton.

     This code also could be used for superscalar RISC processors.  Let us consider a superscalar RISC processor with 3 pipelines.  Some insns can be executed in pipelines A or B, some insns can be executed only in pipelines B or C, and one insn can be executed in pipeline B.  The processor may issue the 1st insn into A and the 2nd one into B.  In this case, the 3rd insn will wait for freeing B until the next cycle.  If the scheduler issues the 3rd insn the first, the processor could issue all 3 insns per cycle.

     Actually this code demonstrates advantages of the automaton based pipeline hazard recognizer.  We try quickly and easy many insn schedules to choose the best one.

     The default is no multipass scheduling.

 -- Target Hook: int TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD (rtx INSN)

     This hook controls what insns from the ready insn queue will be considered for the multipass insn scheduling.  If the hook returns zero for INSN, the insn will be not chosen to be issued.

     The default is that any ready insns can be chosen to be issued.

 -- Target Hook: void TARGET_SCHED_FIRST_CYCLE_MULTIPASS_BEGIN (void *DATA, char *READY_TRY, int N_READY, bool FIRST_CYCLE_INSN_P)
     This hook prepares the target backend for a new round of multipass scheduling.

 -- Target Hook: void TARGET_SCHED_FIRST_CYCLE_MULTIPASS_ISSUE (void *DATA, char *READY_TRY, int N_READY, rtx INSN, const void *PREV_DATA)
     This hook is called when multipass scheduling evaluates instruction INSN.

 -- Target Hook: void TARGET_SCHED_FIRST_CYCLE_MULTIPASS_BACKTRACK (const void *DATA, char *READY_TRY, int N_READY)
     This is called when multipass scheduling backtracks from evaluation of an instruction.

 -- Target Hook: void TARGET_SCHED_FIRST_CYCLE_MULTIPASS_END (const void *DATA)
     This hook notifies the target about the result of the concluded current round of multipass scheduling.

 -- Target Hook: void TARGET_SCHED_FIRST_CYCLE_MULTIPASS_INIT (void *DATA)
     This hook initializes target-specific data used in multipass scheduling.

 -- Target Hook: void TARGET_SCHED_FIRST_CYCLE_MULTIPASS_FINI (void *DATA)
     This hook finalizes target-specific data used in multipass scheduling.

 -- Target Hook: int TARGET_SCHED_DFA_NEW_CYCLE (FILE *DUMP, int VERBOSE, rtx INSN, int LAST_CLOCK, int CLOCK, int *SORT_P)
     This hook is called by the insn scheduler before issuing INSN on cycle CLOCK.  If the hook returns nonzero, INSN is not issued on this processor cycle.  Instead, the processor cycle is advanced.  If *SORT_P is zero, the insn ready queue is not sorted on the new cycle start as usually.  DUMP and VERBOSE specify the file and verbosity level to use for debugging output. LAST_CLOCK and CLOCK are, respectively, the processor cycle on which the previous insn has been issued, and the current processor cycle.

 -- Target Hook: bool TARGET_SCHED_IS_COSTLY_DEPENDENCE (struct _dep *_DEP, int COST, int DISTANCE)
     This hook is used to define which dependences are considered costly by the target, so costly that it is not advisable to schedule the insns that are involved in the dependence too close to one another.  The parameters to this hook are as follows:  The first parameter _DEP is the dependence being evaluated.  The second parameter COST is the cost of the dependence as estimated by the scheduler, and the third parameter DISTANCE is the distance in cycles between the two insns. The hook returns true if considering the distance between the two insns the dependence between them is considered costly by the target, and false otherwise.

     Defining this hook can be useful in multiple-issue out-of-order machines, where (a) it's practically hopeless to predict the actual data/resource delays, however: (b) there's a better chance to predict the actual grouping that will be formed, and (c) correctly emulating the grouping can be very important.  In such targets one may want to allow issuing dependent insns closer to one another---i.e., closer than the dependence distance;  however, not in cases of ``costly dependences'', which this hooks allows to define.

 -- Target Hook: void TARGET_SCHED_H_I_D_EXTENDED (void)
     This hook is called by the insn scheduler after emitting a new instruction to the instruction stream.  The hook notifies a target backend to extend its per instruction data structures.

 -- Target Hook: void * TARGET_SCHED_ALLOC_SCHED_CONTEXT (void)
     Return a pointer to a store large enough to hold target scheduling context.

 -- Target Hook: void TARGET_SCHED_INIT_SCHED_CONTEXT (void *TC, bool CLEAN_P)
     Initialize store pointed to by TC to hold target scheduling context. It CLEAN_P is true then initialize TC as if scheduler is at the beginning of the block.  Otherwise, copy the current context into TC.

 -- Target Hook: void TARGET_SCHED_SET_SCHED_CONTEXT (void *TC)
     Copy target scheduling context pointed to by TC to the current context.

 -- Target Hook: void TARGET_SCHED_CLEAR_SCHED_CONTEXT (void *TC)
     Deallocate internal data in target scheduling context pointed to by TC.

 -- Target Hook: void TARGET_SCHED_FREE_SCHED_CONTEXT (void *TC)
     Deallocate a store for target scheduling context pointed to by TC.

 -- Target Hook: int TARGET_SCHED_SPECULATE_INSN (rtx INSN, int REQUEST, rtx *NEW_PAT)
     This hook is called by the insn scheduler when INSN has only speculative dependencies and therefore can be scheduled speculatively. The hook is used to check if the pattern of INSN has a speculative version and, in case of successful check, to generate that speculative pattern.  The hook should return 1, if the instruction has a speculative form, or -1, if it doesn't.  REQUEST describes the type of requested speculation.  If the return value equals 1 then NEW_PAT is assigned the generated speculative pattern.

 -- Target Hook: bool TARGET_SCHED_NEEDS_BLOCK_P (int DEP_STATUS)
     This hook is called by the insn scheduler during generation of recovery code for INSN.  It should return true, if the corresponding check instruction should branch to recovery code, or false otherwise.

 -- Target Hook: rtx TARGET_SCHED_GEN_SPEC_CHECK (rtx INSN, rtx LABEL, int MUTATE_P)
     This hook is called by the insn scheduler to generate a pattern for recovery check instruction.  If MUTATE_P is zero, then INSN is a speculative instruction for which the check should be generated. LABEL is either a label of a basic block, where recovery code should be emitted, or a null pointer, when requested check doesn't branch to recovery code (a simple check).  If MUTATE_P is nonzero, then a pattern for a branchy check corresponding to a simple check denoted by INSN should be generated.  In this case LABEL can't be null.

 -- Target Hook: bool TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC (const_rtx INSN)
     This hook is used as a workaround for TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD not being called on the first instruction of the ready list.  The hook is used to discard speculative instructions that stand first in the ready list from being scheduled on the current cycle.  If the hook returns false, INSN will not be chosen to be issued. For non-speculative instructions, the hook should always return true.  For example, in the ia64 backend the hook is used to cancel data speculative insns when the ALAT table is nearly full.

 -- Target Hook: void TARGET_SCHED_SET_SCHED_FLAGS (struct spec_info_def *SPEC_INFO)
     This hook is used by the insn scheduler to find out what features should be enabled/used. The structure *SPEC_INFO should be filled in by the target. The structure describes speculation types that can be used in the scheduler.

 -- Target Hook: int TARGET_SCHED_SMS_RES_MII (struct ddg *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 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.

 -- Target Hook: bool TARGET_SCHED_DISPATCH (rtx INSN, int X)
     This hook is called by Haifa Scheduler.  It returns true if dispatch scheduling is supported in hardware and the condition specified in the parameter is true.

 -- Target Hook: void TARGET_SCHED_DISPATCH_DO (rtx INSN, int X)
     This hook is called by Haifa Scheduler.  It performs the operation specified in its second parameter.

 -- Target Hook: bool TARGET_SCHED_EXPOSED_PIPELINE
     True if the processor has an exposed pipeline, which means that not just the order of instructions is important for correctness when scheduling, but also the latencies of operations.

 -- Target Hook: int TARGET_SCHED_REASSOCIATION_WIDTH (unsigned int OPC, enum machine_mode MODE)
     This hook is called by tree reassociator to determine a level of parallelism required in output calculations chain.

Dividing the Output into Sections (Texts, Data, ...)
====================================================

An object file is divided into sections containing different types of data.  In the most common case, there are three sections: the text section, which holds instructions and read-only data; the data section, which holds initialized writable data; and the bss section, which holds uninitialized data.  Some systems have other kinds of sections.

varasm.c provides several well-known sections, such as text_section, data_section and bss_section. The normal way of controlling a FOO_section variable is to define the associated FOO_SECTION_ASM_OP macro, as described below.  The macros are only read once, when varasm.c initializes itself, so their values must be run-time constants. They may however depend on command-line flags.

Note: Some run-time files, such crtstuff.c, also make use of the FOO_SECTION_ASM_OP macros, and expect them to be string literals.

Some assemblers require a different string to be written every time a section is selected.  If your assembler falls into this category, you should define the TARGET_ASM_INIT_SECTIONS hook and use get_unnamed_section to set up the sections.

You must always create a text_section, either by defining TEXT_SECTION_ASM_OP or by initializing text_section in TARGET_ASM_INIT_SECTIONS.  The same is true of data_section and DATA_SECTION_ASM_OP.  If you do not create a distinct readonly_data_section, the default is to reuse text_section.

All the other varasm.c sections are optional, and are null if the target does not provide them.

 -- Macro: TEXT_SECTION_ASM_OP
     A C expression whose value is a string, including spacing, containing the assembler operation that should precede instructions and read-only data. Normally "\t.text" is right.

 -- Macro: HOT_TEXT_SECTION_NAME
     If defined, a C string constant for the name of the section containing most frequently executed functions of the program.  If not defined, GCC will provide a default definition if the target supports named sections.

 -- Macro: UNLIKELY_EXECUTED_TEXT_SECTION_NAME
     If defined, a C string constant for the name of the section containing unlikely executed functions in the program.

 -- Macro: DATA_SECTION_ASM_OP
     A C expression whose value is a string, including spacing, containing the assembler operation to identify the following data as writable initialized data.  Normally "\t.data" is right.

 -- Macro: SDATA_SECTION_ASM_OP
     If defined, a C expression whose value is a string, including spacing, containing the assembler operation to identify the following data as initialized, writable small data.

 -- Macro: READONLY_DATA_SECTION_ASM_OP
     A C expression whose value is a string, including spacing, containing the assembler operation to identify the following data as read-only initialized data.

 -- Macro: BSS_SECTION_ASM_OP
     If defined, a C expression whose value is a string, including spacing, containing the assembler operation to identify the following data as uninitialized global data.  If not defined, and ASM_OUTPUT_ALIGNED_BSS not defined, uninitialized global data will be output in the data section if -fno-common is passed, otherwise ASM_OUTPUT_COMMON will be used.

 -- Macro: SBSS_SECTION_ASM_OP
     If defined, a C expression whose value is a string, including spacing, containing the assembler operation to identify the following data as uninitialized, writable small data.

 -- Macro: TLS_COMMON_ASM_OP
     If defined, a C expression whose value is a string containing the assembler operation to identify the following data as thread-local common data.  The default is ".tls_common".

 -- Macro: TLS_SECTION_ASM_FLAG
     If defined, a C expression whose value is a character constant containing the flag used to mark a section as a TLS section.  The default is 'T'.

 -- Macro: INIT_SECTION_ASM_OP
     If defined, a C expression whose value is a string, including spacing, containing the assembler operation to identify the following data as initialization code.  If not defined, GCC will assume such a section does not exist.  This section has no corresponding init_section variable; it is used entirely in runtime code.

 -- Macro: FINI_SECTION_ASM_OP
     If defined, a C expression whose value is a string, including spacing, containing the assembler operation to identify the following data as finalization code.  If not defined, GCC will assume such a section does not exist.  This section has no corresponding fini_section variable; it is used entirely in runtime code.

 -- Macro: INIT_ARRAY_SECTION_ASM_OP
     If defined, a C expression whose value is a string, including spacing, containing the assembler operation to identify the following data as part of the .init_array (or equivalent) section.  If not defined, GCC will assume such a section does not exist.  Do not define both this macro and INIT_SECTION_ASM_OP.

 -- Macro: FINI_ARRAY_SECTION_ASM_OP
     If defined, a C expression whose value is a string, including spacing, containing the assembler operation to identify the following data as part of the .fini_array (or equivalent) section.  If not defined, GCC will assume such a section does not exist.  Do not define both this macro and FINI_SECTION_ASM_OP.

 -- Macro: CRT_CALL_STATIC_FUNCTION (SECTION_OP, FUNCTION)
     If defined, an ASM statement that switches to a different section via SECTION_OP, calls FUNCTION, and switches back to the text section.  This is used in crtstuff.c if INIT_SECTION_ASM_OP or FINI_SECTION_ASM_OP to calls to initialization and finalization functions from the init and fini sections.  By default, this macro uses a simple function call.  Some ports need hand-crafted assembly code to avoid dependencies on registers initialized in the function prologue or to ensure that constant pools don't end up too far way in the text section.

 -- Macro: TARGET_LIBGCC_SDATA_SECTION
     If defined, a string which names the section into which small variables defined in crtstuff and libgcc should go.  This is useful when the target has options for optimizing access to small data, and you want the crtstuff and libgcc routines to be conservative in what they expect of your application yet liberal in what your application expects.  For example, for targets with a .sdata section (like MIPS), you could compile crtstuff with -G 0 so that it doesn't require small data support from your application, but use this macro to put small data into .sdata so that your application can access these variables whether it uses small data or not.

 -- Macro: FORCE_CODE_SECTION_ALIGN
     If defined, an ASM statement that aligns a code section to some arbitrary boundary.  This is used to force all fragments of the .init and .fini sections to have to same alignment and thus prevent the linker from having to add any padding.

 -- Macro: JUMP_TABLES_IN_TEXT_SECTION
     Define this macro to be an expression with a nonzero value if jump tables (for tablejump insns) should be output in the text section, along with the assembler instructions.  Otherwise, the readonly data section is used.

     This macro is irrelevant if there is no separate readonly data section.

 -- Target Hook: void TARGET_ASM_INIT_SECTIONS (void)
     Define this hook if you need to do something special to set up the varasm.c sections, or if your target has some special sections of its own that you need to create.

     GCC calls this hook after processing the command line, but before writing any assembly code, and before calling any of the section-returning hooks described below.

 -- Target Hook: int TARGET_ASM_RELOC_RW_MASK (void)
     Return a mask describing how relocations should be treated when selecting sections.  Bit 1 should be set if global relocations should be placed in a read-write section; bit 0 should be set if local relocations should be placed in a read-write section.

     The default version of this function returns 3 when -fpic is in effect, and 0 otherwise.  The hook is typically redefined when the target cannot support (some kinds of) dynamic relocations in read-only sections even in executables.

 -- Target Hook: section * TARGET_ASM_SELECT_SECTION (tree EXP, int RELOC, unsigned HOST_WIDE_INT ALIGN)
     Return the section into which EXP should be placed.  You can assume that EXP is either a VAR_DECL node or a constant of some sort.  RELOC indicates whether the initial value of EXP requires link-time relocations.  Bit 0 is set when variable contains local relocations only, while bit 1 is set for global relocations. ALIGN is the constant alignment in bits.

     The default version of this function takes care of putting read-only variables in readonly_data_section.

     See also USE_SELECT_SECTION_FOR_FUNCTIONS.

 -- Macro: USE_SELECT_SECTION_FOR_FUNCTIONS
     Define this macro if you wish TARGET_ASM_SELECT_SECTION to be called for FUNCTION_DECLs as well as for variables and constants.

     In the case of a FUNCTION_DECL, RELOC will be zero if the function has been determined to be likely to be called, and nonzero if it is unlikely to be called.

 -- Target Hook: void TARGET_ASM_UNIQUE_SECTION (tree DECL, int RELOC)
     Build up a unique section name, expressed as a STRING_CST node, and assign it to DECL_SECTION_NAME (DECL). As with TARGET_ASM_SELECT_SECTION, RELOC indicates whether the initial value of EXP requires link-time relocations.

     The default version of this function appends the symbol name to the ELF section name that would normally be used for the symbol.  For example, the function foo would be placed in .text.foo. Whatever the actual target object format, this is often good enough.

 -- Target Hook: section * TARGET_ASM_FUNCTION_RODATA_SECTION (tree DECL)
     Return the readonly data section associated with DECL_SECTION_NAME (DECL). The default version of this function selects .gnu.linkonce.r.name if the function's section is .gnu.linkonce.t.name, .rodata.name if function is in .text.name, and the normal readonly-data section otherwise.

 -- Target Hook: const char * TARGET_ASM_MERGEABLE_RODATA_PREFIX
     Usually, the compiler uses the prefix ".rodata" to construct section names for mergeable constant data.  Define this macro to override the string if a different section name should be used.

 -- Target Hook: section * TARGET_ASM_TM_CLONE_TABLE_SECTION (void)
     Return the section that should be used for transactional memory clone  tables.

 -- Target Hook: section * TARGET_ASM_SELECT_RTX_SECTION (enum machine_mode MODE, rtx X, unsigned HOST_WIDE_INT ALIGN)
     Return the section into which a constant X, of mode MODE, should be placed.  You can assume that X is some kind of constant in RTL.  The argument MODE is redundant except in the case of a const_int rtx.  ALIGN is the constant alignment in bits.

     The default version of this function takes care of putting symbolic constants in flag_pic mode in data_section and everything else in readonly_data_section.

 -- Target Hook: tree TARGET_MANGLE_DECL_ASSEMBLER_NAME (tree DECL, tree ID)
     Define this hook if you need to postprocess the assembler name generated by target-independent code.  The ID provided to this hook will be the computed name (e.g., the macro DECL_NAME of the DECL in C, or the mangled name of the DECL in C++).  The return value of the hook is an IDENTIFIER_NODE for the appropriate mangled name on your target system.  The default implementation of this hook just returns the ID provided.

 -- Target Hook: void TARGET_ENCODE_SECTION_INFO (tree DECL, rtx RTL, int NEW_DECL_P)
     Define this hook if references to a symbol or a constant must be treated differently depending on something about the variable or function named by the symbol (such as what section it is in).

     The hook is executed immediately after rtl has been created for DECL, which may be a variable or function declaration or an entry in the constant pool.  In either case, RTL is the rtl in question.  Do not use DECL_RTL (DECL) in this hook; that field may not have been initialized yet.

     In the case of a constant, it is safe to assume that the rtl is a mem whose address is a symbol_ref.  Most decls will also have this form, but that is not guaranteed.  Global register variables, for instance, will have a reg for their rtl.  (Normally the right thing to do with such unusual rtl is leave it alone.)

     The NEW_DECL_P argument will be true if this is the first time that TARGET_ENCODE_SECTION_INFO has been invoked on this decl.  It will be false for subsequent invocations, which will happen for duplicate declarations.  Whether or not anything must be done for the duplicate declaration depends on whether the hook examines DECL_ATTRIBUTES. NEW_DECL_P is always true when the hook is called for a constant.

     The usual thing for this hook to do is to record flags in the symbol_ref, using SYMBOL_REF_FLAG or SYMBOL_REF_FLAGS. Historically, the name string was modified if it was necessary to encode more than one bit of information, but this practice is now discouraged; use SYMBOL_REF_FLAGS.

     The default definition of this hook, default_encode_section_info in varasm.c, sets a number of commonly-useful bits in SYMBOL_REF_FLAGS.  Check whether the default does what you need before overriding it.

 -- Target Hook: const char * TARGET_STRIP_NAME_ENCODING (const char *NAME)
     Decode NAME and return the real name part, sans the characters that TARGET_ENCODE_SECTION_INFO may have added.

 -- Target Hook: bool TARGET_IN_SMALL_DATA_P (const_tree EXP)
     Returns true if EXP should be placed into a ``small data'' section. The default version of this hook always returns false.

 -- Target Hook: bool TARGET_HAVE_SRODATA_SECTION
     Contains the value true if the target places read-only ``small data'' into a separate section.  The default value is false.

 -- Target Hook: bool TARGET_PROFILE_BEFORE_PROLOGUE (void)
     It returns true if target wants profile code emitted before prologue.

     The default version of this hook use the target macro PROFILE_BEFORE_PROLOGUE.

 -- Target Hook: bool TARGET_BINDS_LOCAL_P (const_tree EXP)
     Returns true if EXP names an object for which name resolution rules must resolve to the current ``module'' (dynamic shared library or executable image).

     The default version of this hook implements the name resolution rules for ELF, which has a looser model of global name binding than other currently supported object file formats.

 -- Target Hook: bool TARGET_HAVE_TLS
     Contains the value true if the target supports thread-local storage. The default value is false.

Position Independent Code
=========================

This section describes macros that help implement generation of position independent code.  Simply defining these macros is not enough to generate valid PIC; you must also add support to the hook TARGET_LEGITIMATE_ADDRESS_P and to the macro PRINT_OPERAND_ADDRESS, as well as LEGITIMIZE_ADDRESS.  You must modify the definition of movsi to do something appropriate when the source operand contains a symbolic address.  You may also need to alter the handling of switch statements so that they use relative addresses.

 -- Macro: PIC_OFFSET_TABLE_REGNUM
     The register number of the register used to address a table of static data addresses in memory.  In some cases this register is defined by a processor's ``application binary interface'' (ABI).  When this macro is defined, RTL is generated for this register once, as with the stack pointer and frame pointer registers.  If this macro is not defined, it is up to the machine-dependent files to allocate such a register (if necessary).  Note that this register must be fixed when in use (e.g. when flag_pic is true).

 -- Macro: PIC_OFFSET_TABLE_REG_CALL_CLOBBERED
     A C expression that is nonzero if the register defined by PIC_OFFSET_TABLE_REGNUM is clobbered by calls.  If not defined, the default is zero.  Do not define this macro if PIC_OFFSET_TABLE_REGNUM is not defined.

 -- Macro: LEGITIMATE_PIC_OPERAND_P (X)
     A C expression that is nonzero if X is a legitimate immediate operand on the target machine when generating position independent code. You can assume that X satisfies CONSTANT_P, so you need not check this.  You can also assume FLAG_PIC is true, so you need not check it either.  You need not define this macro if all constants (including SYMBOL_REF) can be immediate operands when generating position independent code.

Defining the Output Assembler Language
======================================

This section describes macros whose principal purpose is to describe how to write instructions in assembler language---rather than what the instructions do.

The Overall Framework of an Assembler File
------------------------------------------

This describes the overall framework of an assembly file.

 -- Target Hook: void TARGET_ASM_FILE_START (void)
     Output to asm_out_file any text which the assembler expects to find at the beginning of a file.  The default behavior is controlled by two flags, documented below.  Unless your target's assembler is quite unusual, if you override the default, you should call default_file_start at some point in your target hook.  This lets other target files rely on these variables.

 -- Target Hook: bool TARGET_ASM_FILE_START_APP_OFF
     If this flag is true, the text of the macro ASM_APP_OFF will be printed as the very first line in the assembly file, unless -fverbose-asm is in effect.  (If that macro has been defined to the empty string, this variable has no effect.)  With the normal definition of ASM_APP_OFF, the effect is to notify the GNU assembler that it need not bother stripping comments or extra whitespace from its input.  This allows it to work a bit faster.

     The default is false.  You should not set it to true unless you have verified that your port does not generate any extra whitespace or comments that will cause GAS to issue errors in NO_APP mode.

 -- Target Hook: bool TARGET_ASM_FILE_START_FILE_DIRECTIVE
     If this flag is true, output_file_directive will be called for the primary source file, immediately after printing ASM_APP_OFF (if that is enabled).  Most ELF assemblers expect this to be done.  The default is false.

 -- Target Hook: void TARGET_ASM_FILE_END (void)
     Output to asm_out_file any text which the assembler expects to find at the end of a file.  The default is to output nothing.

 -- Function: void file_end_indicate_exec_stack ()
     Some systems use a common convention, the .note.GNU-stack special section, to indicate whether or not an object file relies on the stack being executable.  If your system uses this convention, you should define TARGET_ASM_FILE_END to this function.  If you need to do other things in that hook, have your hook function call this function.

 -- Target Hook: void TARGET_ASM_LTO_START (void)
     Output to asm_out_file any text which the assembler expects to find at the start of an LTO section.  The default is to output nothing.

 -- Target Hook: void TARGET_ASM_LTO_END (void)
     Output to asm_out_file any text which the assembler expects to find at the end of an LTO section.  The default is to output nothing.

 -- Target Hook: void TARGET_ASM_CODE_END (void)
     Output to asm_out_file any text which is needed before emitting unwind info and debug info at the end of a file.  Some targets emit here PIC setup thunks that cannot be emitted at the end of file, because they couldn't have unwind info then.  The default is to output nothing.

 -- Macro: ASM_COMMENT_START
     A C string constant describing how to begin a comment in the target assembler language.  The compiler assumes that the comment will end at the end of the line.

 -- Macro: ASM_APP_ON
     A C string constant for text to be output before each asm statement or group of consecutive ones.  Normally this is "#APP", which is a comment that has no effect on most assemblers but tells the GNU assembler that it must check the lines that follow for all valid assembler constructs.

 -- Macro: ASM_APP_OFF
     A C string constant for text to be output after each asm statement or group of consecutive ones.  Normally this is "#NO_APP", which tells the GNU assembler to resume making the time-saving assumptions that are valid for ordinary compiler output.

 -- Macro: ASM_OUTPUT_SOURCE_FILENAME (STREAM, NAME)
     A C statement to output COFF information or DWARF debugging information which indicates that filename NAME is the current source file to the stdio stream STREAM.

     This macro need not be defined if the standard form of output for the file format in use is appropriate.

 -- Target Hook: void TARGET_ASM_OUTPUT_SOURCE_FILENAME (FILE *FILE, const char *NAME)
     Output COFF information or DWARF debugging information which indicates that filename NAME is the current source file to the stdio stream FILE.

     This target hook need not be defined if the standard form of output for the file format in use is appropriate.

 -- Target Hook: void TARGET_ASM_OUTPUT_IDENT (const char *NAME)
     Output a string based on NAME, suitable for the #ident  directive, or the equivalent directive or pragma in non-C-family languages.  If this hook is not defined, nothing is output for the #ident  directive.

 -- Macro: OUTPUT_QUOTED_STRING (STREAM, STRING)
     A C statement to output the string STRING to the stdio stream STREAM.  If you do not call the function output_quoted_string 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.

 -- Target Hook: void TARGET_ASM_NAMED_SECTION (const char *NAME, unsigned int FLAGS, tree DECL)
     Output assembly directives to switch to section NAME.  The section should have attributes as specified by FLAGS, which is a bit mask of the SECTION_* flags defined in output.h.  If DECL is non-NULL, it is the VAR_DECL or FUNCTION_DECL with which this section is associated.

 -- Target Hook: section * TARGET_ASM_FUNCTION_SECTION (tree DECL, enum node_frequency FREQ, bool STARTUP, bool EXIT)
     Return preferred text (sub)section for function DECL. Main purpose of this function is to separate cold, normal and hot functions. STARTUP is true when function is known to be used only at startup (from static constructors or it is main()). EXIT is true when function is known to be used only at exit (from static destructors). Return NULL if function should go to default text section.

 -- Target Hook: void TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS (FILE *FILE, tree DECL, bool NEW_IS_COLD)
     Used by the target to emit any assembler directives or additional  labels needed when a function is partitioned between different  sections.  Output should be written to FILE.  The function  decl is available as DECL and the new section is `cold' if  NEW_IS_COLD is true.

 -- Common Target Hook: bool TARGET_HAVE_NAMED_SECTIONS
     This flag is true if the target supports TARGET_ASM_NAMED_SECTION. It must not be modified by command-line option processing.

 -- Target Hook: bool TARGET_HAVE_SWITCHABLE_BSS_SECTIONS
     This flag is true if we can create zeroed data by switching to a BSS section and then using ASM_OUTPUT_SKIP to allocate the space. This is true on most ELF targets.

 -- Target Hook: unsigned int TARGET_SECTION_TYPE_FLAGS (tree DECL, const char *NAME, int RELOC)
     Choose a set of section attributes for use by TARGET_ASM_NAMED_SECTION based on a variable or function decl, a section name, and whether or not the declaration's initializer may contain runtime relocations.  DECL may be null, in which case read-write data should be assumed.

     The default version of this function handles choosing code vs data, read-only vs read-write data, and flag_pic.  You should only need to override this if your target has special flags that might be set via __attribute__.

 -- Target Hook: int TARGET_ASM_RECORD_GCC_SWITCHES (print_switch_type TYPE, const char *TEXT)
     Provides the target with the ability to record the gcc command line switches that have been passed to the compiler, and options that are enabled.  The TYPE argument specifies what is being recorded. It can take the following values:

     SWITCH_TYPE_PASSED
          TEXT is a command line switch that has been set by the user.

     SWITCH_TYPE_ENABLED
          TEXT is an option which has been enabled.  This might be as a direct result of a command line switch, or because it is enabled by default or because it has been enabled as a side effect of a different command line switch.  For example, the -O2 switch enables various different individual optimization passes.

     SWITCH_TYPE_DESCRIPTIVE
          TEXT is either NULL or some descriptive text which should be ignored.  If TEXT is NULL then it is being used to warn the target hook that either recording is starting or ending.  The first time TYPE is SWITCH_TYPE_DESCRIPTIVE and TEXT is NULL, the warning is for start up and the second time the warning is for wind down.  This feature is to allow the target hook to make any necessary preparations before it starts to record switches and to perform any necessary tidying up after it has finished recording switches.

     SWITCH_TYPE_LINE_START
          This option can be ignored by this target hook.

     SWITCH_TYPE_LINE_END
          This option can be ignored by this target hook.

     The hook's return value must be zero.  Other return values may be supported in the future.

     By default this hook is set to NULL, but an example implementation is provided for ELF based targets.  Called ELF_RECORD_GCC_SWITCHES, it records the switches as ASCII text inside a new, string mergeable section in the assembler output file.  The name of the new section is provided by the TARGET_ASM_RECORD_GCC_SWITCHES_SECTION target hook.

 -- Target Hook: const char * TARGET_ASM_RECORD_GCC_SWITCHES_SECTION
     This is the name of the section that will be created by the example ELF implementation of the TARGET_ASM_RECORD_GCC_SWITCHES target hook.

Output of Data
--------------

 -- Target Hook: const char * TARGET_ASM_BYTE_OP
 -- Target Hook: const char * TARGET_ASM_ALIGNED_HI_OP
 -- Target Hook: const char * TARGET_ASM_ALIGNED_SI_OP
 -- Target Hook: const char * TARGET_ASM_ALIGNED_DI_OP
 -- Target Hook: const char * TARGET_ASM_ALIGNED_TI_OP
 -- Target Hook: const char * TARGET_ASM_UNALIGNED_HI_OP
 -- Target Hook: const char * TARGET_ASM_UNALIGNED_SI_OP
 -- Target Hook: const char * TARGET_ASM_UNALIGNED_DI_OP
 -- Target Hook: const char * TARGET_ASM_UNALIGNED_TI_OP
     These hooks specify assembly directives for creating certain kinds of integer object.  The TARGET_ASM_BYTE_OP directive creates a byte-sized object, the TARGET_ASM_ALIGNED_HI_OP one creates an aligned two-byte object, and so on.  Any of the hooks may be NULL, indicating that no suitable directive is available.

     The compiler will print these strings at the start of a new line, followed immediately by the object's initial value.  In most cases, the string should contain a tab, a pseudo-op, and then another tab.

 -- Target Hook: bool TARGET_ASM_INTEGER (rtx X, unsigned int SIZE, int ALIGNED_P)
     The assemble_integer function uses this hook to output an integer object.  X is the object's value, SIZE is its size in bytes and ALIGNED_P indicates whether it is aligned.  The function should return true if it was able to output the object.  If it returns false, assemble_integer will try to split the object into smaller parts.

     The default implementation of this hook will use the TARGET_ASM_BYTE_OP family of strings, returning false when the relevant string is NULL.

 -- Target Hook: bool TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA (FILE *FILE, rtx X)
     A target hook to recognize RTX patterns that output_addr_const can't deal with, and output assembly code to FILE corresponding to the pattern X.  This may be used to allow machine-dependent UNSPECs to appear within constants.

     If target hook fails to recognize a pattern, it must return false, so that a standard error message is printed.  If it prints an error message itself, by calling, for example, output_operand_lossage, it may just return true.

 -- Macro: ASM_OUTPUT_ASCII (STREAM, PTR, LEN)
     A C statement to output to the stdio stream STREAM an assembler instruction to assemble a string constant containing the LEN bytes at PTR.  PTR will be a C expression of type char * and LEN a C expression of type int.

     If the assembler has a .ascii pseudo-op as found in the Berkeley Unix assembler, do not define the macro ASM_OUTPUT_ASCII.

 -- Macro: ASM_OUTPUT_FDESC (STREAM, DECL, N)
     A C statement to output word N of a function descriptor for DECL.  This must be defined if TARGET_VTABLE_USES_DESCRIPTORS is defined, and is otherwise unused.

 -- Macro: CONSTANT_POOL_BEFORE_FUNCTION
     You may define this macro as a C expression.  You should define the expression to have a nonzero value if GCC should output the constant pool for a function before the code for the function, or a zero value if 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.

 -- Macro: ASM_OUTPUT_POOL_PROLOGUE (FILE, FUNNAME, FUNDECL, SIZE)
     A C statement to output assembler commands to define the start of the constant pool for a function.  FUNNAME is a string giving the name of the function.  Should the return type of the function be required, it can be obtained via FUNDECL.  SIZE is the size, in bytes, of the constant pool that will be written immediately after this call.

     If no constant-pool prefix is required, the usual case, this macro need not be defined.

 -- Macro: ASM_OUTPUT_SPECIAL_POOL_ENTRY (FILE, X, MODE, ALIGN, LABELNO, JUMPTO)
     A C statement (with or without semicolon) to output a constant in the constant pool, if it needs special treatment.  (This macro need not do anything for RTL expressions that can be output normally.)

     The argument FILE is the standard I/O stream to output the assembler code on.  X is the RTL expression for the constant to output, and MODE is the machine mode (in case X is a const_int).  ALIGN is the required alignment for the value X; you should output an assembler directive to force this much alignment.

     The argument LABELNO is a number to use in an internal label for the address of this pool entry.  The definition of this macro is responsible for outputting the label definition at the proper place. Here is how to do this:

          (*targetm.asm_out.internal_label) (FILE, "LC", LABELNO);

     When you output a pool entry specially, you should end with a goto to the label JUMPTO.  This will prevent the same pool entry from being output a second time in the usual manner.

     You need not define this macro if it would do nothing.

 -- Macro: ASM_OUTPUT_POOL_EPILOGUE (FILE FUNNAME FUNDECL SIZE)
     A C statement to output assembler commands to at the end of the constant pool for a function.  FUNNAME is a string giving the name of the function.  Should the return type of the function be required, you can obtain it via FUNDECL.  SIZE is the size, in bytes, of the 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.

 -- Macro: IS_ASM_LOGICAL_LINE_SEPARATOR (C, STR)
     Define this macro as a C expression which is nonzero if C is used as a logical line separator by the assembler.  STR points to the position in the string where 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 ; is treated as a logical line separator.

 -- Target Hook: const char * TARGET_ASM_OPEN_PAREN
 -- Target Hook: const char * TARGET_ASM_CLOSE_PAREN
     These target hooks are C string constants, describing the syntax in the assembler for grouping arithmetic expressions.  If not overridden, they default to normal parentheses, which is correct for most assemblers.

These macros are provided by real.h for writing the definitions of ASM_OUTPUT_DOUBLE and the like:

 -- Macro: REAL_VALUE_TO_TARGET_SINGLE (X, L)
 -- Macro: REAL_VALUE_TO_TARGET_DOUBLE (X, L)
 -- Macro: REAL_VALUE_TO_TARGET_LONG_DOUBLE (X, L)
 -- Macro: REAL_VALUE_TO_TARGET_DECIMAL32 (X, L)
 -- Macro: REAL_VALUE_TO_TARGET_DECIMAL64 (X, L)
 -- Macro: REAL_VALUE_TO_TARGET_DECIMAL128 (X, L)
     These translate X, of type REAL_VALUE_TYPE, to the target's floating point representation, and store its bit pattern in the variable L.  For REAL_VALUE_TO_TARGET_SINGLE and REAL_VALUE_TO_TARGET_DECIMAL32, this variable should be a simple long int.  For the others, it should be an array of long int.  The number of elements in this array is determined by the size of the desired target floating point data type: 32 bits of it go in each long int array element.  Each array element holds 32 bits of the result, even if long int is wider than 32 bits on the host machine.

     The array element values are designed so that you can print them out using fprintf in the order they should appear in the target machine's memory.

Output of Uninitialized Variables
---------------------------------

Each of the macros in this section is used to do the whole job of outputting a single uninitialized variable.

 -- Macro: ASM_OUTPUT_COMMON (STREAM, NAME, SIZE, ROUNDED)
     A C statement (sans semicolon) to output to the stdio stream STREAM the assembler definition of a common-label named NAME whose size is SIZE bytes.  The variable ROUNDED is the size rounded up to whatever alignment the caller wants.  It is possible that SIZE may be zero, for instance if a struct with no other member than a zero-length array is defined.  In this case, the backend must output a symbol definition that allocates at least one byte, both so that the address of the resulting object does not compare equal to any other, and because some object formats cannot even express the concept of a zero-sized common symbol, as that is how they represent an ordinary undefined external.

     Use the expression assemble_name (STREAM, NAME) to output the name itself; before and after that, output the additional assembler syntax for defining the name, and a newline.

     This macro controls how the assembler definitions of uninitialized common global variables are output.

 -- Macro: ASM_OUTPUT_ALIGNED_COMMON (STREAM, NAME, SIZE, ALIGNMENT)
     Like ASM_OUTPUT_COMMON except takes the required alignment as a separate, explicit argument.  If you define this macro, it is used in place of ASM_OUTPUT_COMMON, and gives you more flexibility in handling the required alignment of the variable.  The alignment is specified as the number of bits.

 -- Macro: ASM_OUTPUT_ALIGNED_DECL_COMMON (STREAM, DECL, NAME, SIZE, ALIGNMENT)
     Like ASM_OUTPUT_ALIGNED_COMMON except that DECL of the variable to be output, if there is one, or NULL_TREE if there is no corresponding variable.  If you define this macro, GCC will use it in place of both ASM_OUTPUT_COMMON and ASM_OUTPUT_ALIGNED_COMMON.  Define this macro when you need to see the variable's decl in order to chose what to output.

 -- Macro: ASM_OUTPUT_ALIGNED_BSS (STREAM, DECL, NAME, SIZE, ALIGNMENT)
     A C statement (sans semicolon) to output to the stdio stream STREAM the assembler definition of uninitialized global DECL named NAME whose size is SIZE bytes.  The variable ALIGNMENT is the alignment specified as the number of bits.

     Try to use function asm_output_aligned_bss defined in file varasm.c when defining this macro.  If unable, use the expression assemble_name (STREAM, NAME) to output the name itself; before and after that, output the additional assembler syntax for defining the name, and a newline.

     There are two ways of handling global BSS.  One is to define this macro. The other is to have TARGET_ASM_SELECT_SECTION return a switchable BSS section (see TARGET_HAVE_SWITCHABLE_BSS_SECTIONS). You do not need to do both.

     Some languages do not have common data, and require a non-common form of global BSS in order to handle uninitialized globals efficiently.  C++ is one example of this.  However, if the target does not support global BSS, the front end may choose to make globals common in order to save space in the object file.

 -- Macro: ASM_OUTPUT_LOCAL (STREAM, NAME, SIZE, ROUNDED)
     A C statement (sans semicolon) to output to the stdio stream STREAM the assembler definition of a local-common-label named NAME whose size is SIZE bytes.  The variable ROUNDED is the size rounded up to whatever alignment the caller wants.

     Use the expression assemble_name (STREAM, NAME) to output the name itself; before and after that, output the additional assembler syntax for defining the name, and a newline.

     This macro controls how the assembler definitions of uninitialized static variables are output.

 -- Macro: ASM_OUTPUT_ALIGNED_LOCAL (STREAM, NAME, SIZE, ALIGNMENT)
     Like ASM_OUTPUT_LOCAL except takes the required alignment as a separate, explicit argument.  If you define this macro, it is used in place of ASM_OUTPUT_LOCAL, and gives you more flexibility in handling the required alignment of the variable.  The alignment is specified as the number of bits.

 -- Macro: ASM_OUTPUT_ALIGNED_DECL_LOCAL (STREAM, DECL, NAME, SIZE, ALIGNMENT)
     Like ASM_OUTPUT_ALIGNED_DECL except that DECL of the variable to be output, if there is one, or NULL_TREE if there is no corresponding variable.  If you define this macro, GCC will use it in place of both ASM_OUTPUT_DECL and ASM_OUTPUT_ALIGNED_DECL.  Define this macro when you need to see the variable's decl in order to chose what to output.

Output and Generation of Labels
-------------------------------

This is about outputting labels.

 -- Macro: ASM_OUTPUT_LABEL (STREAM, NAME)
     A C statement (sans semicolon) to output to the stdio stream STREAM the assembler definition of a label named NAME. Use the expression assemble_name (STREAM, NAME) to output the name itself; before and after that, output the additional assembler syntax for defining the name, and a newline.  A default definition of this macro is provided which is correct for most systems.

 -- Macro: ASM_OUTPUT_FUNCTION_LABEL (STREAM, NAME, DECL)
     A C statement (sans semicolon) to output to the stdio stream STREAM the assembler definition of a label named NAME of a function. Use the expression assemble_name (STREAM, NAME) to output the name itself; before and after that, output the additional assembler syntax for defining the name, and a newline.  A default definition of this macro is provided which is correct for most systems.

     If this macro is not defined, then the function name is defined in the usual manner as a label (by means of ASM_OUTPUT_LABEL).

 -- Macro: ASM_OUTPUT_INTERNAL_LABEL (STREAM, NAME)
     Identical to ASM_OUTPUT_LABEL, except that NAME is known to refer to a compiler-generated label.  The default definition uses assemble_name_raw, which is like assemble_name except that it is more efficient.

 -- Macro: SIZE_ASM_OP
     A C string containing the appropriate assembler directive to specify the size of a symbol, without any arguments.  On systems that use ELF, the default (in config/elfos.h) is "\t.size\t"; on other systems, the default is not to define this macro.

     Define this macro only if it is correct to use the default definitions of ASM_OUTPUT_SIZE_DIRECTIVE and ASM_OUTPUT_MEASURED_SIZE for your system.  If you need your own custom definitions of those macros, or if you do not need explicit symbol sizes at all, do not define this macro.

 -- Macro: ASM_OUTPUT_SIZE_DIRECTIVE (STREAM, NAME, SIZE)
     A C statement (sans semicolon) to output to the stdio stream STREAM a directive telling the assembler that the size of the symbol NAME is SIZE.  SIZE is a HOST_WIDE_INT. If you define SIZE_ASM_OP, a default definition of this macro is provided.

 -- Macro: ASM_OUTPUT_MEASURED_SIZE (STREAM, NAME)
     A C statement (sans semicolon) to output to the stdio stream STREAM a directive telling the assembler to calculate the size of the symbol NAME by subtracting its address from the current address.

     If you define SIZE_ASM_OP, a default definition of this macro is provided.  The default assumes that the assembler recognizes a special . symbol as referring to the current address, and can calculate the difference between this and another symbol.  If your assembler does not recognize . or cannot do calculations with it, you will need to redefine ASM_OUTPUT_MEASURED_SIZE to use some other technique.

 -- Macro: NO_DOLLAR_IN_LABEL
     Define this macro if the assembler does not accept the character $ in label names.  By default constructors and destructors in G++ have $ in the identifiers.  If this macro is defined, . is used instead.

 -- Macro: NO_DOT_IN_LABEL
     Define this macro if the assembler does not accept the character . in label names.  By default constructors and destructors in G++ have names that use ..  If this macro is defined, these names are rewritten to avoid ..

 -- Macro: TYPE_ASM_OP
     A C string containing the appropriate assembler directive to specify the type of a symbol, without any arguments.  On systems that use ELF, the default (in config/elfos.h) is "\t.type\t"; on other systems, the default is not to define this macro.

     Define this macro only if it is correct to use the default definition of ASM_OUTPUT_TYPE_DIRECTIVE for your system.  If you need your own custom definition of this macro, or if you do not need explicit symbol types at all, do not define this macro.

 -- Macro: TYPE_OPERAND_FMT
     A C string which specifies (using printf syntax) the format of the second operand to TYPE_ASM_OP.  On systems that use ELF, the default (in config/elfos.h) is "@%s"; on other systems, the default is not to define this macro.

     Define this macro only if it is correct to use the default definition of ASM_OUTPUT_TYPE_DIRECTIVE for your system.  If you need your own custom definition of this macro, or if you do not need explicit symbol types at all, do not define this macro.

 -- Macro: ASM_OUTPUT_TYPE_DIRECTIVE (STREAM, TYPE)
     A C statement (sans semicolon) to output to the stdio stream STREAM a directive telling the assembler that the type of the symbol NAME is TYPE.  TYPE is a C string; currently, that string is always either "function" or "object", but you should not count on this.

     If you define TYPE_ASM_OP and TYPE_OPERAND_FMT, a default definition of this macro is provided.

 -- Macro: ASM_DECLARE_FUNCTION_NAME (STREAM, NAME, DECL)
     A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the name NAME of a function which is being defined.  This macro is responsible for outputting the label definition (perhaps using ASM_OUTPUT_FUNCTION_LABEL).  The argument DECL is the FUNCTION_DECL tree node representing the function.

     If this macro is not defined, then the function name is defined in the usual manner as a label (by means of ASM_OUTPUT_FUNCTION_LABEL).

     You may wish to use ASM_OUTPUT_TYPE_DIRECTIVE in the definition of this macro.

 -- Macro: ASM_DECLARE_FUNCTION_SIZE (STREAM, NAME, DECL)
     A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the size of a function which is being defined.  The argument NAME is the name of the function.  The argument DECL is the FUNCTION_DECL tree node representing the function.

     If this macro is not defined, then the function size is not defined.

     You may wish to use ASM_OUTPUT_MEASURED_SIZE in the definition of this macro.

 -- Macro: ASM_DECLARE_OBJECT_NAME (STREAM, NAME, DECL)
     A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the name NAME of an initialized variable which is being defined.  This macro must output the label definition (perhaps using ASM_OUTPUT_LABEL).  The argument DECL is the VAR_DECL tree node representing the variable.

     If this macro is not defined, then the variable name is defined in the usual manner as a label (by means of ASM_OUTPUT_LABEL).

     You may wish to use ASM_OUTPUT_TYPE_DIRECTIVE and/or ASM_OUTPUT_SIZE_DIRECTIVE in the definition of this macro.

 -- Target Hook: void TARGET_ASM_DECLARE_CONSTANT_NAME (FILE *FILE, const char *NAME, const_tree EXPR, HOST_WIDE_INT SIZE)
     A target hook to output to the stdio stream FILE any text necessary for declaring the name NAME of a constant which is being defined.  This target hook is responsible for outputting the label definition (perhaps using assemble_label).  The argument EXP is the value of the constant, and SIZE is the size of the constant in bytes.  The NAME will be an internal label.

     The default version of this target hook, define the NAME in the usual manner as a label (by means of assemble_label).

     You may wish to use ASM_OUTPUT_TYPE_DIRECTIVE in this target hook.

 -- Macro: ASM_DECLARE_REGISTER_GLOBAL (STREAM, DECL, REGNO, NAME)
     A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for claiming a register REGNO for a global variable DECL with name NAME.

     If you don't define this macro, that is equivalent to defining it to do nothing.

 -- Macro: ASM_FINISH_DECLARE_OBJECT (STREAM, DECL, TOPLEVEL, ATEND)
     A C statement (sans semicolon) to finish up declaring a variable name once the compiler has processed its initializer fully and thus has had a chance to determine the size of an array when controlled by an initializer.  This is used on systems where it's necessary to declare something about the size of the object.

     If you don't define this macro, that is equivalent to defining it to do nothing.

     You may wish to use ASM_OUTPUT_SIZE_DIRECTIVE and/or ASM_OUTPUT_MEASURED_SIZE in the definition of this macro.

 -- Target Hook: void TARGET_ASM_GLOBALIZE_LABEL (FILE *STREAM, const char *NAME)
     This target hook is a function to output to the stdio stream STREAM some commands that will make the label NAME global; that is, available for reference from other files.

     The default implementation relies on a proper definition of GLOBAL_ASM_OP.

 -- Target Hook: void TARGET_ASM_GLOBALIZE_DECL_NAME (FILE *STREAM, tree DECL)
     This target hook is a function to output to the stdio stream STREAM some commands that will make the name associated with DECL global; that is, available for reference from other files.

     The default implementation uses the TARGET_ASM_GLOBALIZE_LABEL target hook.

 -- Macro: ASM_WEAKEN_LABEL (STREAM, NAME)
     A C statement (sans semicolon) to output to the stdio stream STREAM some commands that will make the label NAME weak; that is, available for reference from other files but only used if no other definition is available.  Use the expression assemble_name (STREAM, NAME) to output the 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 or ASM_WEAKEN_DECL, GCC will not support weak symbols and you should not define the SUPPORTS_WEAK macro.

 -- Macro: ASM_WEAKEN_DECL (STREAM, DECL, NAME, VALUE)
     Combines (and replaces) the function of ASM_WEAKEN_LABEL and ASM_OUTPUT_WEAK_ALIAS, allowing access to the associated function or variable decl.  If VALUE is not NULL, this C statement should output to the stdio stream STREAM assembler code which defines (equates) the weak symbol NAME to have the value VALUE.  If VALUE is NULL, it should output commands to make NAME weak.

 -- Macro: ASM_OUTPUT_WEAKREF (STREAM, DECL, NAME, VALUE)
     Outputs a directive that enables NAME to be used to refer to symbol VALUE with weak-symbol semantics.  decl is the declaration of name.

 -- Macro: SUPPORTS_WEAK
     A preprocessor constant expression which evaluates to true if the target supports weak symbols.

     If you don't define this macro, defaults.h provides a default definition.  If either ASM_WEAKEN_LABEL or ASM_WEAKEN_DECL is defined, the default definition is 1; otherwise, it is 0.

 -- Macro: TARGET_SUPPORTS_WEAK
     A C expression which evaluates to true if the target supports weak symbols.

     If you don't define this macro, defaults.h provides a default definition.  The default definition is (SUPPORTS_WEAK).  Define this macro if you want to control weak symbol support with a compiler flag such as -melf.

 -- Macro: MAKE_DECL_ONE_ONLY (DECL)
     A C statement (sans semicolon) to mark DECL to be emitted as a public symbol such that extra copies in multiple translation units will be discarded by the linker.  Define this macro if your object file format provides support for this concept, such as the COMDAT section flags in the Microsoft Windows PE/COFF format, and this support requires changes to DECL, such as putting it in a separate section.

 -- Macro: SUPPORTS_ONE_ONLY
     A C expression which evaluates to true if the target supports one-only semantics.

     If you don't define this macro, varasm.c provides a default definition.  If MAKE_DECL_ONE_ONLY is defined, the default definition is 1; otherwise, it is 0.  Define this macro if you want to control one-only symbol support with a compiler flag, or if setting the DECL_ONE_ONLY flag is enough to mark a declaration to be emitted as one-only.

 -- Target Hook: void TARGET_ASM_ASSEMBLE_VISIBILITY (tree DECL, int VISIBILITY)
     This target hook is a function to output to ASM_OUT_FILE some commands that will make the symbol(s) associated with DECL have hidden, protected or internal visibility as specified by VISIBILITY.

 -- Macro: TARGET_WEAK_NOT_IN_ARCHIVE_TOC
     A C expression that evaluates to true if the target's linker expects that weak symbols do not appear in a static archive's table of contents. The default is 0.

     Leaving weak symbols out of an archive's table of contents means that, if a symbol will only have a definition in one translation unit and will have undefined references from other translation units, that symbol should not be weak.  Defining this macro to be nonzero will thus have the effect that certain symbols that would normally be weak (explicit template instantiations, and vtables for polymorphic classes with noninline key methods) will instead be nonweak.

     The C++ ABI requires this macro to be zero.  Define this macro for targets where full C++ ABI compliance is impossible and where linker restrictions require weak symbols to be left out of a static archive's table of contents.

 -- Macro: ASM_OUTPUT_EXTERNAL (STREAM, DECL, NAME)
     A C statement (sans semicolon) to output to the stdio stream STREAM any text necessary for declaring the name of an external symbol named NAME which is referenced in this compilation but not defined.  The value of DECL is the tree node for the declaration.

     This macro need not be defined if it does not need to output anything. The GNU assembler and most Unix assemblers don't require anything.

 -- Target Hook: void TARGET_ASM_EXTERNAL_LIBCALL (rtx SYMREF)
     This target hook is a function to output to ASM_OUT_FILE an assembler pseudo-op to declare a library function name external.  The name of the library function is given by SYMREF, which is a symbol_ref.

 -- Target Hook: void TARGET_ASM_MARK_DECL_PRESERVED (const char *SYMBOL)
     This target hook is a function to output to ASM_OUT_FILE an assembler directive to annotate SYMBOL as used.  The Darwin target uses the .no_dead_code_strip directive.

 -- Macro: ASM_OUTPUT_LABELREF (STREAM, NAME)
     A C statement (sans semicolon) to output to the stdio stream STREAM a reference in assembler syntax to a label named NAME.  This should add _ to the front of the name, if that is customary on your operating system, as it is in most Berkeley Unix systems.  This macro is used in assemble_name.

 -- Target Hook: tree TARGET_MANGLE_ASSEMBLER_NAME (const char *NAME)
     Given a symbol NAME, perform same mangling as varasm.c's assemble_name, but in memory rather than to a file stream, returning result as an IDENTIFIER_NODE.  Required for correct LTO symtabs.  The default implementation calls the TARGET_STRIP_NAME_ENCODING hook and then prepends the USER_LABEL_PREFIX, if any.

 -- Macro: ASM_OUTPUT_SYMBOL_REF (STREAM, SYM)
     A C statement (sans semicolon) to output a reference to SYMBOL_REF SYM.  If not defined, assemble_name will be used to output the name of the symbol.  This macro may be used to modify the way a symbol is referenced depending on information encoded by TARGET_ENCODE_SECTION_INFO.

 -- Macro: ASM_OUTPUT_LABEL_REF (STREAM, BUF)
     A C statement (sans semicolon) to output a reference to BUF, the result of ASM_GENERATE_INTERNAL_LABEL.  If not defined, assemble_name will be used to output the name of the symbol. This macro is not used by output_asm_label, or the %l specifier that calls it; the intention is that this macro should be set when it is necessary to output a label differently when its address is being taken.

 -- Target Hook: void TARGET_ASM_INTERNAL_LABEL (FILE *STREAM, const char *PREFIX, unsigned long LABELNO)
     A function to output to the stdio stream STREAM a label whose name is made from the string PREFIX and the number LABELNO.

     It is absolutely essential that these labels be distinct from the labels used for user-level functions and variables.  Otherwise, certain programs will have name conflicts with internal labels.

     It is desirable to exclude internal labels from the symbol table of the object file.  Most assemblers have a naming convention for labels that should be excluded; on many systems, the letter L at the beginning of a label has this effect.  You should find out what convention your system uses, and follow it.

     The default version of this function utilizes ASM_GENERATE_INTERNAL_LABEL.

 -- Macro: ASM_OUTPUT_DEBUG_LABEL (STREAM, PREFIX, NUM)
     A C statement to output to the stdio stream STREAM a debug info label whose name is made from the string PREFIX and the number NUM.  This is useful for VLIW targets, where debug info labels may need to be treated differently than branch target labels.  On some systems, branch target labels must be at the beginning of instruction bundles, but debug info labels can occur in the middle of instruction bundles.

     If this macro is not defined, then (*targetm.asm_out.internal_label) will be used.

 -- Macro: ASM_GENERATE_INTERNAL_LABEL (STRING, PREFIX, NUM)
     A C statement to store into the string STRING a label whose name is made from the string PREFIX and the number NUM.

     This string, when output subsequently by assemble_name, should produce the output that (*targetm.asm_out.internal_label) would produce with the same PREFIX and NUM.

     If the string begins with *, then assemble_name will output the rest of the string unchanged.  It is often convenient for ASM_GENERATE_INTERNAL_LABEL to use * in this way.  If the string doesn't start with *, then ASM_OUTPUT_LABELREF gets to output the string, and may change it.  (Of course, ASM_OUTPUT_LABELREF is also part of your machine description, so you should know what it does on your machine.)

 -- Macro: ASM_FORMAT_PRIVATE_NAME (OUTVAR, NAME, NUMBER)
     A C expression to assign to OUTVAR (which is a variable of type char *) a newly allocated string made from the string NAME and the number NUMBER, with some suitable punctuation added.  Use alloca to get space for the string.

     The string will be used as an argument to ASM_OUTPUT_LABELREF to produce an assembler label for an internal static variable whose name is NAME.  Therefore, the string must be such as to result in valid assembler code.  The argument NUMBER is different each time this macro is executed; it prevents conflicts between similarly-named internal static variables in different scopes.

     Ideally this string should not be a valid C identifier, to prevent any conflict with the user's own symbols.  Most assemblers allow periods or percent signs in assembler symbols; putting at least one of these between the name and the number will suffice.

     If this macro is not defined, a default definition will be provided which is correct for most systems.

 -- Macro: ASM_OUTPUT_DEF (STREAM, NAME, VALUE)
     A C statement to output to the stdio stream STREAM assembler code which defines (equates) the symbol NAME to have the value VALUE.

     If SET_ASM_OP is defined, a default definition is provided which is correct for most systems.

 -- Macro: ASM_OUTPUT_DEF_FROM_DECLS (STREAM, DECL_OF_NAME, DECL_OF_VALUE)
     A C statement to output to the stdio stream STREAM assembler code which defines (equates) the symbol whose tree node is DECL_OF_NAME to have the value of the tree node DECL_OF_VALUE.  This macro will be used in preference to ASM_OUTPUT_DEF if it is defined and if the tree nodes are available.

     If SET_ASM_OP is defined, a default definition is provided which is correct for most systems.

 -- Macro: TARGET_DEFERRED_OUTPUT_DEFS (DECL_OF_NAME, DECL_OF_VALUE)
     A C statement that evaluates to true if the assembler code which defines (equates) the symbol whose tree node is DECL_OF_NAME to have the value of the tree node DECL_OF_VALUE should be emitted near the end of the current compilation unit.  The default is to not defer output of defines. This macro affects defines output by ASM_OUTPUT_DEF and ASM_OUTPUT_DEF_FROM_DECLS.

 -- Macro: ASM_OUTPUT_WEAK_ALIAS (STREAM, NAME, VALUE)
     A C statement to output to the stdio stream STREAM assembler code which defines (equates) the weak symbol NAME to have the value VALUE.  If VALUE is NULL, it defines NAME as an undefined weak symbol.

     Define this macro if the target only supports weak aliases; define ASM_OUTPUT_DEF instead if possible.

 -- Macro: OBJC_GEN_METHOD_LABEL (BUF, IS_INST, CLASS_NAME, CAT_NAME, SEL_NAME)
     Define this macro to override the default assembler names used for Objective-C methods.

     The default name is a unique method number followed by the name of the class (e.g. _1_Foo).  For methods in categories, the name of the category is also included in the assembler name (e.g. _1_Foo_Bar).

     These names are safe on most systems, but make debugging difficult since the method's selector is not present in the name.  Therefore, particular systems define other ways of computing names.

     BUF is an expression of type char * which gives you a buffer in which to store the name; its length is as long as CLASS_NAME, CAT_NAME and SEL_NAME put together, plus 50 characters extra.

     The argument IS_INST specifies whether the method is an instance method or a class method; CLASS_NAME is the name of the class; CAT_NAME is the name of the category (or NULL if the method is not in a category); and SEL_NAME is the name of the selector.

     On systems where the assembler can handle quoted names, you can use this macro to provide more human-readable names.

How Initialization Functions Are Handled
----------------------------------------

The compiled code for certain languages includes constructors (also called initialization routines)---functions to initialize data in the program when the program is started.  These functions need to be called before the program is ``started''---that is to say, before main is called.

Compiling some languages generates destructors (also called termination routines) that should be called when the program terminates.

To make the initialization and termination functions work, the compiler must output something in the assembler code to cause those functions to be called at the appropriate time.  When you port the compiler to a new system, you need to specify how to do this.

There are two major ways that GCC currently supports the execution of initialization and termination functions.  Each way has two variants. Much of the structure is common to all four variations.

The linker must build two lists of these functions---a list of initialization functions, called __CTOR_LIST__, and a list of termination functions, called __DTOR_LIST__.

Each list always begins with an ignored function pointer (which may hold 0, -1, or a count of the function pointers after it, depending on the environment).  This is followed by a series of zero or more function pointers to constructors (or destructors), followed by a function pointer containing zero.

Depending on the operating system and its executable file format, either crtstuff.c or libgcc2.c traverses these lists at startup time and exit time.  Constructors are called in reverse order of the list; destructors in forward order.

The best way to handle static constructors works only for object file formats which provide arbitrarily-named sections.  A section is set aside for a list of constructors, and another for a list of destructors. Traditionally these are called .ctors and .dtors.  Each object file that defines an initialization function also puts a word in the constructor section to point to that function.  The linker accumulates all these words into one contiguous .ctors section. Termination functions are handled similarly.

This method will be chosen as the default by target-def.h if TARGET_ASM_NAMED_SECTION is defined.  A target that does not support arbitrary sections, but does support special designated constructor and destructor sections may define CTORS_SECTION_ASM_OP and DTORS_SECTION_ASM_OP to achieve the same effect.

When arbitrary sections are available, there are two variants, depending upon how the code in crtstuff.c is called.  On systems that support a .init section which is executed at program startup, parts of crtstuff.c are compiled into that section.  The program is linked by the gcc driver like this:

     ld -o OUTPUT_FILE crti.o crtbegin.o ... -lgcc crtend.o crtn.o

The prologue of a function (__init) appears in the .init section of crti.o; the epilogue appears in crtn.o.  Likewise for the function __fini in the .fini section.  Normally these files are provided by the operating system or by the GNU C library, but are provided by GCC for a few targets.

The objects crtbegin.o and crtend.o are (for most targets) compiled from crtstuff.c.  They contain, among other things, code fragments within the .init and .fini sections that branch to routines in the .text section.  The linker will pull all parts of a section together, which results in a complete __init function that invokes the routines we need at startup.

To use this variant, you must define the INIT_SECTION_ASM_OP macro properly.

If no init section is available, when GCC compiles any function called main (or more accurately, any function designated as a program entry point by the language front end calling expand_main_function), it inserts a procedure call to __main as the first executable code after the function prologue.  The __main function is defined in libgcc2.c and runs the global constructors.

In file formats that don't support arbitrary sections, there are again two variants.  In the simplest variant, the GNU linker (GNU ld) and an `a.out' format must be used.  In this case, TARGET_ASM_CONSTRUCTOR is defined to produce a .stabs entry of type N_SETT, referencing the name __CTOR_LIST__, and with the address of the void function containing the initialization code as its value.  The GNU linker recognizes this as a request to add the value to a set; the values are accumulated, and are eventually placed in the executable as a vector in the format described above, with a leading (ignored) count and a trailing zero element. TARGET_ASM_DESTRUCTOR is handled similarly.  Since no init section is available, the absence of INIT_SECTION_ASM_OP causes the compilation of main to call __main as above, starting the initialization process.

The last variant uses neither arbitrary sections nor the GNU linker. This is preferable when you want to do dynamic linking and when using file formats which the GNU linker does not support, such as `ECOFF'.  In this case, TARGET_HAVE_CTORS_DTORS is false, initialization and termination functions are recognized simply by their names.  This requires an extra program in the linkage step, called collect2.  This program pretends to be the 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 __main as described above.  In order to use this method, use_collect2 must be defined in the target in config.gcc.

The following section describes the specific macros that control and customize the handling of initialization and termination functions.

Macros Controlling Initialization Routines
------------------------------------------

Here are the macros that control how the compiler handles initialization and termination functions:

 -- Macro: INIT_SECTION_ASM_OP
     If defined, a C string constant, including spacing, for the assembler operation to identify 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 crtstuff.c and libgcc2.c arrange to run the initialization functions.

 -- Macro: HAS_INIT_SECTION
     If defined, main will not call __main as described above. This macro should be defined for systems that control start-up code on a symbol-by-symbol basis, such as OSF/1, and should not be defined explicitly for systems that support INIT_SECTION_ASM_OP.

 -- Macro: LD_INIT_SWITCH
     If defined, a C string constant for a switch that tells the linker that the following symbol is an initialization routine.

 -- Macro: LD_FINI_SWITCH
     If defined, a C string constant for a switch that tells the linker that the following symbol is a finalization routine.

 -- Macro: COLLECT_SHARED_INIT_FUNC (STREAM, FUNC)
     If defined, a C statement that will write a function that can be automatically called when a shared library is loaded.  The function should call FUNC, which takes no arguments.  If not defined, and the object format requires an explicit initialization function, then a function called _GLOBAL__DI will be generated.

     This function and the following one are used by collect2 when linking a shared library that needs constructors or destructors, or has DWARF2 exception tables embedded in the code.

 -- Macro: COLLECT_SHARED_FINI_FUNC (STREAM, FUNC)
     If defined, a C statement that will write a function that can be automatically called when a shared library is unloaded.  The function should call FUNC, which takes no arguments.  If not defined, and the object format requires an explicit finalization function, then a function called _GLOBAL__DD will be generated.

 -- Macro: INVOKE__main
     If defined, main will call __main despite the presence of INIT_SECTION_ASM_OP.  This macro should be defined for systems where the init section is not actually run automatically, but is still useful for collecting the lists of constructors and destructors.

 -- Macro: SUPPORTS_INIT_PRIORITY
     If nonzero, the C++ init_priority attribute is supported and the compiler should emit instructions to control the order of initialization of objects.  If zero, the compiler will issue an error message upon encountering an init_priority attribute.

 -- Target Hook: bool TARGET_HAVE_CTORS_DTORS
     This value is true if the target supports some ``native'' method of collecting constructors and destructors to be run at startup and exit. It is false if we must use collect2.

 -- Target Hook: void TARGET_ASM_CONSTRUCTOR (rtx SYMBOL, int PRIORITY)
     If defined, a function that outputs assembler code to arrange to call the function referenced by SYMBOL at initialization time.

     Assume that SYMBOL is a SYMBOL_REF for a function taking no arguments and with no return value.  If the target supports initialization priorities, PRIORITY is a value between 0 and MAX_INIT_PRIORITY; otherwise it must be DEFAULT_INIT_PRIORITY.

     If this macro is not defined by the target, a suitable default will be chosen if (1) the target supports arbitrary section names, (2) the target defines CTORS_SECTION_ASM_OP, or (3) USE_COLLECT2 is not defined.

 -- Target Hook: void TARGET_ASM_DESTRUCTOR (rtx SYMBOL, int PRIORITY)
     This is like TARGET_ASM_CONSTRUCTOR but used for termination functions rather than initialization functions.

If TARGET_HAVE_CTORS_DTORS is true, the initialization routine generated for the generated object file will have static linkage.

If your system uses collect2 as the means of processing constructors, then that program normally uses nm to scan an object file for constructor functions to be called.

On certain kinds of systems, you can define this macro to make collect2 work faster (and, in some cases, make it work at all):

 -- Macro: OBJECT_FORMAT_COFF
     Define this macro if the system uses COFF (Common Object File Format) object files, so that collect2 can assume this format and scan object files directly for dynamic constructor/destructor functions.

     This macro is effective only in a native compiler; collect2 as part of a cross compiler always uses nm for the target machine.

 -- Macro: REAL_NM_FILE_NAME
     Define this macro as a C string constant containing the file name to use to execute nm.  The default is to search the path normally for nm.

 -- Macro: NM_FLAGS
     collect2 calls nm to scan object files for static constructors and destructors and LTO info.  By default, -n is passed.  Define NM_FLAGS to a C string constant if other options are needed to get the same output format as GNU nm -n produces.

If your system supports shared libraries and has a program to list the dynamic dependencies of a given library or executable, you can define these macros to enable support for running initialization and termination functions in shared libraries:

 -- Macro: LDD_SUFFIX
     Define this macro to a C string constant containing the name of the program which lists dynamic dependencies, like ldd under SunOS 4.

 -- Macro: PARSE_LDD_OUTPUT (PTR)
     Define this macro to be C code that extracts filenames from the output of the program denoted by LDD_SUFFIX.  PTR is a variable of type char * that points to the beginning of a line of output from LDD_SUFFIX.  If the line lists a dynamic dependency, the code must advance PTR to the beginning of the filename on that line.  Otherwise, it must set PTR to NULL.

 -- Macro: SHLIB_SUFFIX
     Define this macro to a C string constant containing the default shared library extension of the target (e.g., ".so").  collect2 strips version information after this suffix when generating global constructor and destructor names.  This define is only needed on targets that use collect2 to process constructors and destructors.

Output of Assembler Instructions
--------------------------------

This describes assembler instruction output.

 -- Macro: REGISTER_NAMES
     A C initializer containing the assembler's names for the machine registers, each one as a C string constant.  This is what translates register numbers in the compiler into assembler language.

 -- Macro: ADDITIONAL_REGISTER_NAMES
     If defined, a C initializer for an array of structures containing a name and a register number.  This macro defines additional names for hard registers, thus allowing the asm option in declarations to refer to registers using alternate names.

 -- Macro: OVERLAPPING_REGISTER_NAMES
     If defined, a C initializer for an array of structures containing a name, a register number and a count of the number of consecutive machine registers the name overlaps.  This macro defines additional names for hard registers, thus allowing the asm option in declarations to refer to registers using alternate names.  Unlike ADDITIONAL_REGISTER_NAMES, this macro should be used when the register name implies multiple underlying registers.

     This macro should be used when it is important that a clobber in an asm statement clobbers all the underlying values implied by the register name.  For example, on ARM, clobbering the double-precision VFP register ``d0'' implies clobbering both single-precision registers ``s0'' and ``s1''.

 -- Macro: ASM_OUTPUT_OPCODE (STREAM, PTR)
     Define this macro if you are using an unusual assembler that requires different names for the machine instructions.

     The definition is a C statement or statements which output an assembler instruction opcode to the stdio stream STREAM.  The macro-operand PTR is a variable of type char * which points to the opcode name in its ``internal'' form---the form that is written in the machine description.  The definition should output the opcode name to STREAM, performing any translation you desire, and increment the variable PTR to point at the end of the opcode so that it will not be output twice.

     In fact, your macro definition may process less than the entire opcode name, or more than the opcode name; but if you want to process text that includes %-sequences to substitute operands, you must take care of the substitution yourself.  Just be sure to increment PTR over whatever text should not be output normally.

     If you need to look at the operand values, they can be found as the elements of recog_data.operand.

     If the macro definition does nothing, the instruction is output in the usual way.

 -- Macro: FINAL_PRESCAN_INSN (INSN, OPVEC, NOPERANDS)
     If defined, a C statement to be executed just prior to the output of assembler code for INSN, to modify the extracted operands so they will be output differently.

     Here the argument OPVEC is the vector containing the operands extracted from INSN, and NOPERANDS is the number of elements of the vector which contain meaningful data for this insn. The contents of this vector are what will be used to convert the insn template into assembler code, so you can change the assembler output by changing the contents of the vector.

     This macro is useful when various assembler syntaxes share a single file of instruction patterns; by defining this macro differently, you can cause a large class of instructions to be output differently (such as with rearranged operands).  Naturally, variations in assembler syntax affecting individual insn patterns ought to be handled by writing conditional output routines in those patterns.

     If this macro is not defined, it is equivalent to a null statement.

 -- Target Hook: void TARGET_ASM_FINAL_POSTSCAN_INSN (FILE *FILE, rtx INSN, rtx *OPVEC, int NOPERANDS)
     If defined, this target hook is a function which is executed just after the output of assembler code for INSN, to change the mode of the assembler if necessary.

     Here the argument OPVEC is the vector containing the operands extracted from INSN, and NOPERANDS is the number of elements of the vector which contain meaningful data for this insn. The contents of this vector are what was used to convert the insn template into assembler code, so you can change the assembler mode by checking the contents of the vector.

 -- Macro: PRINT_OPERAND (STREAM, X, CODE)
     A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand X.  X is an RTL expression.

     CODE is a value that can be used to specify one of several ways of printing the operand.  It is used when identical operands must be printed differently depending on the context.  CODE comes from the % specification that was used to request printing of the operand.  If the specification was just %DIGIT then CODE is 0; if the specification was %LTR DIGIT then CODE is the ASCII code for LTR.

     If X is a register, this macro should print the register's name. The names can be found in an array reg_names whose type is char *[].  reg_names is initialized from REGISTER_NAMES.

     When the machine description has a specification %PUNCT (a % followed by a punctuation character), this macro is called with a null pointer for X and the punctuation character for CODE.

 -- Macro: PRINT_OPERAND_PUNCT_VALID_P (CODE)
     A C expression which evaluates to true if CODE is a valid punctuation character for use in the PRINT_OPERAND macro.  If PRINT_OPERAND_PUNCT_VALID_P is not defined, it means that no punctuation characters (except for the standard one, %) are used in this way.

 -- Macro: PRINT_OPERAND_ADDRESS (STREAM, X)
     A C compound statement to output to stdio stream STREAM the assembler syntax for an instruction operand that is a memory reference whose address is X.  X is an RTL expression.

     On some machines, the syntax for a symbolic address depends on the section that the address refers to.  On these machines, define the hook TARGET_ENCODE_SECTION_INFO to store the information into the symbol_ref, and then check for it here.  See Assembler Format.

 -- Macro: DBR_OUTPUT_SEQEND (FILE)
     A C statement, to be executed after all slot-filler instructions have been output.  If necessary, call dbr_sequence_length to determine the number of slots filled in a sequence (zero if not currently outputting a sequence), to decide how many no-ops to output, or whatever.

     Don't define this macro if it has nothing to do, but it is helpful in reading assembly output if the extent of the delay sequence is made explicit (e.g. with white space).

Note that output routines for instructions with delay slots must be prepared to deal with not being output as part of a sequence (i.e. when the scheduling pass is not run, or when no slot fillers could be found.)  The variable final_sequence is null when not processing a sequence, otherwise it contains the sequence rtx being output.

 -- Macro: REGISTER_PREFIX
 -- Macro: LOCAL_LABEL_PREFIX
 -- Macro: USER_LABEL_PREFIX
 -- Macro: IMMEDIATE_PREFIX
     If defined, C string expressions to be used for the %R, %L, %U, and %I options of asm_fprintf (see final.c).  These are useful when a single md file must support multiple assembler formats.  In that case, the various tm.h files can define these macros differently.

 -- Macro: ASM_FPRINTF_EXTENSIONS (FILE, ARGPTR, FORMAT)
     If defined this macro should expand to a series of case statements which will be parsed inside the switch statement of the asm_fprintf function.  This allows targets to define extra printf formats which may useful when generating their assembler statements.  Note that uppercase 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 FILE. The varargs input pointer is ARGPTR and the rest of the format string, starting the character after the one that is being switched upon, is pointed to by FORMAT.

 -- Macro: ASSEMBLER_DIALECT
     If your target supports multiple dialects of assembler language (such as different opcodes), define this macro as a C expression that gives the numeric index of the assembler language dialect to use, with zero as the first variant.

     If this macro is defined, you may use constructs of the form

          {option0|option1|option2...}

     in the output templates of patterns (see Output Template) or in the first argument of asm_fprintf.  This construct outputs option0, option1, option2, etc., if the value of ASSEMBLER_DIALECT is zero, one, two, etc.  Any special characters within these strings retain their usual meaning.  If there are fewer alternatives within the braces than the value of ASSEMBLER_DIALECT, the construct outputs nothing.

     If you do not define this macro, the characters {, | and } do not have any special meaning when used in templates or operands to asm_fprintf.

     Define the macros REGISTER_PREFIX, LOCAL_LABEL_PREFIX, USER_LABEL_PREFIX and IMMEDIATE_PREFIX if you can express the variations in assembler language syntax with that mechanism.  Define ASSEMBLER_DIALECT and use the {option0|option1} syntax if the syntax variant are larger and involve such things as different opcodes or operand order.

 -- Macro: ASM_OUTPUT_REG_PUSH (STREAM, REGNO)
     A C expression to output to STREAM some assembler code which will push hard register number REGNO onto the stack. The code need not be optimal, since this macro is used only when profiling.

 -- Macro: ASM_OUTPUT_REG_POP (STREAM, REGNO)
     A C expression to output to STREAM some assembler code which will pop hard register number REGNO off of the stack. The code need not be optimal, since this macro is used only when profiling.

Output of Dispatch Tables
-------------------------

This concerns dispatch tables.

 -- Macro: ASM_OUTPUT_ADDR_DIFF_ELT (STREAM, BODY, VALUE, REL)
     A C statement to output to the stdio stream STREAM an assembler pseudo-instruction to generate a difference between two labels. VALUE and REL are the numbers of two internal labels.  The definitions of these labels are output using (*targetm.asm_out.internal_label), and they must be printed in the same way here.  For example,

          fprintf (STREAM, "\t.word L%d-L%d\n",
                   VALUE, REL)

     You must provide this macro on machines where the addresses in a dispatch table are relative to the table's own address.  If defined, GCC will also use this macro on all machines when producing PIC. BODY is the body of the ADDR_DIFF_VEC; it is provided so that the mode and flags can be read.

 -- Macro: ASM_OUTPUT_ADDR_VEC_ELT (STREAM, VALUE)
     This macro should be provided on machines where the addresses in a dispatch table are absolute.

     The definition should be a C statement to output to the stdio stream STREAM an assembler pseudo-instruction to generate a reference to a label.  VALUE is the number of an internal label whose definition is output using (*targetm.asm_out.internal_label). For example,

          fprintf (STREAM, "\t.word L%d\n", VALUE)

 -- Macro: ASM_OUTPUT_CASE_LABEL (STREAM, PREFIX, NUM, TABLE)
     Define this if the label before a jump-table needs to be output specially.  The first three arguments are the same as for (*targetm.asm_out.internal_label); the fourth argument is the jump-table which follows (a jump_insn containing an addr_vec or addr_diff_vec).

     This feature is used on system V to output a swbeg statement for the table.

     If this macro is not defined, these labels are output with (*targetm.asm_out.internal_label).

 -- Macro: ASM_OUTPUT_CASE_END (STREAM, NUM, TABLE)
     Define this if something special must be output at the end of a jump-table.  The definition should be a C statement to be executed after the assembler code for the table is written.  It should write the appropriate code to stdio stream STREAM.  The argument TABLE is the jump-table insn, and NUM is the label-number of the preceding label.

     If this macro is not defined, nothing special is output at the end of the jump-table.

 -- Target Hook: void TARGET_ASM_EMIT_UNWIND_LABEL (FILE *STREAM, tree DECL, int FOR_EH, int EMPTY)
     This target hook emits a label at the beginning of each FDE.  It should be defined on targets where FDEs need special labels, and it should write the appropriate label, for the FDE associated with the function declaration DECL, to the stdio stream STREAM. The third argument, FOR_EH, is a boolean: true if this is for an exception table.  The fourth argument, EMPTY, is a boolean: true if this is a placeholder label for an omitted FDE.

     The default is that FDEs are not given nonlocal labels.

 -- Target Hook: void TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL (FILE *STREAM)
     This target hook emits a label at the beginning of the exception table. It should be defined on targets where it is desirable for the table to be broken up according to function.

     The default is that no label is emitted.

 -- Target Hook: void TARGET_ASM_EMIT_EXCEPT_PERSONALITY (rtx PERSONALITY)
     If the target implements TARGET_ASM_UNWIND_EMIT, this hook may be used to emit a directive to install a personality hook into the unwind info.  This hook should not be used if dwarf2 unwind info is used.

 -- Target Hook: void TARGET_ASM_UNWIND_EMIT (FILE *STREAM, rtx INSN)
     This target hook emits assembly directives required to unwind the given instruction.  This is only used when TARGET_EXCEPT_UNWIND_INFO returns UI_TARGET.

 -- Target Hook: bool TARGET_ASM_UNWIND_EMIT_BEFORE_INSN
     True if the TARGET_ASM_UNWIND_EMIT hook should be called before the assembly for INSN has been emitted, false if the hook should be called afterward.

Assembler Commands for Exception Regions
----------------------------------------

This describes commands marking the start and the end of an exception region.

 -- Macro: EH_FRAME_SECTION_NAME
     If defined, a C string constant for the name of the section containing exception handling frame unwind information.  If not defined, GCC will provide a default definition if the target supports named sections. crtstuff.c uses this macro to switch to the appropriate section.

     You should define this symbol if your target supports DWARF 2 frame unwind information and the default definition does not work.

 -- Macro: EH_FRAME_IN_DATA_SECTION
     If defined, DWARF 2 frame unwind information will be placed in the data section even though the target supports named sections.  This might be necessary, for instance, if the system linker does garbage collection and sections cannot be marked as not to be collected.

     Do not define this macro unless TARGET_ASM_NAMED_SECTION is also defined.

 -- Macro: EH_TABLES_CAN_BE_READ_ONLY
     Define this macro to 1 if your target is such that no frame unwind information encoding used with non-PIC code will ever require a runtime relocation, but the linker may not support merging read-only and read-write sections into a single read-write section.

 -- Macro: MASK_RETURN_ADDR
     An rtx used to mask the return address found via RETURN_ADDR_RTX, so that it does not contain any extraneous set bits in it.

 -- Macro: DWARF2_UNWIND_INFO
     Define this macro to 0 if your target supports DWARF 2 frame unwind information, but it does not yet work with exception handling. Otherwise, if your target supports this information (if it defines INCOMING_RETURN_ADDR_RTX and OBJECT_FORMAT_ELF), GCC will provide a default definition of 1.

 -- Common Target Hook: enum unwind_info_type TARGET_EXCEPT_UNWIND_INFO (struct gcc_options *OPTS)
     This hook defines the mechanism that will be used for exception handling by the target.  If the target has ABI specified unwind tables, the hook should return UI_TARGET.  If the target is to use the setjmp/longjmp-based exception handling scheme, the hook should return UI_SJLJ.  If the target supports DWARF 2 frame unwind information, the hook should return UI_DWARF2.

     A target may, if exceptions are disabled, choose to return UI_NONE. This may end up simplifying other parts of target-specific code.  The default implementation of this hook never returns UI_NONE.

     Note that the value returned by this hook should be constant.  It should not depend on anything except the command-line switches described by OPTS.  In particular, the setting UI_SJLJ must be fixed at compiler start-up as C pre-processor macros and builtin functions related to exception handling are set up depending on this setting.

     The default implementation of the hook first honors the --enable-sjlj-exceptions configure option, then DWARF2_UNWIND_INFO, and finally defaults to UI_SJLJ.  If DWARF2_UNWIND_INFO depends on command-line options, the target must define this hook so that OPTS is used correctly.

 -- Common Target Hook: bool TARGET_UNWIND_TABLES_DEFAULT
     This variable should be set to true if the target ABI requires unwinding tables even when exceptions are not used.  It must not be modified by command-line option processing.

 -- Macro: DONT_USE_BUILTIN_SETJMP
     Define this macro to 1 if the setjmp/longjmp-based scheme should use the setjmp/longjmp functions from the C library instead of the __builtin_setjmp/__builtin_longjmp machinery.

 -- Macro: JMP_BUF_SIZE
     This macro has no effect unless DONT_USE_BUILTIN_SETJMP is also defined.  Define this macro if the default size of jmp_buf buffer for the setjmp/longjmp-based exception handling mechanism is not large enough, or if it is much too large. The default size is FIRST_PSEUDO_REGISTER * sizeof(void *).

 -- Macro: DWARF_CIE_DATA_ALIGNMENT
     This macro need only be defined if the target might save registers in the function prologue at an offset to the stack pointer that is not aligned to UNITS_PER_WORD.  The definition should be the negative minimum alignment if STACK_GROWS_DOWNWARD is defined, and the positive minimum alignment otherwise.  See SDB and DWARF.  Only applicable if the target supports DWARF 2 frame unwind information.

 -- Target Hook: bool TARGET_TERMINATE_DW2_EH_FRAME_INFO
     Contains the value true if the target should add a zero word onto the end of a Dwarf-2 frame info section when used for exception handling. Default value is false if EH_FRAME_SECTION_NAME is defined, and true otherwise.

 -- Target Hook: rtx TARGET_DWARF_REGISTER_SPAN (rtx REG)
     Given a register, this hook should return a parallel of registers to represent where to find the register pieces.  Define this hook if the register and its mode are represented in Dwarf in non-contiguous locations, or if the register should be represented in more than one register in Dwarf.  Otherwise, this hook should return NULL_RTX. If not defined, the default is to return NULL_RTX.

 -- Target Hook: void TARGET_INIT_DWARF_REG_SIZES_EXTRA (tree ADDRESS)
     If some registers are represented in Dwarf-2 unwind information in multiple pieces, define this hook to fill in information about the sizes of those pieces in the table used by the unwinder at runtime. It will be called by expand_builtin_init_dwarf_reg_sizes after filling in a single size corresponding to each hard register; ADDRESS is the address of the table.

 -- Target Hook: bool TARGET_ASM_TTYPE (rtx SYM)
     This hook is used to output a reference from a frame unwinding table to the type_info object identified by SYM.  It should return true if the reference was output.  Returning false will cause the reference to be output using the normal Dwarf2 routines.

 -- Target Hook: bool TARGET_ARM_EABI_UNWINDER
     This flag should be set to true on targets that use an ARM EABI based unwinding library, and false on other targets.  This effects the format of unwinding tables, and how the unwinder in entered after running a cleanup.  The default is false.

Assembler Commands for Alignment
--------------------------------

This describes commands for alignment.

 -- Macro: JUMP_ALIGN (LABEL)
     The alignment (log base 2) to put in front of LABEL, which is a common destination of jumps and has no fallthru incoming edge.

     This macro need not be defined if you don't want any special alignment to be done at such a time.  Most machine descriptions do not currently define the macro.

     Unless it's necessary to inspect the LABEL parameter, it is better to set the variable ALIGN_JUMPS in the target's TARGET_OPTION_OVERRIDE.  Otherwise, you should try to honor the user's selection in ALIGN_JUMPS in a JUMP_ALIGN implementation.

 -- Target Hook: int TARGET_ASM_JUMP_ALIGN_MAX_SKIP (rtx LABEL)
     The maximum number of bytes to skip before LABEL when applying JUMP_ALIGN.  This works only if ASM_OUTPUT_MAX_SKIP_ALIGN is defined.

 -- Macro: LABEL_ALIGN_AFTER_BARRIER (LABEL)
     The alignment (log base 2) to put in front of LABEL, which follows a BARRIER.

     This macro need not be defined if you don't want any special alignment to be done at such a time.  Most machine descriptions do not currently define the macro.

 -- Target Hook: int TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP (rtx LABEL)
     The maximum number of bytes to skip before LABEL when applying LABEL_ALIGN_AFTER_BARRIER.  This works only if ASM_OUTPUT_MAX_SKIP_ALIGN is defined.

 -- Macro: LOOP_ALIGN (LABEL)
     The alignment (log base 2) to put in front of LABEL, which follows a NOTE_INSN_LOOP_BEG note.

     This macro need not be defined if you don't want any special alignment to be done at such a time.  Most machine descriptions do not currently define the macro.

     Unless it's necessary to inspect the LABEL parameter, it is better to set the variable align_loops in the target's TARGET_OPTION_OVERRIDE.  Otherwise, you should try to honor the user's selection in align_loops in a LOOP_ALIGN implementation.

 -- Target Hook: int TARGET_ASM_LOOP_ALIGN_MAX_SKIP (rtx LABEL)
     The maximum number of bytes to skip when applying LOOP_ALIGN to LABEL.  This works only if ASM_OUTPUT_MAX_SKIP_ALIGN is defined.

 -- Macro: LABEL_ALIGN (LABEL)
     The alignment (log base 2) to put in front of 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 LABEL parameter, it is better to set the variable align_labels in the target's TARGET_OPTION_OVERRIDE.  Otherwise, you should try to honor the user's selection in align_labels in a LABEL_ALIGN implementation.

 -- Target Hook: int TARGET_ASM_LABEL_ALIGN_MAX_SKIP (rtx LABEL)
     The maximum number of bytes to skip when applying LABEL_ALIGN to LABEL.  This works only if ASM_OUTPUT_MAX_SKIP_ALIGN is defined.

 -- Macro: ASM_OUTPUT_SKIP (STREAM, NBYTES)
     A C statement to output to the stdio stream STREAM an assembler instruction to advance the location counter by NBYTES bytes. Those bytes should be zero when loaded.  NBYTES will be a C expression of type unsigned HOST_WIDE_INT.

 -- Macro: ASM_NO_SKIP_IN_TEXT
     Define this macro if ASM_OUTPUT_SKIP should not be used in the text section because it fails to put zeros in the bytes that are skipped. This is true on many Unix systems, where the pseudo--op to skip bytes produces no-op instructions rather than zeros when used in the text section.

 -- Macro: ASM_OUTPUT_ALIGN (STREAM, POWER)
     A C statement to output to the stdio stream STREAM an assembler command to advance the location counter to a multiple of 2 to the POWER bytes.  POWER will be a C expression of type int.

 -- Macro: ASM_OUTPUT_ALIGN_WITH_NOP (STREAM, POWER)
     Like ASM_OUTPUT_ALIGN, except that the ``nop'' instruction is used for padding, if necessary.

 -- Macro: ASM_OUTPUT_MAX_SKIP_ALIGN (STREAM, POWER, MAX_SKIP)
     A C statement to output to the stdio stream STREAM an assembler command to advance the location counter to a multiple of 2 to the POWER bytes, but only if MAX_SKIP or fewer bytes are needed to satisfy the alignment request.  POWER and MAX_SKIP will be a C expression of type int.

Controlling Debugging Information Format
========================================

This describes how to specify debugging information.

Macros Affecting All Debugging Formats
--------------------------------------

These macros affect all debugging formats.

 -- Macro: DBX_REGISTER_NUMBER (REGNO)
     A C expression that returns the DBX register number for the compiler register number REGNO.  In the default macro provided, the value of this expression will be REGNO itself.  But sometimes there are some registers that the compiler knows about and DBX does not, or vice 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 GCC, and they can be used as a pair to hold a multiword value, then they must have consecutive numbers after renumbering with DBX_REGISTER_NUMBER. Otherwise, debuggers will be unable to access such a pair, because they expect register pairs to be consecutive in their own numbering scheme.

     If you find yourself defining DBX_REGISTER_NUMBER in way that does not preserve register pairs, then what you must do instead is redefine the actual register numbering scheme.

 -- Macro: DEBUGGER_AUTO_OFFSET (X)
     A C expression that returns the integer offset value for an automatic variable having address X (an RTL expression).  The default computation assumes that X is based on the frame-pointer and gives the offset from the frame-pointer.  This is required for targets that produce debugging output for DBX or COFF-style debugging output for SDB and allow the frame-pointer to be eliminated when the -g options is used.

 -- Macro: DEBUGGER_ARG_OFFSET (OFFSET, X)
     A C expression that returns the integer offset value for an argument having address X (an RTL expression).  The nominal offset is OFFSET.

 -- Macro: PREFERRED_DEBUGGING_TYPE
     A C expression that returns the type of debugging output GCC should produce when the user specifies just -g.  Define this if you have arranged for GCC to support more than one format of debugging output.  Currently, the allowable values are DBX_DEBUG, SDB_DEBUG, DWARF_DEBUG, DWARF2_DEBUG, XCOFF_DEBUG, VMS_DEBUG, and VMS_AND_DWARF2_DEBUG.

     When the user specifies -ggdb, GCC normally also uses the value of this macro to select the debugging output format, but with two exceptions.  If DWARF2_DEBUGGING_INFO is defined, GCC uses the value DWARF2_DEBUG.  Otherwise, if DBX_DEBUGGING_INFO is defined, GCC uses 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 -gstabs, -gcoff, -gdwarf-2, -gxcoff, or -gvms.

Specific Options for DBX Output
-------------------------------

These are specific options for DBX output.

 -- Macro: DBX_DEBUGGING_INFO
     Define this macro if GCC should produce debugging output for DBX in response to the -g option.

 -- Macro: XCOFF_DEBUGGING_INFO
     Define this macro if GCC should produce XCOFF format debugging output in response to the -g option.  This is a variant of DBX format.

 -- Macro: DEFAULT_GDB_EXTENSIONS
     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 if there is any occasion to.

 -- Macro: DEBUG_SYMS_TEXT
     Define this macro if all .stabs commands should be output while in the text section.

 -- Macro: ASM_STABS_OP
     A C string constant, including spacing, naming the assembler pseudo op to use instead of "\t.stabs\t" to define an ordinary debugging symbol. If you don't define this macro, "\t.stabs\t" is used.  This macro applies only to DBX debugging information format.

 -- Macro: ASM_STABD_OP
     A C string constant, including spacing, naming the assembler pseudo op to use instead of "\t.stabd\t" to define a debugging symbol whose value is the current location.  If you don't define this macro, "\t.stabd\t" is used.  This macro applies only to DBX debugging information format.

 -- Macro: ASM_STABN_OP
     A C string constant, including spacing, naming the assembler pseudo op to use instead of "\t.stabn\t" to define a debugging symbol with no name.  If you don't define this macro, "\t.stabn\t" is used.  This macro applies only to DBX debugging information format.

 -- Macro: DBX_NO_XREFS
     Define this macro if DBX on your system does not support the construct xsTAGNAME.  On some systems, this construct is used to describe a forward reference to a structure named TAGNAME. On other systems, this construct is not supported at all.

 -- Macro: DBX_CONTIN_LENGTH
     A symbol name in DBX-format debugging information is normally continued (split into two separate .stabs directives) when it exceeds a certain length (by default, 80 characters).  On some operating systems, DBX requires this splitting; on others, splitting must not be done.  You can inhibit splitting by defining this macro with the value zero.  You can override the default splitting-length by defining this macro as an expression for the length you desire.

 -- Macro: DBX_CONTIN_CHAR
     Normally continuation is indicated by adding a \ character to the end of a .stabs string when a continuation follows.  To use a different character instead, define this macro as a character constant for the character you want to use.  Do not define this macro if backslash is correct for your system.

 -- Macro: DBX_STATIC_STAB_DATA_SECTION
     Define this macro if it is necessary to go to the data section before outputting the .stabs pseudo-op for a non-global static variable.

 -- Macro: DBX_TYPE_DECL_STABS_CODE
     The value to use in the ``code'' field of the .stabs directive for a typedef.  The default is N_LSYM.

 -- Macro: DBX_STATIC_CONST_VAR_CODE
     The value to use in the ``code'' field of the .stabs directive for a static variable located in the text section.  DBX format does not provide any ``right'' way to do this.  The default is N_FUN.

 -- Macro: DBX_REGPARM_STABS_CODE
     The value to use in the ``code'' field of the .stabs directive for a parameter passed in registers.  DBX format does not provide any ``right'' way to do this.  The default is N_RSYM.

 -- Macro: DBX_REGPARM_STABS_LETTER
     The letter to use in DBX symbol data to identify a symbol as a parameter passed in registers.  DBX format does not customarily provide any way to do this.  The default is 'P'.

 -- Macro: DBX_FUNCTION_FIRST
     Define this macro if the DBX information for a function and its arguments should precede the assembler code for the function.  Normally, in DBX format, the debugging information entirely follows the assembler code.

 -- Macro: DBX_BLOCKS_FUNCTION_RELATIVE
     Define this macro, with value 1, if the value of a symbol describing the scope of a block (N_LBRAC or N_RBRAC) should be relative to the start of the enclosing function.  Normally, GCC uses an absolute address.

 -- Macro: DBX_LINES_FUNCTION_RELATIVE
     Define this macro, with value 1, if the value of a symbol indicating the current line number (N_SLINE) should be relative to the start of the enclosing function.  Normally, GCC uses an absolute address.

 -- Macro: DBX_USE_BINCL
     Define this macro if GCC should generate N_BINCL and N_EINCL stabs for included header files, as on Sun systems.  This macro also directs GCC to output a type number as a pair of a file number and a type number within the file.  Normally, GCC does not generate N_BINCL or N_EINCL stabs, and it outputs a single number for a type number.

Open-Ended Hooks for DBX Format
-------------------------------

These are hooks for DBX format.

 -- Macro: DBX_OUTPUT_SOURCE_LINE (STREAM, LINE, COUNTER)
     A C statement to output DBX debugging information before code for line number LINE of the current source file to the stdio stream STREAM.  COUNTER is the number of time the macro was invoked, including the current invocation; it is intended to generate unique labels in the assembly output.

     This macro should not be defined if the default output is correct, or if it can be made correct by defining DBX_LINES_FUNCTION_RELATIVE.

 -- Macro: NO_DBX_FUNCTION_END
     Some stabs encapsulation formats (in particular ECOFF), cannot handle the .stabs "",N_FUN,,0,0,Lscope-function-1 gdb dbx extension construct. On those machines, define this macro to turn this feature off without disturbing the rest of the gdb extensions.

 -- Macro: NO_DBX_BNSYM_ENSYM
     Some assemblers cannot handle the .stabd BNSYM/ENSYM,0,0 gdb dbx extension construct.  On those machines, define this macro to turn this feature off without disturbing the rest of the gdb extensions.

File Names in DBX Format
------------------------

This describes file names in DBX format.

 -- Macro: DBX_OUTPUT_MAIN_SOURCE_FILENAME (STREAM, NAME)
     A C statement to output DBX debugging information to the stdio stream STREAM, which indicates that file NAME is the main source file---the file specified as the input file for compilation. This macro is called only once, at the beginning of compilation.

     This macro need not be defined if the standard form of output for DBX debugging information is appropriate.

     It may be necessary to refer to a label equal to the beginning of the text section.  You can use assemble_name (stream, ltext_label_name) to do so.  If you do this, you must also set the variable USED_LTEXT_LABEL_NAME to true.

 -- Macro: NO_DBX_MAIN_SOURCE_DIRECTORY
     Define this macro, with value 1, if GCC should not emit an indication of the current directory for compilation and current source language at the beginning of the file.

 -- Macro: NO_DBX_GCC_MARKER
     Define this macro, with value 1, if GCC should not emit an indication that this object file was compiled by GCC.  The default is to emit an N_OPT stab at the beginning of every source file, with gcc2_compiled. for the string and value 0.

 -- Macro: DBX_OUTPUT_MAIN_SOURCE_FILE_END (STREAM, NAME)
     A C statement to output DBX debugging information at the end of compilation of the main source file NAME.  Output should be written to the stdio stream STREAM.

     If you don't define this macro, nothing special is output at the end of compilation, which is correct for most machines.

 -- Macro: DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
     Define this macro instead of defining DBX_OUTPUT_MAIN_SOURCE_FILE_END, if what needs to be output at the end of compilation is an N_SO stab with an empty string, whose value is the highest absolute text address in the file.

Macros for SDB and DWARF Output
-------------------------------

Here are macros for SDB and DWARF output.

 -- Macro: SDB_DEBUGGING_INFO
     Define this macro if GCC should produce COFF-style debugging output for SDB in response to the -g option.

 -- Macro: DWARF2_DEBUGGING_INFO
     Define this macro if GCC should produce dwarf version 2 format debugging output in response to the -g option.

      -- Target Hook: int TARGET_DWARF_CALLING_CONVENTION (const_tree FUNCTION)
          Define this to enable the dwarf attribute DW_AT_calling_convention to be emitted for each function.  Instead of an integer return the enum value for the DW_CC_ tag.

     To support optional call frame debugging information, you must also define INCOMING_RETURN_ADDR_RTX and either set RTX_FRAME_RELATED_P on the prologue insns if you use RTL for the prologue, or call dwarf2out_def_cfa and dwarf2out_reg_save as appropriate from TARGET_ASM_FUNCTION_PROLOGUE if you don't.

 -- Macro: DWARF2_FRAME_INFO
     Define this macro to a nonzero value if GCC should always output Dwarf 2 frame information.  If TARGET_EXCEPT_UNWIND_INFO (see Exception Region Output) returns UI_DWARF2, and exceptions are enabled, GCC will output this information not matter how you define DWARF2_FRAME_INFO.

 -- Target Hook: enum unwind_info_type TARGET_DEBUG_UNWIND_INFO (void)
     This hook defines the mechanism that will be used for describing frame unwind information to the debugger.  Normally the hook will return UI_DWARF2 if DWARF 2 debug information is enabled, and return UI_NONE otherwise.

     A target may return UI_DWARF2 even when DWARF 2 debug information is disabled in order to always output DWARF 2 frame information.

     A target may return UI_TARGET if it has ABI specified unwind tables. This will suppress generation of the normal debug frame unwind information.

 -- Macro: 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.

 -- Target Hook: bool TARGET_WANT_DEBUG_PUB_SECTIONS
     True if the .debug_pubtypes and .debug_pubnames sections should be emitted.  These sections are not used on most platforms, and in particular GDB does not use them.

 -- Target Hook: bool TARGET_FORCE_AT_COMP_DIR
     True if the DW_AT_comp_dir attribute should be emitted for each  compilation unit.  This attribute is required for the darwin linker  to emit debug information.

 -- Target Hook: bool TARGET_DELAY_SCHED2
     True if sched2 is not to be run at its normal place.  This usually means it will be run as part of machine-specific reorg.

 -- Target Hook: bool TARGET_DELAY_VARTRACK
     True if vartrack is not to be run at its normal place.  This usually means it will be run as part of machine-specific reorg.

 -- Macro: ASM_OUTPUT_DWARF_DELTA (STREAM, SIZE, LABEL1, LABEL2)
     A C statement to issue assembly directives that create a difference LAB1 minus LAB2, using an integer of the given SIZE.

 -- Macro: ASM_OUTPUT_DWARF_VMS_DELTA (STREAM, SIZE, LABEL1, LABEL2)
     A C statement to issue assembly directives that create a difference between the two given labels in system defined units, e.g. instruction slots on IA64 VMS, using an integer of the given size.

 -- Macro: ASM_OUTPUT_DWARF_OFFSET (STREAM, SIZE, LABEL, SECTION)
     A C statement to issue assembly directives that create a section-relative reference to the given LABEL, using an integer of the given SIZE.  The label is known to be defined in the given SECTION.

 -- Macro: ASM_OUTPUT_DWARF_PCREL (STREAM, SIZE, LABEL)
     A C statement to issue assembly directives that create a self-relative reference to the given LABEL, using an integer of the given SIZE.

 -- Macro: ASM_OUTPUT_DWARF_TABLE_REF (LABEL)
     A C statement to issue assembly directives that create a reference to the DWARF table identifier LABEL from the current section.  This is used on some systems to avoid garbage collecting a DWARF table which is referenced by a function.

 -- Target Hook: void TARGET_ASM_OUTPUT_DWARF_DTPREL (FILE *FILE, int SIZE, rtx X)
     If defined, this target hook is a function which outputs a DTP-relative reference to the given TLS symbol of the specified size.

 -- Macro: PUT_SDB_...
     Define these macros to override the assembler syntax for the special SDB assembler directives.  See sdbout.c for a list of these macros and their arguments.  If the standard syntax is used, you need not define them yourself.

 -- Macro: SDB_DELIM
     Some assemblers do not support a semicolon as a delimiter, even between SDB assembler directives.  In that case, define this macro to be the delimiter to use (usually \n).  It is not necessary to define a new set of PUT_SDB_OP macros if this is the only change required.

 -- Macro: SDB_ALLOW_UNKNOWN_REFERENCES
     Define this macro to allow references to unknown structure, union, or enumeration tags to be emitted.  Standard COFF does not allow handling of unknown references, MIPS ECOFF has support for it.

 -- Macro: SDB_ALLOW_FORWARD_REFERENCES
     Define this macro to allow references to structure, union, or enumeration tags that have not yet been seen to be handled.  Some assemblers choke if forward tags are used, while some require it.

 -- Macro: SDB_OUTPUT_SOURCE_LINE (STREAM, LINE)
     A C statement to output SDB debugging information before code for line number LINE of the current source file to the stdio stream STREAM.  The default is to emit an .ln directive.

Macros for VMS Debug Format
---------------------------

Here are macros for VMS debug format.

 -- Macro: VMS_DEBUGGING_INFO
     Define this macro if GCC should produce debugging output for VMS in response to the -g option.  The default behavior for VMS is to generate minimal debug info for a traceback in the absence of -g unless explicitly overridden with -g0.  This behavior is controlled by TARGET_OPTION_OPTIMIZATION and TARGET_OPTION_OVERRIDE.

Cross Compilation and Floating Point
====================================

While all modern machines use twos-complement representation for integers, there are a variety of representations for floating point numbers.  This means that in a cross-compiler the representation of floating point numbers in the compiled program may be different from that used in the machine doing the compilation.

Because different representation systems may offer different amounts of range and precision, all floating point constants must be represented in the target machine's format.  Therefore, the cross compiler cannot safely use the host machine's floating point arithmetic; it must emulate the target's arithmetic.  To ensure consistency, GCC always uses emulation to work with floating point values, even when the host and target floating point formats are identical.

The following macros are provided by real.h for the compiler to use.  All parts of the compiler which generate or optimize floating-point calculations must use these macros.  They may evaluate their operands more than once, so operands must not have side effects.

 -- Macro: REAL_VALUE_TYPE
     The C data type to be used to hold a floating point value in the target machine's format.  Typically this is a struct containing an array of HOST_WIDE_INT, but all code should treat it as an opaque quantity.

 -- Macro: int REAL_VALUES_EQUAL (REAL_VALUE_TYPE X, REAL_VALUE_TYPE Y)
     Compares for equality the two values, X and Y.  If the target floating point format supports negative zeroes and/or NaNs, REAL_VALUES_EQUAL (-0.0, 0.0) is true, and REAL_VALUES_EQUAL (NaN, NaN) is false.

 -- Macro: int REAL_VALUES_LESS (REAL_VALUE_TYPE X, REAL_VALUE_TYPE Y)
     Tests whether X is less than Y.

 -- Macro: HOST_WIDE_INT REAL_VALUE_FIX (REAL_VALUE_TYPE X)
     Truncates X to a signed integer, rounding toward zero.

 -- Macro: unsigned HOST_WIDE_INT REAL_VALUE_UNSIGNED_FIX (REAL_VALUE_TYPE X)
     Truncates X to an unsigned integer, rounding toward zero.  If X is negative, returns zero.

 -- Macro: REAL_VALUE_TYPE REAL_VALUE_ATOF (const char *STRING, enum machine_mode MODE)
     Converts STRING into a floating point number in the target machine's representation for mode MODE.  This routine can handle both decimal and hexadecimal floating point constants, using the syntax defined by the C language for both.

 -- Macro: int REAL_VALUE_NEGATIVE (REAL_VALUE_TYPE X)
     Returns 1 if X is negative (including negative zero), 0 otherwise.

 -- Macro: int REAL_VALUE_ISINF (REAL_VALUE_TYPE X)
     Determines whether X represents infinity (positive or negative).

 -- Macro: int REAL_VALUE_ISNAN (REAL_VALUE_TYPE X)
     Determines whether X represents a ``NaN'' (not-a-number).

 -- Macro: void REAL_ARITHMETIC (REAL_VALUE_TYPE OUTPUT, enum tree_code CODE, REAL_VALUE_TYPE X, REAL_VALUE_TYPE Y)
     Calculates an arithmetic operation on the two floating point values X and Y, storing the result in OUTPUT (which must be a variable).

     The operation to be performed is specified by CODE.  Only the following codes are supported: PLUS_EXPR, MINUS_EXPR, MULT_EXPR, RDIV_EXPR, MAX_EXPR, MIN_EXPR.

     If REAL_ARITHMETIC is asked to evaluate division by zero and the target's floating point format cannot represent infinity, it will call abort.  Callers should check for this situation first, using MODE_HAS_INFINITIES.  See Storage Layout.

 -- Macro: REAL_VALUE_TYPE REAL_VALUE_NEGATE (REAL_VALUE_TYPE X)
     Returns the negative of the floating point value X.

 -- Macro: REAL_VALUE_TYPE REAL_VALUE_ABS (REAL_VALUE_TYPE X)
     Returns the absolute value of X.

 -- Macro: void REAL_VALUE_TO_INT (HOST_WIDE_INT LOW, HOST_WIDE_INT HIGH, REAL_VALUE_TYPE X)
     Converts a floating point value X into a double-precision integer which is then stored into LOW and HIGH.  If the value is not integral, it is truncated.

 -- Macro: void REAL_VALUE_FROM_INT (REAL_VALUE_TYPE X, HOST_WIDE_INT LOW, HOST_WIDE_INT HIGH, enum machine_mode MODE)
     Converts a double-precision integer found in LOW and HIGH, into a floating point value which is then stored into X.  The value is truncated to fit in mode MODE.

Mode Switching Instructions
===========================

The following macros control mode switching optimizations:

 -- Macro: OPTIMIZE_MODE_SWITCHING (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 TARGET_MACHINE_DEPENDENT_REORG.

     You can have multiple entities that are mode-switched, and select at run time which entities actually need it.  OPTIMIZE_MODE_SWITCHING should return nonzero for any ENTITY that needs mode-switching. If you define this macro, you also have to define NUM_MODES_FOR_MODE_SWITCHING, MODE_NEEDED, MODE_PRIORITY_TO_MODE and EMIT_MODE_SET. MODE_AFTER, MODE_ENTRY, and MODE_EXIT are optional.

 -- Macro: NUM_MODES_FOR_MODE_SWITCHING
     If you define 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.

 -- Macro: MODE_NEEDED (ENTITY, INSN)
     ENTITY is an integer specifying a mode-switched entity.  If 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 ENTITY must be switched into prior to the execution of INSN.

 -- Macro: MODE_AFTER (ENTITY, MODE, INSN)
     ENTITY is an integer specifying a mode-switched entity.  If this macro is defined, it is evaluated for every INSN during mode switching.  It determines the mode that an insn results in (if different from the incoming mode).

 -- Macro: MODE_ENTRY (ENTITY)
     If this macro is defined, it is evaluated for every ENTITY that needs mode switching.  It should evaluate to an integer, which is a mode that ENTITY is assumed to be switched to at function entry.  If MODE_ENTRY is defined then MODE_EXIT must be defined.

 -- Macro: MODE_EXIT (ENTITY)
     If this macro is defined, it is evaluated for every ENTITY that needs mode switching.  It should evaluate to an integer, which is a mode that ENTITY is assumed to be switched to at function exit.  If MODE_EXIT is defined then MODE_ENTRY must be defined.

 -- Macro: MODE_PRIORITY_TO_MODE (ENTITY, 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 ENTITY, mode_priority_to_mode (ENTITY, N) shall be a bijection in 0 ... num_modes_for_mode_switching[ENTITY] - 1.

 -- Macro: EMIT_MODE_SET (ENTITY, MODE, HARD_REGS_LIVE)
     Generate one or more insns to set ENTITY to MODE. HARD_REG_LIVE is the set of hard registers live at the point where the insn(s) are to be inserted.

Defining target-specific uses of __attribute__
==============================================

Target-specific attributes may be defined for functions, data and types. These are described using the following target hooks; they also need to be documented in extend.texi.

 -- Target Hook: const struct attribute_spec * TARGET_ATTRIBUTE_TABLE
     If defined, this target hook points to an array of struct attribute_spec (defined in tree.h) specifying the machine specific attributes for this target and some of the restrictions on the entities to which these attributes are applied and the arguments they take.

 -- Target Hook: bool TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P (const_tree NAME)
     If defined, this target hook is a function which returns true if the machine-specific attribute named NAME expects an identifier given as its first argument to be passed on as a plain identifier, not subjected to name lookup.  If this is not defined, the default is false for all machine-specific attributes.

 -- Target Hook: int TARGET_COMP_TYPE_ATTRIBUTES (const_tree TYPE1, const_tree TYPE2)
     If defined, this target hook is a function which returns zero if the attributes on TYPE1 and TYPE2 are incompatible, one if they are compatible, and two if they are nearly compatible (which causes a warning to be generated).  If this is not defined, machine-specific attributes are supposed always to be compatible.

 -- Target Hook: void TARGET_SET_DEFAULT_TYPE_ATTRIBUTES (tree TYPE)
     If defined, this target hook is a function which assigns default attributes to the newly defined TYPE.

 -- Target Hook: tree TARGET_MERGE_TYPE_ATTRIBUTES (tree TYPE1, tree TYPE2)
     Define this target hook if the merging of type attributes needs special handling.  If defined, the result is a list of the combined TYPE_ATTRIBUTES of TYPE1 and TYPE2.  It is assumed that comptypes has already been called and returned 1.  This function may call merge_attributes to handle machine-independent merging.

 -- Target Hook: tree TARGET_MERGE_DECL_ATTRIBUTES (tree OLDDECL, tree NEWDECL)
     Define this target hook if the merging of decl attributes needs special handling.  If defined, the result is a list of the combined DECL_ATTRIBUTES of OLDDECL and NEWDECL. NEWDECL is a duplicate declaration of OLDDECL.  Examples of when this is needed are when one attribute overrides another, or when an attribute is nullified by a subsequent definition.  This function may call merge_attributes to handle machine-independent merging.

     If the only target-specific handling you require is dllimport for Microsoft Windows targets, you should define the macro TARGET_DLLIMPORT_DECL_ATTRIBUTES to 1.  The compiler will then define a function called merge_dllimport_decl_attributes which can then be defined as the expansion of TARGET_MERGE_DECL_ATTRIBUTES.  You can also add handle_dll_attribute in the attribute table for your port to perform initial processing of the dllimport and dllexport attributes.  This is done in i386/cygwin.h and i386/i386.c, for example.

 -- Target Hook: bool TARGET_VALID_DLLIMPORT_ATTRIBUTE_P (const_tree DECL)
     DECL is a variable or function with __attribute__((dllimport)) specified.  Use this hook if the target needs to add extra validation checks to handle_dll_attribute.

 -- Macro: TARGET_DECLSPEC
     Define this macro to a nonzero value if you want to treat __declspec(X) as equivalent to __attribute((X)).  By default, this behavior is enabled only for targets that define TARGET_DLLIMPORT_DECL_ATTRIBUTES.  The current implementation of __declspec is via a built-in macro, but you should not rely on this implementation detail.

 -- Target Hook: void TARGET_INSERT_ATTRIBUTES (tree NODE, tree *ATTR_PTR)
     Define this target hook if you want to be able to add attributes to a decl when it is being created.  This is normally useful for back ends which wish to implement a pragma by using the attributes which correspond to the pragma's effect.  The NODE argument is the decl which is being created.  The ATTR_PTR argument is a pointer to the attribute list for this decl.  The list itself should not be modified, since it may be shared with other decls, but attributes may be chained on the head of the list and *ATTR_PTR modified to point to the new attributes, or a copy of the list may be made if further changes are needed.

 -- Target Hook: bool TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P (const_tree FNDECL)
     This target hook returns true if it is ok to inline FNDECL into the current function, despite its having target-specific attributes, false otherwise.  By default, if a function has a target specific attribute attached to it, it will not be inlined.

 -- Target Hook: bool TARGET_OPTION_VALID_ATTRIBUTE_P (tree FNDECL, tree NAME, tree ARGS, int FLAGS)
     This hook is called to parse attribute(target("...")), which allows setting target-specific options on individual functions. These function-specific options may differ from the options specified on the command line.  The hook should return true if the options are valid.

     The hook should set the DECL_FUNCTION_SPECIFIC_TARGET field in the function declaration to hold a pointer to a target-specific struct cl_target_option structure.

 -- Target Hook: void TARGET_OPTION_SAVE (struct cl_target_option *PTR)
     This hook is called to save any additional target-specific information in the struct cl_target_option structure for function-specific options. See Option file format.

 -- Target Hook: void TARGET_OPTION_RESTORE (struct cl_target_option *PTR)
     This hook is called to restore any additional target-specific information in the struct cl_target_option structure for function-specific options.

 -- Target Hook: void TARGET_OPTION_PRINT (FILE *FILE, int INDENT, struct cl_target_option *PTR)
     This hook is called to print any additional target-specific information in the struct cl_target_option structure for function-specific options.

 -- Target Hook: bool TARGET_OPTION_PRAGMA_PARSE (tree ARGS, tree POP_TARGET)
     This target hook parses the options for #pragma GCC target, which sets the target-specific options for functions that occur later in the input stream.  The options accepted should be the same as those handled by the TARGET_OPTION_VALID_ATTRIBUTE_P hook.

 -- Target Hook: void TARGET_OPTION_OVERRIDE (void)
     Sometimes certain combinations of command options do not make sense on a particular target machine.  You can override the hook TARGET_OPTION_OVERRIDE to take account of this.  This hooks is called once just after all the command options have been parsed.

     Don't use this hook to turn on various extra optimizations for -O.  That is what TARGET_OPTION_OPTIMIZATION is for.

     If you need to do something whenever the optimization level is changed via the optimize attribute or pragma, see TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE

 -- Target Hook: bool TARGET_OPTION_FUNCTION_VERSIONS (tree DECL1, tree DECL2)
     This target hook returns true if DECL1 and DECL2 are versions of the same function.  DECL1 and DECL2 are function versions if and only if they have the same function signature and different target specific attributes, that is, they are compiled for different target machines.

 -- Target Hook: bool TARGET_CAN_INLINE_P (tree CALLER, tree CALLEE)
     This target hook returns false if the CALLER function cannot inline CALLEE, based on target specific information.  By default, inlining is not allowed if the callee function has function specific target options and the caller does not use the same options.

Emulating TLS
=============

For targets whose psABI does not provide Thread Local Storage via specific relocations and instruction sequences, an emulation layer is used.  A set of target hooks allows this emulation layer to be configured for the requirements of a particular target.  For instance the psABI may in fact specify TLS support in terms of an emulation layer.

The emulation layer works by creating a control object for every TLS object.  To access the TLS object, a lookup function is provided which, when given the address of the control object, will return the address of the current thread's instance of the TLS object.

 -- Target Hook: const char * TARGET_EMUTLS_GET_ADDRESS
     Contains the name of the helper function that uses a TLS control object to locate a TLS instance.  The default causes libgcc's emulated TLS helper function to be used.

 -- Target Hook: const char * TARGET_EMUTLS_REGISTER_COMMON
     Contains the name of the helper function that should be used at program startup to register TLS objects that are implicitly initialized to zero.  If this is NULL, all TLS objects will have explicit initializers.  The default causes libgcc's emulated TLS registration function to be used.

 -- Target Hook: const char * TARGET_EMUTLS_VAR_SECTION
     Contains the name of the section in which TLS control variables should be placed.  The default of NULL allows these to be placed in any section.

 -- Target Hook: const char * TARGET_EMUTLS_TMPL_SECTION
     Contains the name of the section in which TLS initializers should be placed.  The default of NULL allows these to be placed in any section.

 -- Target Hook: const char * TARGET_EMUTLS_VAR_PREFIX
     Contains the prefix to be prepended to TLS control variable names. The default of NULL uses a target-specific prefix.

 -- Target Hook: const char * TARGET_EMUTLS_TMPL_PREFIX
     Contains the prefix to be prepended to TLS initializer objects.  The default of NULL uses a target-specific prefix.

 -- Target Hook: tree TARGET_EMUTLS_VAR_FIELDS (tree TYPE, tree *NAME)
     Specifies a function that generates the FIELD_DECLs for a TLS control object type.  TYPE is the RECORD_TYPE the fields are for and NAME should be filled with the structure tag, if the default of __emutls_object is unsuitable.  The default creates a type suitable for libgcc's emulated TLS function.

 -- Target Hook: tree TARGET_EMUTLS_VAR_INIT (tree VAR, tree DECL, tree TMPL_ADDR)
     Specifies a function that generates the CONSTRUCTOR to initialize a TLS control object.  VAR is the TLS control object, DECL is the TLS object and TMPL_ADDR is the address of the initializer.  The default initializes libgcc's emulated TLS control object.

 -- Target Hook: bool TARGET_EMUTLS_VAR_ALIGN_FIXED
     Specifies whether the alignment of TLS control variable objects is fixed and should not be increased as some backends may do to optimize single objects.  The default is false.

 -- Target Hook: bool TARGET_EMUTLS_DEBUG_FORM_TLS_ADDRESS
     Specifies whether a DWARF DW_OP_form_tls_address location descriptor may be used to describe emulated TLS control objects.

Defining coprocessor specifics for MIPS targets.
================================================

The MIPS specification allows MIPS implementations to have as many as 4 coprocessors, each with as many as 32 private registers.  GCC supports accessing these registers and transferring values between the registers and memory using asm-ized variables.  For example:

       register unsigned int cp0count asm ("c0r1");
       unsigned int d;

       d = cp0count + 3;

(``c0r1'' is the default name of register 1 in coprocessor 0; alternate names may be added as described below, or the default names may be overridden entirely in SUBTARGET_CONDITIONAL_REGISTER_USAGE.)

Coprocessor registers are assumed to be epilogue-used; sets to them will be preserved even if it does not appear that the register is used again later in the function.

Another note: according to the MIPS spec, coprocessor 1 (if present) is the FPU.  One accesses COP1 registers through standard mips floating-point support; they are not included in this mechanism.

There is one macro used in defining the MIPS coprocessor interface which you may want to override in subtargets; it is described below.

Parameters for Precompiled Header Validity Checking
===================================================

 -- Target Hook: void * TARGET_GET_PCH_VALIDITY (size_t *SZ)
     This hook returns a pointer to the data needed by TARGET_PCH_VALID_P and sets *SZ to the size of the data in bytes.

 -- Target Hook: const char * TARGET_PCH_VALID_P (const void *DATA, size_t SZ)
     This hook checks whether the options used to create a PCH file are compatible with the current settings.  It returns NULL if so and a suitable error message if not.  Error messages will be presented to the user and must be localized using _(MSG).

     DATA is the data that was returned by TARGET_GET_PCH_VALIDITY when the PCH file was created and SZ is the size of that data in bytes. It's safe to assume that the data was created by the same version of the compiler, so no format checking is needed.

     The default definition of default_pch_valid_p should be suitable for most targets.

 -- Target Hook: const char * TARGET_CHECK_PCH_TARGET_FLAGS (int PCH_FLAGS)
     If this hook is nonnull, the default implementation of TARGET_PCH_VALID_P will use it to check for compatible values of target_flags.  PCH_FLAGS specifies the value that target_flags had when the PCH file was created.  The return value is the same as for TARGET_PCH_VALID_P.

 -- Target Hook: void TARGET_PREPARE_PCH_SAVE (void)
     Called before writing out a PCH file.  If the target has some garbage-collected data that needs to be in a particular state on PCH loads, it can use this hook to enforce that state.  Very few targets need to do anything here.

C++ ABI parameters
==================

 -- Target Hook: tree TARGET_CXX_GUARD_TYPE (void)
     Define this hook to override the integer type used for guard variables. These are used to implement one-time construction of static objects.  The default is long_long_integer_type_node.

 -- Target Hook: bool TARGET_CXX_GUARD_MASK_BIT (void)
     This hook determines how guard variables are used.  It should return false (the default) if the first byte should be used.  A return value of true indicates that only the least significant bit should be used.

 -- Target Hook: tree TARGET_CXX_GET_COOKIE_SIZE (tree TYPE)
     This hook returns the size of the cookie to use when allocating an array whose elements have the indicated TYPE.  Assumes that it is already known that a cookie is needed.  The default is max(sizeof (size_t), alignof(type)), as defined in section 2.7 of the IA64/Generic C++ ABI.

 -- Target Hook: bool TARGET_CXX_COOKIE_HAS_SIZE (void)
     This hook should return true if the element size should be stored in array cookies.  The default is to return false.

 -- Target Hook: int TARGET_CXX_IMPORT_EXPORT_CLASS (tree TYPE, int IMPORT_EXPORT)
     If defined by a backend this hook allows the decision made to export class TYPE to be overruled.  Upon entry IMPORT_EXPORT will contain 1 if the class is going to be exported, -1 if it is going to be imported and 0 otherwise.  This function should return the modified value and perform any other actions necessary to support the backend's targeted operating system.

 -- Target Hook: bool TARGET_CXX_CDTOR_RETURNS_THIS (void)
     This hook should return true if constructors and destructors return the address of the object created/destroyed.  The default is to return false.

 -- Target Hook: bool TARGET_CXX_KEY_METHOD_MAY_BE_INLINE (void)
     This hook returns true if the key method for a class (i.e., the method which, if defined in the current translation unit, causes the virtual table to be emitted) may be an inline function.  Under the standard Itanium C++ ABI the key method may be an inline function so long as the function is not declared inline in the class definition.  Under some variants of the ABI, an inline function can never be the key method.  The default is to return true.

 -- Target Hook: void TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY (tree DECL)
     DECL is a virtual table, virtual table table, typeinfo object, or other similar implicit class data object that will be emitted with external linkage in this translation unit.  No ELF visibility has been explicitly specified.  If the target needs to specify a visibility other than that of the containing class, use this hook to set DECL_VISIBILITY and DECL_VISIBILITY_SPECIFIED.

 -- Target Hook: bool TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT (void)
     This hook returns true (the default) if virtual tables and other similar implicit class data objects are always COMDAT if they have external linkage.  If this hook returns false, then class data for classes whose virtual table will be emitted in only one translation unit will not be COMDAT.

 -- Target Hook: bool TARGET_CXX_LIBRARY_RTTI_COMDAT (void)
     This hook returns true (the default) if the RTTI information for the basic types which is defined in the C++ runtime should always be COMDAT, false if it should not be COMDAT.

 -- Target Hook: bool TARGET_CXX_USE_AEABI_ATEXIT (void)
     This hook returns true if __aeabi_atexit (as defined by the ARM EABI) should be used to register static destructors when -fuse-cxa-atexit is in effect.  The default is to return false to use __cxa_atexit.

 -- Target Hook: bool TARGET_CXX_USE_ATEXIT_FOR_CXA_ATEXIT (void)
     This hook returns true if the target atexit function can be used in the same manner as __cxa_atexit to register C++ static destructors. This requires that atexit-registered functions in shared libraries are run in the correct order when the libraries are unloaded. The default is to return false.

 -- Target Hook: void TARGET_CXX_ADJUST_CLASS_AT_DEFINITION (tree TYPE)
     TYPE is a C++ class (i.e., RECORD_TYPE or UNION_TYPE) that has just been defined.  Use this hook to make adjustments to the class (eg, tweak visibility or perform any other required target modifications).

 -- Target Hook: tree TARGET_CXX_DECL_MANGLING_CONTEXT (const_tree DECL)
     Return target-specific mangling context of DECL or NULL_TREE.

Adding support for named address spaces
=======================================

The draft technical report of the ISO/IEC JTC1 S22 WG14 N1275 standards committee, Programming Languages - C - Extensions to support embedded processors, specifies a syntax for embedded processors to specify alternate address spaces.  You can configure a GCC port to support section 5.1 of the draft report to add support for address spaces other than the default address space.  These address spaces are new keywords that are similar to the volatile and const type attributes.

Pointers to named address spaces can have a different size than pointers to the generic address space.

For example, the SPU port uses the __ea address space to refer to memory in the host processor, rather than memory local to the SPU processor.  Access to memory in the __ea address space involves issuing DMA operations to move data between the host processor and the local processor memory address space.  Pointers in the __ea address space are either 32 bits or 64 bits based on the -mea32 or -mea64 switches (native SPU pointers are always 32 bits).

Internally, address spaces are represented as a small integer in the range 0 to 15 with address space 0 being reserved for the generic address space.

To register a named address space qualifier keyword with the C front end, the target may call the c_register_addr_space routine.  For example, the SPU port uses the following to declare __ea as the keyword for named address space #1:

     #define ADDR_SPACE_EA 1
     c_register_addr_space ("__ea", ADDR_SPACE_EA);

 -- Target Hook: enum machine_mode TARGET_ADDR_SPACE_POINTER_MODE (addr_space_t ADDRESS_SPACE)
     Define this to return the machine mode to use for pointers to ADDRESS_SPACE if the target supports named address spaces. The default version of this hook returns ptr_mode for the generic address space only.

 -- Target Hook: enum machine_mode TARGET_ADDR_SPACE_ADDRESS_MODE (addr_space_t ADDRESS_SPACE)
     Define this to return the machine mode to use for addresses in ADDRESS_SPACE if the target supports named address spaces. The default version of this hook returns Pmode for the generic address space only.

 -- Target Hook: bool TARGET_ADDR_SPACE_VALID_POINTER_MODE (enum machine_mode MODE, addr_space_t AS)
     Define this to return nonzero if the port can handle pointers with machine mode MODE to address space AS.  This target hook is the same as the TARGET_VALID_POINTER_MODE target hook, except that it includes explicit named address space support.  The default version of this hook returns true for the modes returned by either the TARGET_ADDR_SPACE_POINTER_MODE or TARGET_ADDR_SPACE_ADDRESS_MODE target hooks for the given address space.

 -- Target Hook: bool TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P (enum machine_mode MODE, rtx EXP, bool STRICT, addr_space_t AS)
     Define this to return true if EXP is a valid address for mode MODE in the named address space AS.  The STRICT parameter says whether strict addressing is in effect after reload has finished.  This target hook is the same as the TARGET_LEGITIMATE_ADDRESS_P target hook, except that it includes explicit named address space support.

 -- Target Hook: rtx TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS (rtx X, rtx OLDX, enum machine_mode MODE, addr_space_t AS)
     Define this to modify an invalid address X to be a valid address with mode MODE in the named address space AS.  This target hook is the same as the TARGET_LEGITIMIZE_ADDRESS target hook, except that it includes explicit named address space support.

 -- Target Hook: bool TARGET_ADDR_SPACE_SUBSET_P (addr_space_t SUBSET, addr_space_t SUPERSET)
     Define this to return whether the SUBSET named address space is contained within the SUPERSET named address space.  Pointers to a named address space that is a subset of another named address space will be converted automatically without a cast if used together in arithmetic operations.  Pointers to a superset address space can be converted to pointers to a subset address space via explicit casts.

 -- Target Hook: rtx TARGET_ADDR_SPACE_CONVERT (rtx OP, tree FROM_TYPE, tree TO_TYPE)
     Define this to convert the pointer expression represented by the RTL OP with type FROM_TYPE that points to a named address space to a new pointer expression with type TO_TYPE that points to a different named address space.  When this hook it called, it is guaranteed that one of the two address spaces is a subset of the other, as determined by the TARGET_ADDR_SPACE_SUBSET_P target hook.

Miscellaneous Parameters
========================

Here are several miscellaneous parameters.

 -- Macro: HAS_LONG_COND_BRANCH
     Define this boolean macro to indicate whether or not your architecture has conditional branches that can span all of memory.  It is used in conjunction with an optimization that partitions hot and cold basic blocks into separate sections of the executable.  If this macro is set to false, gcc will convert any conditional branches that attempt to cross between sections into unconditional branches or indirect jumps.

 -- Macro: HAS_LONG_UNCOND_BRANCH
     Define this boolean macro to indicate whether or not your architecture has unconditional branches that can span all of memory.  It is used in conjunction with an optimization that partitions hot and cold basic blocks into separate sections of the executable.  If this macro is set to false, gcc will convert any unconditional branches that attempt to cross between sections into indirect jumps.

 -- Macro: CASE_VECTOR_MODE
     An alias for a machine mode name.  This is the machine mode that elements of a jump-table should have.

 -- Macro: CASE_VECTOR_SHORTEN_MODE (MIN_OFFSET, MAX_OFFSET, BODY)
     Optional: return the preferred mode for an addr_diff_vec when the minimum and maximum offset are known.  If you define this, it enables extra code in branch shortening to deal with addr_diff_vec. To make this work, you also have to define INSN_ALIGN and make the alignment for addr_diff_vec explicit. The BODY argument is provided so that the offset_unsigned and scale flags can be updated.

 -- Macro: CASE_VECTOR_PC_RELATIVE
     Define this macro to be a C expression to indicate when jump-tables should contain relative addresses.  You need not define this macro if jump-tables never contain relative addresses, or jump-tables should contain relative addresses only when -fPIC or -fPIC is in effect.

 -- Target Hook: unsigned int TARGET_CASE_VALUES_THRESHOLD (void)
     This function return the smallest number of different values for which it is best to use a jump-table instead of a tree of conditional branches. The default is four for machines with a casesi instruction and five otherwise.  This is best for most machines.

 -- Macro: WORD_REGISTER_OPERATIONS
     Define this macro if operations between registers with integral mode smaller than a word are always performed on the entire register. Most RISC machines have this property and most CISC machines do not.

 -- Macro: LOAD_EXTEND_OP (MEM_MODE)
     Define this macro to be a C expression indicating when insns that read memory in MEM_MODE, an integral mode narrower than a word, set the bits outside of MEM_MODE to be either the sign-extension or the zero-extension of the data read.  Return SIGN_EXTEND for values of MEM_MODE for which the insn sign-extends, ZERO_EXTEND for which it zero-extends, and UNKNOWN for other modes.

     This macro is not called with MEM_MODE non-integral or with a width greater than or equal to BITS_PER_WORD, so you may return any value in this case.  Do not define this macro if it would always return UNKNOWN.  On machines where this macro is defined, you will normally define it as the constant SIGN_EXTEND or ZERO_EXTEND.

     You may return a non-UNKNOWN value even if for some hard registers the sign extension is not performed, if for the REGNO_REG_CLASS of these hard registers CANNOT_CHANGE_MODE_CLASS returns nonzero when the FROM mode is MEM_MODE and the TO mode is any integral mode larger than this but not larger than word_mode.

     You must return UNKNOWN if for some hard registers that allow this mode, CANNOT_CHANGE_MODE_CLASS says that they cannot change to word_mode, but that they can change to another integral mode that is larger then MEM_MODE but still smaller than word_mode.

 -- Macro: SHORT_IMMEDIATES_SIGN_EXTEND
     Define this macro if loading short immediate values into registers sign extends.

 -- Target Hook: unsigned int TARGET_MIN_DIVISIONS_FOR_RECIP_MUL (enum machine_mode MODE)
     When -ffast-math is in effect, GCC tries to optimize divisions by the same divisor, by turning them into multiplications by the reciprocal.  This target hook specifies the minimum number of divisions that should be there for GCC to perform the optimization for a variable of mode MODE.  The default implementation returns 3 if the machine has an instruction for the division, and 2 if it does not.

 -- Macro: MOVE_MAX
     The maximum number of bytes that a single instruction can move quickly between memory and registers or between two memory locations.

 -- Macro: MAX_MOVE_MAX
     The maximum number of bytes that a single instruction can move quickly between memory and registers or between two memory locations.  If this is undefined, the default is MOVE_MAX.  Otherwise, it is the constant value that is the largest value that MOVE_MAX can have at run-time.

 -- Macro: SHIFT_COUNT_TRUNCATED
     A C expression that is nonzero if on this machine the number of bits actually used for the count of a shift operation is equal to the number of bits needed to represent the size of the object being shifted.  When this macro is nonzero, the compiler will assume that it is safe to omit a sign-extend, zero-extend, and certain bitwise `and' instructions that truncates the count of a shift operation.  On machines that have instructions that act on bit-fields at variable positions, which may include `bit test' instructions, a nonzero SHIFT_COUNT_TRUNCATED also enables deletion of truncations of the values that serve as arguments to bit-field instructions.

     If both types of instructions truncate the count (for shifts) and position (for bit-field operations), or if no variable-position bit-field instructions exist, you should define this macro.

     However, on some machines, such as the 80386 and the 680x0, truncation only applies to shift operations and not the (real or pretended) bit-field operations.  Define SHIFT_COUNT_TRUNCATED to be zero on such machines.  Instead, add patterns to the md file that include the implied truncation of the shift instructions.

     You need not define this macro if it would always have the value of zero.

 -- Target Hook: unsigned HOST_WIDE_INT TARGET_SHIFT_TRUNCATION_MASK (enum machine_mode MODE)
     This function describes how the standard shift patterns for MODE deal with shifts by negative amounts or by more than the width of the mode. See shift patterns.

     On many machines, the shift patterns will apply a mask M to the shift count, meaning that a fixed-width shift of X by Y is equivalent to an arbitrary-width shift of X by Y & M.  If this is true for mode MODE, the function should return M, otherwise it should return 0.  A return value of 0 indicates that no particular behavior is guaranteed.

     Note that, unlike SHIFT_COUNT_TRUNCATED, this function does not apply to general shift rtxes; it applies only to instructions that are generated by the named shift patterns.

     The default implementation of this function returns GET_MODE_BITSIZE (MODE) - 1 if SHIFT_COUNT_TRUNCATED and 0 otherwise.  This definition is always safe, but if SHIFT_COUNT_TRUNCATED is false, and some shift patterns nevertheless truncate the shift count, you may get better code by overriding it.

 -- Macro: TRULY_NOOP_TRUNCATION (OUTPREC, INPREC)
     A C expression which is nonzero if on this machine it is safe to ``convert'' an integer of INPREC bits to one of OUTPREC bits (where OUTPREC is smaller than INPREC) by merely operating on it as if it had only OUTPREC bits.

     On many machines, this expression can be 1.

     When TRULY_NOOP_TRUNCATION returns 1 for a pair of sizes for modes for which MODES_TIEABLE_P is 0, suboptimal code can result. If this is the case, making TRULY_NOOP_TRUNCATION return 0 in such cases may improve things.

 -- Target Hook: int TARGET_MODE_REP_EXTENDED (enum machine_mode MODE, enum machine_mode REP_MODE)
     The representation of an integral mode can be such that the values are always extended to a wider integral mode.  Return SIGN_EXTEND if values of MODE are represented in sign-extended form to REP_MODE.  Return UNKNOWN otherwise.  (Currently, none of the targets use zero-extended representation this way so unlike LOAD_EXTEND_OP, TARGET_MODE_REP_EXTENDED is expected to return either SIGN_EXTEND or UNKNOWN.  Also no target extends MODE to REP_MODE so that REP_MODE is not the next widest integral mode and currently we take advantage of this fact.)

     Similarly to LOAD_EXTEND_OP you may return a non-UNKNOWN value even if the extension is not performed on certain hard registers as long as for the REGNO_REG_CLASS of these hard registers CANNOT_CHANGE_MODE_CLASS returns nonzero.

     Note that TARGET_MODE_REP_EXTENDED and LOAD_EXTEND_OP describe two related properties.  If you define TARGET_MODE_REP_EXTENDED (mode, word_mode) you probably also want to define LOAD_EXTEND_OP (mode) to return the same type of extension.

     In order to enforce the representation of mode, TRULY_NOOP_TRUNCATION should return false when truncating to mode.

 -- Macro: STORE_FLAG_VALUE
     A C expression describing the value returned by a comparison operator with an integral mode and stored by a store-flag instruction (cstoreMODE4) when the condition is true.  This description must apply to all the cstoreMODE4 patterns and all the comparison operators whose results have a MODE_INT mode.

     A value of 1 or -1 means that the instruction implementing the comparison operator returns exactly 1 or -1 when the comparison is true and 0 when the comparison is false.  Otherwise, the value indicates which bits of the result are guaranteed to be 1 when the comparison is true.  This value is interpreted in the mode of the comparison operation, which is given by the mode of the first operand in the cstoreMODE4 pattern.  Either the low bit or the sign bit of STORE_FLAG_VALUE be on.  Presently, only those bits are used by the compiler.

     If STORE_FLAG_VALUE is neither 1 or -1, the compiler will generate code that depends only on the specified bits.  It can also replace comparison operators with equivalent operations if they cause the required bits to be set, even if the remaining bits are undefined. For example, on a machine whose comparison operators return an SImode value and where STORE_FLAG_VALUE is defined as 0x80000000, saying that just the sign bit is relevant, the expression

          (ne:SI (and:SI X (const_int POWER-OF-2)) (const_int 0))

     can be converted to

          (ashift:SI X (const_int N))

     where N is the appropriate shift count to move the bit being tested into the sign bit.

     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 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 at gcc@gcc.gnu.org.

     Often, a machine will have multiple instructions that obtain a value from a comparison (or the condition codes).  Here are rules to guide the choice of value for STORE_FLAG_VALUE, and hence the instructions to be used:

       * Use the shortest sequence that yields a valid definition for STORE_FLAG_VALUE.  It is more efficient for the compiler to ``normalize'' the value (convert it to, e.g., 1 or 0) than for the comparison operators to do so because there may be opportunities to combine the normalization with other operations.

       * For equal-length sequences, use a value of 1 or -1, with -1 being slightly preferred on machines with expensive jumps and 1 preferred on other machines.

       * As a second choice, choose a value of 0x80000001 if instructions exist that set both the sign and low-order bits but do not define the others.

       * Otherwise, use a value of 0x80000000.

     Many machines can produce both the value chosen for STORE_FLAG_VALUE and its negation in the same number of instructions.  On those machines, you should also define a pattern for those cases, e.g., one matching

          (set A (neg:M (ne:M B C)))

     Some machines can also perform and or plus operations on condition code values with less instructions than the corresponding cstoreMODE4 insn followed by and or plus.  On those machines, define the appropriate patterns.  Use the names incscc and decscc, respectively, for the patterns which perform plus or minus operations on condition code values.  See rs6000.md for some examples.  The GNU Superoptimizer can be used to find such instruction sequences on other machines.

     If this macro is not defined, the default value, 1, is used.  You need not define STORE_FLAG_VALUE if the machine has no store-flag instructions, or if the value generated by these instructions is 1.

 -- Macro: FLOAT_STORE_FLAG_VALUE (MODE)
     A C expression that gives a nonzero REAL_VALUE_TYPE value that is returned when comparison operators with floating-point results are true. Define this macro on machines that have comparison operations that return floating-point values.  If there are no such operations, do not define this macro.

 -- Macro: VECTOR_STORE_FLAG_VALUE (MODE)
     A C expression that gives a rtx representing the nonzero true element for vector comparisons.  The returned rtx should be valid for the inner mode of MODE which is guaranteed to be a vector mode.  Define this macro on machines that have vector comparison operations that return a vector result.  If there are no such operations, do not define this macro.  Typically, this macro is defined as const1_rtx or constm1_rtx.  This macro may return NULL_RTX to prevent the compiler optimizing such vector comparison operations for the given mode.

 -- Macro: CLZ_DEFINED_VALUE_AT_ZERO (MODE, VALUE)
 -- Macro: CTZ_DEFINED_VALUE_AT_ZERO (MODE, VALUE)
     A C expression that indicates whether the architecture defines a value for clz or ctz with a zero operand. A result of 0 indicates the value is undefined. If the value is defined for only the RTL expression, the macro should evaluate to 1; if the value applies also to the corresponding optab entry (which is normally the case if it expands directly into the corresponding RTL), then the macro should evaluate to 2. In the cases where the value is defined, VALUE should be set to this value.

     If this macro is not defined, the value of clz or ctz at zero is assumed to be undefined.

     This macro must be defined if the target's expansion for ffs relies on a particular value to get correct results.  Otherwise it is not necessary, though it may be used to optimize some corner cases, and to provide a default expansion for the ffs optab.

     Note that regardless of this macro the ``definedness'' of clz and ctz at zero do not extend to the builtin functions visible to the user.  Thus one may be free to adjust the value at will to match the target expansion of these operations without fear of breaking the API.

 -- Macro: Pmode
     An alias for the machine mode for pointers.  On most machines, define this to be the integer mode corresponding to the width of a hardware pointer; SImode on 32-bit machine or DImode on 64-bit machines. On some machines you must define this to be one of the partial integer modes, such as PSImode.

     The width of Pmode must be at least as large as the value of POINTER_SIZE.  If it is not equal, you must define the macro POINTERS_EXTEND_UNSIGNED to specify how pointers are extended to Pmode.

 -- Macro: FUNCTION_MODE
     An alias for the machine mode used for memory references to functions being called, in call RTL expressions.  On most CISC machines, where an instruction can begin at any byte address, this should be QImode.  On most RISC machines, where all instructions have fixed size and alignment, this should be a mode with the same size and alignment as the machine instruction words - typically SImode or HImode.

 -- Macro: STDC_0_IN_SYSTEM_HEADERS
     In normal operation, the preprocessor expands __STDC__ to the constant 1, to signify that GCC conforms to ISO Standard C.  On some hosts, like Solaris, the system compiler uses a different convention, where __STDC__ is normally 0, but is 1 if the user specifies strict conformance to the C Standard.

     Defining STDC_0_IN_SYSTEM_HEADERS makes GNU CPP follows the host convention when processing system header files, but when processing user files __STDC__ will always expand to 1.

 -- C Target Hook: const char * TARGET_C_PREINCLUDE (void)
     Define this hook to return the name of a header file to be included at the start of all compilations, as if it had been included with #include <FILE>.  If this hook returns NULL, or is not defined, or the header is not found, or if the user specifies -ffreestanding or -nostdinc, no header is included.

     This hook can be used together with a header provided by the system C library to implement ISO C requirements for certain macros to be predefined that describe properties of the whole implementation rather than just the compiler.

 -- Macro: NO_IMPLICIT_EXTERN_C
     Define this macro if the system header files support C++ as well as C. This macro inhibits the usual method of using system header files in C++, which is to pretend that the file's contents are enclosed in extern "C" {...}.

 -- Macro: REGISTER_TARGET_PRAGMAS ()
     Define this macro if you want to implement any target-specific pragmas. If defined, it is a C expression which makes a series of calls to c_register_pragma or c_register_pragma_with_expansion for each pragma.  The macro may also do any setup required for the pragmas.

     The primary reason to define this macro is to provide compatibility with other compilers for the same target.  In general, we discourage definition of target-specific pragmas for GCC.

     If the pragma can be implemented by attributes then you should consider defining the target hook TARGET_INSERT_ATTRIBUTES as well.

     Preprocessor macros that appear on pragma lines are not expanded.  All #pragma directives that do not match any registered pragma are silently ignored, unless the user specifies -Wunknown-pragmas.

 -- Function: void c_register_pragma (const char *SPACE, const char *NAME, void (*CALLBACK) (struct cpp_reader *))
 -- Function: void c_register_pragma_with_expansion (const char *SPACE, const char *NAME, void (*CALLBACK) (struct cpp_reader *))

     Each call to c_register_pragma or c_register_pragma_with_expansion establishes one pragma.  The CALLBACK routine will be called when the preprocessor encounters a pragma of the form

          #pragma [SPACE] NAME ...

     SPACE is the case-sensitive namespace of the pragma, or NULL to put the pragma in the global namespace.  The callback routine receives PFILE as its first argument, which can be passed on to cpplib's functions if necessary.  You can lex tokens after the NAME by calling pragma_lex.  Tokens that are not read by the callback will be silently ignored.  The end of the line is indicated by a token of type CPP_EOF.  Macro expansion occurs on the arguments of pragmas registered with c_register_pragma_with_expansion but not on the arguments of pragmas registered with c_register_pragma.

     Note that the use of 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 pragma_lex is going to be called from target-specific code, it must only be done so when building the C and C++ compilers.  This can be done by defining the variables c_target_objs and cxx_target_objs in the target entry in the config.gcc file.  These variables should name the target-specific, language-specific object file which contains the code that uses pragma_lex.  Note it will also be necessary to add a rule to the makefile fragment pointed to by tmake_file that shows how to build this object file.

 -- Macro: HANDLE_PRAGMA_PACK_WITH_EXPANSION
     Define this macro if macros should be expanded in the arguments of #pragma pack.

 -- Macro: TARGET_DEFAULT_PACK_STRUCT
     If your target requires a structure packing default other than 0 (meaning the machine default), define this macro to the necessary value (in bytes). This must be a value that would also be valid to use with #pragma pack() (that is, a small power of two).

 -- Macro: DOLLARS_IN_IDENTIFIERS
     Define this macro to control use of the character $ in identifier names for the C family of languages.  0 means $ is not allowed by default; 1 means it is allowed.  1 is the default; there is no need to define this macro in that case.

 -- Macro: INSN_SETS_ARE_DELAYED (INSN)
     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 INSN, even if they appear to use a resource set or clobbered in INSN. INSN is always a jump_insn or an insn; GCC knows that every call_insn has this behavior.  On machines where some insn or jump_insn is really a function call and hence has this behavior, you should define this macro.

     You need not define this macro if it would always return zero.

 -- Macro: INSN_REFERENCES_ARE_DELAYED (INSN)
     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 INSN, even if they appear to set or clobber a resource referenced in INSN. INSN is always a jump_insn or an insn.  On machines where some insn or jump_insn is really a function call and its operands are registers whose use is actually in the subroutine it calls, you should define this macro.  Doing so allows the delay slot scheduler to move instructions which copy arguments into the argument registers into the delay slot of INSN.

     You need not define this macro if it would always return zero.

 -- Macro: MULTIPLE_SYMBOL_SPACES
     Define this macro as a C expression that is nonzero if, in some cases, global symbols from one translation unit may not be bound to undefined symbols in another translation unit without user intervention.  For instance, under Microsoft Windows symbols must be explicitly imported from shared libraries (DLLs).

     You need not define this macro if it would always evaluate to zero.

 -- Target Hook: tree TARGET_MD_ASM_CLOBBERS (tree OUTPUTS, tree INPUTS, tree CLOBBERS)
     This target hook should add to CLOBBERS STRING_CST trees for any hard regs the port wishes to automatically clobber for an asm. It should return the result of the last tree_cons used to add a clobber.  The OUTPUTS, INPUTS and CLOBBER lists are the corresponding parameters to the asm and may be inspected to avoid clobbering a register that is an input or output of the asm.  You can use tree_overlaps_hard_reg_set, declared in tree.h, to test for overlap with regards to asm-declared registers.

 -- Macro: MATH_LIBRARY
     Define this macro as a C string constant for the linker argument to link in the system math library, minus the initial "-l", or "" if the target does not have a separate math library.

     You need only define this macro if the default of "m" is wrong.

 -- Macro: 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 "LIBRARY_PATH" is wrong.

 -- Macro: TARGET_POSIX_IO
     Define this macro if the target supports the following POSIX file functions, access, mkdir and  file locking with fcntl / F_SETLKW. Defining TARGET_POSIX_IO will enable the test coverage code to use file locking when exiting a program, which avoids race conditions if the program has forked. It will also create directories at run-time for cross-profiling.

 -- Macro: 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 BRANCH_COST+1 is the default if the machine does not use cc0, and 1 if it does use cc0.

 -- Macro: IFCVT_MODIFY_TESTS (CE_INFO, TRUE_EXPR, FALSE_EXPR)
     Used if the target needs to perform machine-dependent modifications on the conditionals used for turning basic blocks into conditionally executed code. CE_INFO points to a data structure, struct ce_if_block, which contains information about the currently processed blocks.  TRUE_EXPR and FALSE_EXPR are the tests that are used for converting the then-block and the else-block, respectively.  Set either TRUE_EXPR or FALSE_EXPR to a null pointer if the tests cannot be converted.

 -- Macro: IFCVT_MODIFY_MULTIPLE_TESTS (CE_INFO, BB, TRUE_EXPR, FALSE_EXPR)
     Like IFCVT_MODIFY_TESTS, but used when converting more complicated if-statements into conditions combined by and and or operations. BB contains the basic block that contains the test that is currently being processed and about to be turned into a condition.

 -- Macro: IFCVT_MODIFY_INSN (CE_INFO, PATTERN, INSN)
     A C expression to modify the PATTERN of an INSN that is to be converted to conditional execution format.  CE_INFO points to a data structure, struct ce_if_block, which contains information about the currently processed blocks.

 -- Macro: IFCVT_MODIFY_FINAL (CE_INFO)
     A C expression to perform any final machine dependent modifications in converting code to conditional execution.  The involved basic blocks can be found in the struct ce_if_block structure that is pointed to by CE_INFO.

 -- Macro: IFCVT_MODIFY_CANCEL (CE_INFO)
     A C expression to cancel any machine dependent modifications in converting code to conditional execution.  The involved basic blocks can be found in the struct ce_if_block structure that is pointed to by CE_INFO.

 -- Macro: IFCVT_MACHDEP_INIT (CE_INFO)
     A C expression to initialize any machine specific data for if-conversion of the if-block in the struct ce_if_block structure that is pointed to by CE_INFO.

 -- Target Hook: void TARGET_MACHINE_DEPENDENT_REORG (void)
     If non-null, this hook performs a target-specific pass over the instruction stream.  The compiler will run it at all optimization levels, just before the point at which it normally does delayed-branch scheduling.

     The exact purpose of the hook varies from target to target.  Some use it to do transformations that are necessary for correctness, such as laying out in-function constant pools or avoiding hardware hazards. Others use it as an opportunity to do some machine-dependent optimizations.

     You need not implement the hook if it has nothing to do.  The default definition is null.

 -- Target Hook: void TARGET_INIT_BUILTINS (void)
     Define this hook if you have any machine-specific built-in functions that need to be defined.  It should be a function that performs the necessary setup.

     Machine specific built-in functions can be useful to expand special machine instructions that would otherwise not normally be generated because they have no equivalent in the source language (for example, SIMD vector instructions or prefetch instructions).

     To create a built-in function, call the function lang_hooks.builtin_function which is defined by the language front end.  You can use any type nodes set up by build_common_tree_nodes; only language front ends that use those two functions will call TARGET_INIT_BUILTINS.

 -- Target Hook: tree TARGET_BUILTIN_DECL (unsigned CODE, bool INITIALIZE_P)
     Define this hook if you have any machine-specific built-in functions that need to be defined.  It should be a function that returns the builtin function declaration for the builtin function code CODE. If there is no such builtin and it cannot be initialized at this time if INITIALIZE_P is true the function should return NULL_TREE. If CODE is out of range the function should return error_mark_node.

 -- Target Hook: rtx TARGET_EXPAND_BUILTIN (tree EXP, rtx TARGET, rtx SUBTARGET, enum machine_mode MODE, int IGNORE)

     Expand a call to a machine specific built-in function that was set up by TARGET_INIT_BUILTINS.  EXP is the expression for the function call; the result should go to TARGET if that is convenient, and have mode MODE if that is convenient. SUBTARGET may be used as the target for computing one of EXP's operands.  IGNORE is nonzero if the value is to be ignored.  This function should return the result of the call to the built-in function.

 -- Target Hook: tree TARGET_RESOLVE_OVERLOADED_BUILTIN (unsigned int LOC, tree FNDECL, void *ARGLIST)
     Select a replacement for a machine specific built-in function that was set up by TARGET_INIT_BUILTINS.  This is done before regular type checking, and so allows the target to implement a crude form of function overloading.  FNDECL is the declaration of the built-in function.  ARGLIST is the list of arguments passed to the built-in function.  The result is a complete expression that implements the operation, usually another CALL_EXPR. ARGLIST really has type VEC(tree,gc)*

 -- Target Hook: tree TARGET_FOLD_BUILTIN (tree FNDECL, int N_ARGS, tree *ARGP, bool IGNORE)
     Fold a call to a machine specific built-in function that was set up by TARGET_INIT_BUILTINS.  FNDECL is the declaration of the built-in function.  N_ARGS is the number of arguments passed to the function; the arguments themselves are pointed to by ARGP. The result is another tree containing a simplified expression for the call's result.  If IGNORE is true the value will be ignored.

 -- Target Hook: int TARGET_COMPARE_VERSION_PRIORITY (tree DECL1, tree DECL2)
     This hook is used to compare the target attributes in two functions to determine which function's features get higher priority.  This is used during function multi-versioning to figure out the order in which two versions must be dispatched.  A function version with a higher priority is checked for dispatching earlier.  DECL1 and DECL2 are the two function decls that will be compared.

 -- Target Hook: tree TARGET_GET_FUNCTION_VERSIONS_DISPATCHER (void *DECL)
     This hook is used to get the dispatcher function for a set of function versions.  The dispatcher function is called to invoke the right function version at run-time. DECL is one version from a set of semantically identical versions.

 -- Target Hook: tree TARGET_GENERATE_VERSION_DISPATCHER_BODY (void *ARG)
     This hook is used to generate the dispatcher logic to invoke the right function version at run-time for a given set of function versions. ARG points to the callgraph node of the dispatcher function whose body must be generated.

 -- Target Hook: const char * TARGET_INVALID_WITHIN_DOLOOP (const_rtx INSN)

     Take an instruction in INSN and return NULL if it is valid within a low-overhead loop, otherwise return a string explaining why doloop could not be applied.

     Many targets use special registers for low-overhead looping. For any instruction that clobbers these this function should return a string indicating the reason why the doloop could not be applied. By default, the RTL loop optimizer does not use a present doloop pattern for loops containing function calls or branch on table instructions.

 -- Target Hook: bool TARGET_LEGITIMATE_COMBINED_INSN (rtx INSN)
     Take an instruction in INSN and return false if the instruction is not appropriate as a combination of two or more instructions.  The default is to accept all instructions.

 -- Macro: MD_CAN_REDIRECT_BRANCH (BRANCH1, BRANCH2)

     Take a branch insn in BRANCH1 and another in BRANCH2. Return true if redirecting BRANCH1 to the destination of BRANCH2 is possible.

     On some targets, branches may have a limited range.  Optimizing the filling of delay slots can result in branches being redirected, and this may in turn cause a branch offset to overflow.

 -- Target Hook: bool TARGET_CAN_FOLLOW_JUMP (const_rtx FOLLOWER, const_rtx FOLLOWEE)
     FOLLOWER and FOLLOWEE are JUMP_INSN instructions;  return true if FOLLOWER may be modified to follow FOLLOWEE;  false, if it can't.  For example, on some targets, certain kinds of branches can't be made to  follow through a hot/cold partitioning.

 -- Target Hook: bool TARGET_COMMUTATIVE_P (const_rtx X, int OUTER_CODE)
     This target hook returns true if X is considered to be commutative. Usually, this is just COMMUTATIVE_P (X), but the HP PA doesn't consider PLUS to be commutative inside a MEM.  OUTER_CODE is the rtx code of the enclosing rtl, if known, otherwise it is UNKNOWN.

 -- Target Hook: rtx TARGET_ALLOCATE_INITIAL_VALUE (rtx HARD_REG)

     When the initial value of a hard register has been copied in a pseudo register, it is often not necessary to actually allocate another register to this pseudo register, because the original hard register or a stack slot it has been saved into can be used.  TARGET_ALLOCATE_INITIAL_VALUE is called at the start of register allocation once for each hard register that had its initial value copied by using get_func_hard_reg_initial_val or get_hard_reg_initial_val. Possible values are NULL_RTX, if you don't want to do any special allocation, a REG rtx---that would typically be the hard register itself, if it is known not to be clobbered---or a MEM. If you are returning a MEM, this is only a hint for the allocator; it might decide to use another register anyways. You may use current_function_is_leaf or REG_N_SETS in the hook to determine if the hard register in question will not be clobbered. The default value of this hook is NULL, which disables any special allocation.

 -- Target Hook: int TARGET_UNSPEC_MAY_TRAP_P (const_rtx X, unsigned FLAGS)
     This target hook returns nonzero if X, an unspec or unspec_volatile operation, might cause a trap.  Targets can use this hook to enhance precision of analysis for unspec and unspec_volatile operations.  You may call may_trap_p_1 to analyze inner elements of X in which case FLAGS should be passed along.

 -- Target Hook: void TARGET_SET_CURRENT_FUNCTION (tree DECL)
     The compiler invokes this hook whenever it changes its current function context (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 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 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. cfun might be NULL to indicate processing at top level, outside of any function scope.

 -- Macro: 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 use .o as the suffix for object files.

 -- Macro: TARGET_EXECUTABLE_SUFFIX
     Define this macro to be a C string representing the suffix to be automatically added to executable files on your target machine.  If you do not define this macro, GCC will use the null string as the suffix for executable files.

 -- Macro: COLLECT_EXPORT_LIST
     If defined, collect2 will scan the individual object files specified on its command line and create an export list for the linker. Define this macro for systems like AIX, where the linker discards object files that are not referenced from main and uses export lists.

 -- Macro: MODIFY_JNI_METHOD_CALL (MDECL)
     Define this macro to a C expression representing a variant of the method call MDECL, if Java Native Interface (JNI) methods must be invoked differently from other methods on your target. For example, on 32-bit Microsoft Windows, JNI methods must be invoked using the stdcall calling convention and this macro is then defined as this expression:

          build_type_attribute_variant (MDECL,
                                        build_tree_list
                                        (get_identifier ("stdcall"),
                                         NULL))

 -- Target Hook: bool TARGET_CANNOT_MODIFY_JUMPS_P (void)
     This target hook returns true past the point in which new jump instructions could be created.  On machines that require a register for every jump such as the SHmedia ISA of SH5, this point would typically be reload, so this target hook should be defined to a function such as:

          static bool
          cannot_modify_jumps_past_reload_p ()
          {
            return (reload_completed || reload_in_progress);
          }

 -- Target Hook: reg_class_t TARGET_BRANCH_TARGET_REGISTER_CLASS (void)
     This target hook returns a register class for which branch target register optimizations should be applied.  All registers in this class should be usable interchangeably.  After reload, registers in this class will be re-allocated and loads will be hoisted out of loops and be subjected to inter-block scheduling.

 -- Target Hook: bool TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED (bool AFTER_PROLOGUE_EPILOGUE_GEN)
     Branch target register optimization will by default exclude callee-saved registers that are not already live during the current function; if this target hook returns true, they will be included.  The target code must than make sure that all target registers in the class returned by TARGET_BRANCH_TARGET_REGISTER_CLASS that might need saving are saved.  AFTER_PROLOGUE_EPILOGUE_GEN indicates if prologues and epilogues have already been generated.  Note, even if you only return true when AFTER_PROLOGUE_EPILOGUE_GEN is false, you still are likely to have to make special provisions in INITIAL_ELIMINATION_OFFSET to reserve space for caller-saved target registers.

 -- Target Hook: bool TARGET_HAVE_CONDITIONAL_EXECUTION (void)
     This target hook returns true if the target supports conditional execution. This target hook is required only when the target has several different modes and they have different conditional execution capability, such as ARM.

 -- Target Hook: unsigned TARGET_LOOP_UNROLL_ADJUST (unsigned NUNROLL, struct loop *LOOP)
     This target hook returns a new value for the number of times LOOP should be unrolled. The parameter NUNROLL is the number of times the loop is to be unrolled. The parameter LOOP is a pointer to the loop, which is going to be checked for unrolling. This target hook is required only when the target has special constraints like maximum number of memory accesses.

 -- Macro: POWI_MAX_MULTS
     If defined, this macro is interpreted as a signed integer C expression that specifies the maximum number of floating point multiplications that should be emitted when expanding exponentiation by an integer constant inline.  When this value is defined, exponentiation requiring more than this number of multiplications is implemented by calling the system library's pow, powf or powl routines. The default value places no upper bound on the multiplication count.

 -- Macro: void TARGET_EXTRA_INCLUDES (const char *SYSROOT, const char *IPREFIX, int STDINC)
     This target hook should register any extra include files for the target.  The parameter STDINC indicates if normal include files are present.  The parameter SYSROOT is the system root directory. The parameter IPREFIX is the prefix for the gcc directory.

 -- Macro: void TARGET_EXTRA_PRE_INCLUDES (const char *SYSROOT, const char *IPREFIX, int STDINC)
     This target hook should register any extra include files for the target before any standard headers.  The parameter STDINC indicates if normal include files are present.  The parameter SYSROOT is the system root directory.  The parameter IPREFIX is the prefix for the gcc directory.

 -- Macro: void TARGET_OPTF (char *PATH)
     This target hook should register special include paths for the target. The parameter PATH is the include to register.  On Darwin systems, this is used for Framework includes, which have semantics that are different from -I.

 -- Macro: bool TARGET_USE_LOCAL_THUNK_ALIAS_P (tree FNDECL)
     This target macro returns true if it is safe to use a local alias for a virtual function FNDECL when constructing thunks, false otherwise.  By default, the macro returns true for all functions, if a target supports aliases (i.e. defines ASM_OUTPUT_DEF), false otherwise,

 -- Macro: TARGET_FORMAT_TYPES
     If defined, this macro is the name of a global variable containing target-specific format checking information for the -Wformat option.  The default is to have no target-specific format checks.

 -- Macro: TARGET_N_FORMAT_TYPES
     If defined, this macro is the number of entries in TARGET_FORMAT_TYPES.

 -- Macro: TARGET_OVERRIDES_FORMAT_ATTRIBUTES
     If defined, this macro is the name of a global variable containing target-specific format overrides for the -Wformat option. The default is to have no target-specific format overrides. If defined, TARGET_FORMAT_TYPES must be defined, too.

 -- Macro: TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT
     If defined, this macro specifies the number of entries in TARGET_OVERRIDES_FORMAT_ATTRIBUTES.

 -- Macro: TARGET_OVERRIDES_FORMAT_INIT
     If defined, this macro specifies the optional initialization routine for target specific customizations of the system printf and scanf formatter settings.

 -- Target Hook: bool TARGET_RELAXED_ORDERING
     If set to true, means that the target's memory model does not guarantee that loads which do not depend on one another will access main memory in the order of the instruction stream; if ordering is important, an explicit memory barrier must be used.  This is true of many recent processors which implement a policy of ``relaxed,'' ``weak,'' or ``release'' memory consistency, such as Alpha, PowerPC, and ia64.  The default is false.

 -- Target Hook: const char * TARGET_INVALID_ARG_FOR_UNPROTOTYPED_FN (const_tree TYPELIST, const_tree FUNCDECL, const_tree VAL)
     If defined, this macro returns the diagnostic message when it is illegal to pass argument VAL to function FUNCDECL with prototype TYPELIST.

 -- Target Hook: const char * TARGET_INVALID_CONVERSION (const_tree FROMTYPE, const_tree TOTYPE)
     If defined, this macro returns the diagnostic message when it is invalid to convert from FROMTYPE to TOTYPE, or NULL if validity should be determined by the front end.

 -- Target Hook: const char * TARGET_INVALID_UNARY_OP (int OP, const_tree TYPE)
     If defined, this macro returns the diagnostic message when it is invalid to apply operation OP (where unary plus is denoted by CONVERT_EXPR) to an operand of type TYPE, or NULL if validity should be determined by the front end.

 -- Target Hook: const char * TARGET_INVALID_BINARY_OP (int OP, const_tree TYPE1, const_tree TYPE2)
     If defined, this macro returns the diagnostic message when it is invalid to apply operation OP to operands of types TYPE1 and TYPE2, or NULL if validity should be determined by the front end.

 -- Target Hook: const char * TARGET_INVALID_PARAMETER_TYPE (const_tree TYPE)
     If defined, this macro returns the diagnostic message when it is invalid for functions to include parameters of type TYPE, or NULL if validity should be determined by the front end.  This is currently used only by the C and C++ front ends.

 -- Target Hook: const char * TARGET_INVALID_RETURN_TYPE (const_tree TYPE)
     If defined, this macro returns the diagnostic message when it is invalid for functions to have return type TYPE, or NULL if validity should be determined by the front end.  This is currently used only by the C and C++ front ends.

 -- Target Hook: tree TARGET_PROMOTED_TYPE (const_tree TYPE)
     If defined, this target hook returns the type to which values of TYPE should be promoted when they appear in expressions, analogous to the integer promotions, or NULL_TREE to use the front end's normal promotion rules.  This hook is useful when there are target-specific types with special promotion rules. This is currently used only by the C and C++ front ends.

 -- Target Hook: tree TARGET_CONVERT_TO_TYPE (tree TYPE, tree EXPR)
     If defined, this hook returns the result of converting EXPR to TYPE.  It should return the converted expression, or NULL_TREE to apply the front end's normal conversion rules. This hook is useful when there are target-specific types with special conversion rules. This is currently used only by the C and C++ front ends.

 -- Macro: TARGET_USE_JCR_SECTION
     This macro determines whether to use the JCR section to register Java classes. By default, TARGET_USE_JCR_SECTION is defined to 1 if both SUPPORTS_WEAK and TARGET_HAVE_NAMED_SECTIONS are true, else 0.

 -- Macro: OBJC_JBLEN
     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.

 -- Macro: LIBGCC2_UNWIND_ATTRIBUTE
     Define this macro if any target-specific attributes need to be attached to the functions in libgcc that provide low-level support for call stack unwinding.  It is used in declarations in unwind-generic.h and the associated definitions of those functions.

 -- Target Hook: void TARGET_UPDATE_STACK_BOUNDARY (void)
     Define this macro to update the current function stack boundary if necessary.

 -- Target Hook: rtx TARGET_GET_DRAP_RTX (void)
     This hook should return an rtx for Dynamic Realign Argument Pointer (DRAP) if a different argument pointer register is needed to access the function's argument list due to stack realignment.  Return NULL if no DRAP is needed.

 -- Target Hook: bool TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS (void)
     When optimization is disabled, this hook indicates whether or not arguments should be allocated to stack slots.  Normally, GCC allocates stacks slots for arguments when not optimizing in order to make debugging easier.  However, when a function is declared with __attribute__((naked)), there is no stack frame, and the compiler cannot safely move arguments from the registers in which they are passed to the stack.  Therefore, this hook should return true in general, but false for naked functions.  The default implementation always returns true.

 -- Target Hook: unsigned HOST_WIDE_INT TARGET_CONST_ANCHOR
     On some architectures it can take multiple instructions to synthesize a constant.  If there is another constant already in a register that is close enough in value then it is preferable that the new constant is computed from this register using immediate addition or subtraction.  We accomplish this through CSE.  Besides the value of the constant we also add a lower and an upper constant anchor to the available expressions.  These are then queried when encountering new constants.  The anchors are computed by rounding the constant up and down to a multiple of the value of TARGET_CONST_ANCHOR. TARGET_CONST_ANCHOR should be the maximum positive value accepted by immediate-add plus one.  We currently assume that the value of TARGET_CONST_ANCHOR is a power of 2.  For example, on MIPS, where add-immediate takes a 16-bit signed value, TARGET_CONST_ANCHOR is set to 0x8000.  The default value is zero, which disables this optimization.

 -- Target Hook: unsigned HOST_WIDE_INT TARGET_ASAN_SHADOW_OFFSET (void)
     Return the offset bitwise ored into shifted address to get corresponding Address Sanitizer shadow memory address.  NULL if Address Sanitizer is not supported by the target.

 -- Target Hook: unsigned HOST_WIDE_INT TARGET_MEMMODEL_CHECK (unsigned HOST_WIDE_INT VAL)
     Validate target specific memory model mask bits. When NULL no target specific memory model bits are allowed.

 -- Target Hook: unsigned char TARGET_ATOMIC_TEST_AND_SET_TRUEVAL
     This value should be set if the result written by atomic_test_and_set is not exactly 1, i.e. the bool true.