comparison gcc/doc/tm.texi @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 @c Copyright (C) 1988-2017 Free Software Foundation, Inc. 1 @c Copyright (C) 1988-2018 Free Software Foundation, Inc.
2 @c This is part of the GCC manual. 2 @c This is part of the GCC manual.
3 @c For copying conditions, see the file gcc.texi. 3 @c For copying conditions, see the file gcc.texi.
4 4
5 @node Target Macros 5 @node Target Macros
6 @chapter Target Description Macros and Functions 6 @chapter Target Description Macros and Functions
749 Set target-dependent initial values of fields in @var{opts}. 749 Set target-dependent initial values of fields in @var{opts}.
750 @end deftypefn 750 @end deftypefn
751 751
752 @deftypefn {Common Target Hook} void TARGET_OPTION_DEFAULT_PARAMS (void) 752 @deftypefn {Common Target Hook} void TARGET_OPTION_DEFAULT_PARAMS (void)
753 Set target-dependent default values for @option{--param} settings, using calls to @code{set_default_param_value}. 753 Set target-dependent default values for @option{--param} settings, using calls to @code{set_default_param_value}.
754 @end deftypefn
755
756 @deftypefn {Common Target Hook} bool TARGET_OPTION_VALIDATE_PARAM (int, @var{int})
757 Validate target-dependent value for @option{--param} settings, using calls to @code{set_param_value}.
754 @end deftypefn 758 @end deftypefn
755 759
756 @defmac SWITCHABLE_TARGET 760 @defmac SWITCHABLE_TARGET
757 Some targets need to switch between substantially different subtargets 761 Some targets need to switch between substantially different subtargets
758 during compilation. For example, the MIPS target has one subtarget for 762 during compilation. For example, the MIPS target has one subtarget for
2772 details. 2776 details.
2773 2777
2774 With LRA, the default is to use @var{mode} unmodified. 2778 With LRA, the default is to use @var{mode} unmodified.
2775 @end deftypefn 2779 @end deftypefn
2776 2780
2781 @deftypefn {Target Hook} void TARGET_SELECT_EARLY_REMAT_MODES (sbitmap @var{modes})
2782 On some targets, certain modes cannot be held in registers around a
2783 standard ABI call and are relatively expensive to spill to the stack.
2784 The early rematerialization pass can help in such cases by aggressively
2785 recomputing values after calls, so that they don't need to be spilled.
2786
2787 This hook returns the set of such modes by setting the associated bits
2788 in @var{modes}. The default implementation selects no modes, which has
2789 the effect of disabling the early rematerialization pass.
2790 @end deftypefn
2791
2777 @deftypefn {Target Hook} bool TARGET_CLASS_LIKELY_SPILLED_P (reg_class_t @var{rclass}) 2792 @deftypefn {Target Hook} bool TARGET_CLASS_LIKELY_SPILLED_P (reg_class_t @var{rclass})
2778 A target hook which returns @code{true} if pseudos that have been assigned 2793 A target hook which returns @code{true} if pseudos that have been assigned
2779 to registers of class @var{rclass} would likely be spilled because 2794 to registers of class @var{rclass} would likely be spilled because
2780 registers of @var{rclass} are needed for spill registers. 2795 registers of @var{rclass} are needed for spill registers.
2781 2796
2881 On most machines, this default should be used. For generally 2896 On most machines, this default should be used. For generally
2882 machines with non orthogonal register usage for addressing, such 2897 machines with non orthogonal register usage for addressing, such
2883 as SH, this hook can be used to avoid excessive spilling. 2898 as SH, this hook can be used to avoid excessive spilling.
2884 @end deftypefn 2899 @end deftypefn
2885 2900
2886 @deftypefn {Target Hook} bool TARGET_LEGITIMIZE_ADDRESS_DISPLACEMENT (rtx *@var{disp}, rtx *@var{offset}, machine_mode @var{mode}) 2901 @deftypefn {Target Hook} bool TARGET_LEGITIMIZE_ADDRESS_DISPLACEMENT (rtx *@var{offset1}, rtx *@var{offset2}, poly_int64 @var{orig_offset}, machine_mode @var{mode})
2887 A target hook which returns @code{true} if *@var{disp} is 2902 This hook tries to split address offset @var{orig_offset} into
2888 legitimezed to valid address displacement with subtracting *@var{offset} 2903 two parts: one that should be added to the base address to create
2889 at memory mode @var{mode}. 2904 a local anchor point, and an additional offset that can be applied
2890 The default version of this target hook returns @code{false}. 2905 to the anchor to address a value of mode @var{mode}. The idea is that
2891 This hook will benefit machines with limited base plus displacement 2906 the local anchor could be shared by other accesses to nearby locations.
2892 addressing. 2907
2908 The hook returns true if it succeeds, storing the offset of the
2909 anchor from the base in @var{offset1} and the offset of the final address
2910 from the anchor in @var{offset2}. The default implementation returns false.
2893 @end deftypefn 2911 @end deftypefn
2894 2912
2895 @deftypefn {Target Hook} reg_class_t TARGET_SPILL_CLASS (reg_class_t, @var{machine_mode}) 2913 @deftypefn {Target Hook} reg_class_t TARGET_SPILL_CLASS (reg_class_t, @var{machine_mode})
2896 This hook defines a class of registers which could be used for spilling pseudos of the given mode and class, or @code{NO_REGS} if only memory should be used. Not defining this hook is equivalent to returning @code{NO_REGS} for all inputs. 2914 This hook defines a class of registers which could be used for spilling pseudos of the given mode and class, or @code{NO_REGS} if only memory should be used. Not defining this hook is equivalent to returning @code{NO_REGS} for all inputs.
2897 @end deftypefn 2915 @end deftypefn
3128 to let the backend emit the call frame instructions. @var{label} is 3146 to let the backend emit the call frame instructions. @var{label} is
3129 the CFI label attached to the insn, @var{pattern} is the pattern of 3147 the CFI label attached to the insn, @var{pattern} is the pattern of
3130 the insn and @var{index} is @code{UNSPEC_INDEX} or @code{UNSPECV_INDEX}. 3148 the insn and @var{index} is @code{UNSPEC_INDEX} or @code{UNSPECV_INDEX}.
3131 @end deftypefn 3149 @end deftypefn
3132 3150
3151 @deftypefn {Target Hook} {unsigned int} TARGET_DWARF_POLY_INDETERMINATE_VALUE (unsigned int @var{i}, unsigned int *@var{factor}, int *@var{offset})
3152 Express the value of @code{poly_int} indeterminate @var{i} as a DWARF
3153 expression, with @var{i} counting from 1. Return the number of a DWARF
3154 register @var{R} and set @samp{*@var{factor}} and @samp{*@var{offset}} such
3155 that the value of the indeterminate is:
3156 @smallexample
3157 value_of(@var{R}) / @var{factor} - @var{offset}
3158 @end smallexample
3159
3160 A target only needs to define this hook if it sets
3161 @samp{NUM_POLY_INT_COEFFS} to a value greater than 1.
3162 @end deftypefn
3163
3133 @defmac INCOMING_FRAME_SP_OFFSET 3164 @defmac INCOMING_FRAME_SP_OFFSET
3134 A C expression whose value is an integer giving the offset, in bytes, 3165 A C expression whose value is an integer giving the offset, in bytes,
3135 from the value of the stack pointer register to the top of the stack 3166 from the value of the stack pointer register to the top of the stack
3136 frame at the beginning of any function, before the prologue. The top of 3167 frame at the beginning of any function, before the prologue. The top of
3137 the frame is defined to be the value of the stack pointer in the 3168 the frame is defined to be the value of the stack pointer in the
3138 previous frame, just before the call instruction. 3169 previous frame, just before the call instruction.
3139 3170
3140 You only need to define this macro if you want to support call frame 3171 You only need to define this macro if you want to support call frame
3141 debugging information like that provided by DWARF 2. 3172 debugging information like that provided by DWARF 2.
3173 @end defmac
3174
3175 @defmac DEFAULT_INCOMING_FRAME_SP_OFFSET
3176 Like @code{INCOMING_FRAME_SP_OFFSET}, but must be the same for all
3177 functions of the same ABI, and when using GAS @code{.cfi_*} directives
3178 must also agree with the default CFI GAS emits. Define this macro
3179 only if @code{INCOMING_FRAME_SP_OFFSET} can have different values
3180 between different functions of the same ABI or when
3181 @code{INCOMING_FRAME_SP_OFFSET} does not agree with GAS default CFI.
3142 @end defmac 3182 @end defmac
3143 3183
3144 @defmac ARG_POINTER_CFA_OFFSET (@var{fundecl}) 3184 @defmac ARG_POINTER_CFA_OFFSET (@var{fundecl})
3145 A C expression whose value is an integer giving the offset, in bytes, 3185 A C expression whose value is an integer giving the offset, in bytes,
3146 from the argument pointer to the canonical frame address (cfa). The 3186 from the argument pointer to the canonical frame address (cfa). The
3412 @option{-fstack-check}. 3452 @option{-fstack-check}.
3413 GCC computed the default from the values of the above macros and you will 3453 GCC computed the default from the values of the above macros and you will
3414 normally not need to override that default. 3454 normally not need to override that default.
3415 @end defmac 3455 @end defmac
3416 3456
3417 @deftypefn {Target Hook} bool TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE (rtx @var{residual}) 3457 @deftypefn {Target Hook} HOST_WIDE_INT TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE (void)
3418 Some targets make optimistic assumptions about the state of stack probing when they emit their prologues. On such targets a probe into the end of any dynamically allocated space is likely required for safety against stack clash style attacks. Define this variable to return nonzero if such a probe is required or zero otherwise. You need not define this macro if it would always have the value zero. 3458 Some targets have an ABI defined interval for which no probing needs to be done.
3459 When a probe does need to be done this same interval is used as the probe distance up when doing stack clash protection for alloca.
3460 On such targets this value can be set to override the default probing up interval.
3461 Define this variable to return nonzero if such a probe range is required or zero otherwise. Defining this hook also requires your functions which make use of alloca to have at least 8 byesof outgoing arguments. If this is not the case the stack will be corrupted.
3462 You need not define this macro if it would always have the value zero.
3419 @end deftypefn 3463 @end deftypefn
3420 3464
3421 @need 2000 3465 @need 2000
3422 @node Frame Registers 3466 @node Frame Registers
3423 @subsection Registers That Address the Stack Frame 3467 @subsection Registers That Address the Stack Frame
3606 it will be defined to 1 when @code{REG_VALUE_IN_UNWIND_CONTEXT} is 3650 it will be defined to 1 when @code{REG_VALUE_IN_UNWIND_CONTEXT} is
3607 defined and 0 otherwise. 3651 defined and 0 otherwise.
3608 3652
3609 @end defmac 3653 @end defmac
3610 3654
3655 @defmac DWARF_LAZY_REGISTER_VALUE (@var{regno}, @var{value})
3656 Define this macro if the target has pseudo DWARF registers whose
3657 values need to be computed lazily on demand by the unwinder (such as when
3658 referenced in a CFA expression). The macro returns true if @var{regno}
3659 is such a register and stores its value in @samp{*@var{value}} if so.
3660 @end defmac
3661
3611 @node Elimination 3662 @node Elimination
3612 @subsection Eliminating Frame Pointer and Arg Pointer 3663 @subsection Eliminating Frame Pointer and Arg Pointer
3613 3664
3614 @c prevent bad page break with this line 3665 @c prevent bad page break with this line
3615 This is about eliminating the frame pointer and arg pointer. 3666 This is about eliminating the frame pointer and arg pointer.
3804 stack beyond the @code{REG_PARM_STACK_SPACE} area. Defining this macro 3855 stack beyond the @code{REG_PARM_STACK_SPACE} area. Defining this macro
3805 suppresses this behavior and causes the parameter to be passed on the 3856 suppresses this behavior and causes the parameter to be passed on the
3806 stack in its natural location. 3857 stack in its natural location.
3807 @end defmac 3858 @end defmac
3808 3859
3809 @deftypefn {Target Hook} int TARGET_RETURN_POPS_ARGS (tree @var{fundecl}, tree @var{funtype}, int @var{size}) 3860 @deftypefn {Target Hook} poly_int64 TARGET_RETURN_POPS_ARGS (tree @var{fundecl}, tree @var{funtype}, poly_int64 @var{size})
3810 This target hook returns the number of bytes of its own arguments that 3861 This target hook returns the number of bytes of its own arguments that
3811 a function pops on returning, or 0 if the function pops no arguments 3862 a function pops on returning, or 0 if the function pops no arguments
3812 and the caller must therefore pop them all after the function returns. 3863 and the caller must therefore pop them all after the function returns.
3813 3864
3814 @var{fundecl} is a C variable whose value is a tree node that describes 3865 @var{fundecl} is a C variable whose value is a tree node that describes
4210 4261
4211 @deftypefn {Target Hook} bool TARGET_REF_MAY_ALIAS_ERRNO (struct ao_ref *@var{ref}) 4262 @deftypefn {Target Hook} bool TARGET_REF_MAY_ALIAS_ERRNO (struct ao_ref *@var{ref})
4212 Define this to return nonzero if the memory reference @var{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. 4263 Define this to return nonzero if the memory reference @var{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.
4213 @end deftypefn 4264 @end deftypefn
4214 4265
4266 @deftypefn {Target Hook} machine_mode TARGET_TRANSLATE_MODE_ATTRIBUTE (machine_mode @var{mode})
4267 Define this hook if during mode attribute processing, the port should
4268 translate machine_mode @var{mode} to another mode. For example, rs6000's
4269 @code{KFmode}, when it is the same as @code{TFmode}.
4270
4271 The default version of the hook returns that mode that was passed in.
4272 @end deftypefn
4273
4215 @deftypefn {Target Hook} bool TARGET_SCALAR_MODE_SUPPORTED_P (scalar_mode @var{mode}) 4274 @deftypefn {Target Hook} bool TARGET_SCALAR_MODE_SUPPORTED_P (scalar_mode @var{mode})
4216 Define this to return nonzero if the port is prepared to handle 4275 Define this to return nonzero if the port is prepared to handle
4217 insns involving scalar mode @var{mode}. For a scalar mode to be 4276 insns involving scalar mode @var{mode}. For a scalar mode to be
4218 considered supported, all the basic arithmetic and comparisons 4277 considered supported, all the basic arithmetic and comparisons
4219 must work. 4278 must work.
4226 4285
4227 @deftypefn {Target Hook} bool TARGET_VECTOR_MODE_SUPPORTED_P (machine_mode @var{mode}) 4286 @deftypefn {Target Hook} bool TARGET_VECTOR_MODE_SUPPORTED_P (machine_mode @var{mode})
4228 Define this to return nonzero if the port is prepared to handle 4287 Define this to return nonzero if the port is prepared to handle
4229 insns involving vector mode @var{mode}. At the very least, it 4288 insns involving vector mode @var{mode}. At the very least, it
4230 must have move patterns for this mode. 4289 must have move patterns for this mode.
4290 @end deftypefn
4291
4292 @deftypefn {Target Hook} opt_machine_mode TARGET_ARRAY_MODE (machine_mode @var{mode}, unsigned HOST_WIDE_INT @var{nelems})
4293 Return the mode that GCC should use for an array that has
4294 @var{nelems} elements, with each element having mode @var{mode}.
4295 Return no mode if the target has no special requirements. In the
4296 latter case, GCC looks for an integer mode of the appropriate size
4297 if available and uses BLKmode otherwise. Usually the search for the
4298 integer mode is limited to @code{MAX_FIXED_MODE_SIZE}, but the
4299 @code{TARGET_ARRAY_MODE_SUPPORTED_P} hook allows a larger mode to be
4300 used in specific cases.
4301
4302 The main use of this hook is to specify that an array of vectors should
4303 also have a vector mode. The default implementation returns no mode.
4231 @end deftypefn 4304 @end deftypefn
4232 4305
4233 @deftypefn {Target Hook} bool TARGET_ARRAY_MODE_SUPPORTED_P (machine_mode @var{mode}, unsigned HOST_WIDE_INT @var{nelems}) 4306 @deftypefn {Target Hook} bool TARGET_ARRAY_MODE_SUPPORTED_P (machine_mode @var{mode}, unsigned HOST_WIDE_INT @var{nelems})
4234 Return true if GCC should try to use a scalar mode to store an array 4307 Return true if GCC should try to use a scalar mode to store an array
4235 of @var{nelems} elements, given that each element has mode @var{mode}. 4308 of @var{nelems} elements, given that each element has mode @var{mode}.
4282 of @var{n} and @var{extended} that are valid according to 4355 of @var{n} and @var{extended} that are valid according to
4283 ISO/IEC TS 18661-3:2015; that is, @var{n} is one of 32, 64, 128, or, 4356 ISO/IEC TS 18661-3:2015; that is, @var{n} is one of 32, 64, 128, or,
4284 if @var{extended} is false, 16 or greater than 128 and a multiple of 32. 4357 if @var{extended} is false, 16 or greater than 128 and a multiple of 32.
4285 @end deftypefn 4358 @end deftypefn
4286 4359
4360 @deftypefn {Target Hook} bool TARGET_FLOATN_BUILTIN_P (int @var{func})
4361 Define this to return true if the @code{_Float@var{n}} and
4362 @code{_Float@var{n}x} built-in functions should implicitly enable the
4363 built-in function without the @code{__builtin_} prefix in addition to the
4364 normal built-in function with the @code{__builtin_} prefix. The default is
4365 to only enable built-in functions without the @code{__builtin_} prefix for
4366 the GNU C langauge. In strict ANSI/ISO mode, the built-in function without
4367 the @code{__builtin_} prefix is not enabled. The argument @code{FUNC} is the
4368 @code{enum built_in_function} id of the function to be enabled.
4369 @end deftypefn
4370
4287 @deftypefn {Target Hook} bool TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P (machine_mode @var{mode}) 4371 @deftypefn {Target Hook} bool TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P (machine_mode @var{mode})
4288 Define this to return nonzero for machine modes for which the port has 4372 Define this to return nonzero for machine modes for which the port has
4289 small register classes. If this target hook returns nonzero for a given 4373 small register classes. If this target hook returns nonzero for a given
4290 @var{mode}, the compiler will try to minimize the lifetime of registers 4374 @var{mode}, the compiler will try to minimize the lifetime of registers
4291 in @var{mode}. The hook may be called with @code{VOIDmode} as argument. 4375 in @var{mode}. The hook may be called with @code{VOIDmode} as argument.
4538 4622
4539 This macro has effect in @option{-fpcc-struct-return} mode, but it does 4623 This macro has effect in @option{-fpcc-struct-return} mode, but it does
4540 nothing when you use @option{-freg-struct-return} mode. 4624 nothing when you use @option{-freg-struct-return} mode.
4541 @end defmac 4625 @end defmac
4542 4626
4543 @deftypefn {Target Hook} machine_mode TARGET_GET_RAW_RESULT_MODE (int @var{regno}) 4627 @deftypefn {Target Hook} fixed_size_mode TARGET_GET_RAW_RESULT_MODE (int @var{regno})
4544 This target hook returns the mode to be used when accessing raw return registers in @code{__builtin_return}. Define this macro if the value in @var{reg_raw_mode} is not correct. 4628 This target hook returns the mode to be used when accessing raw return registers in @code{__builtin_return}. Define this macro if the value in @var{reg_raw_mode} is not correct.
4545 @end deftypefn 4629 @end deftypefn
4546 4630
4547 @deftypefn {Target Hook} machine_mode TARGET_GET_RAW_ARG_MODE (int @var{regno}) 4631 @deftypefn {Target Hook} fixed_size_mode TARGET_GET_RAW_ARG_MODE (int @var{regno})
4548 This target hook returns the mode to be used when accessing raw argument registers in @code{__builtin_apply_args}. Define this macro if the value in @var{reg_raw_mode} is not correct. 4632 This target hook returns the mode to be used when accessing raw argument registers in @code{__builtin_apply_args}. Define this macro if the value in @var{reg_raw_mode} is not correct.
4633 @end deftypefn
4634
4635 @deftypefn {Target Hook} bool TARGET_EMPTY_RECORD_P (const_tree @var{type})
4636 This target hook returns true if the type is an empty record. The default
4637 is to return @code{false}.
4638 @end deftypefn
4639
4640 @deftypefn {Target Hook} void TARGET_WARN_PARAMETER_PASSING_ABI (cumulative_args_t @var{ca}, tree @var{type})
4641 This target hook warns about the change in empty class parameter passing
4642 ABI.
4549 @end deftypefn 4643 @end deftypefn
4550 4644
4551 @node Caller Saves 4645 @node Caller Saves
4552 @subsection Caller-Saves Register Allocation 4646 @subsection Caller-Saves Register Allocation
4553 4647
4969 5063
4970 @deftypefn {Common Target Hook} bool TARGET_SUPPORTS_SPLIT_STACK (bool @var{report}, struct gcc_options *@var{opts}) 5064 @deftypefn {Common Target Hook} bool TARGET_SUPPORTS_SPLIT_STACK (bool @var{report}, struct gcc_options *@var{opts})
4971 Whether this target supports splitting the stack when the options described in @var{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 @var{report} is true, this function may issue a warning or error; if @var{report} is false, it must simply return a value 5065 Whether this target supports splitting the stack when the options described in @var{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 @var{report} is true, this function may issue a warning or error; if @var{report} is false, it must simply return a value
4972 @end deftypefn 5066 @end deftypefn
4973 5067
5068 @deftypefn {Common Target Hook} {vec<const char *>} TARGET_GET_VALID_OPTION_VALUES (int @var{option_code}, const char *@var{prefix})
5069 The hook is used for options that have a non-trivial list of possible option values. OPTION_CODE is option code of opt_code enum type. PREFIX is used for bash completion and allows an implementation to return more specific completion based on the prefix. All string values should be allocated from heap memory and consumers should release them. The result will be pruned to cases with PREFIX if not NULL.
5070 @end deftypefn
5071
4974 @node Miscellaneous Register Hooks 5072 @node Miscellaneous Register Hooks
4975 @subsection Miscellaneous register hooks 5073 @subsection Miscellaneous register hooks
4976 @cindex miscellaneous register hooks 5074 @cindex miscellaneous register hooks
4977 5075
4978 @deftypevr {Target Hook} bool TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS 5076 @deftypevr {Target Hook} bool TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS
5172 @deftypefn {Target Hook} void TARGET_STORE_RETURNED_BOUNDS (rtx @var{slot}, rtx @var{bounds}) 5270 @deftypefn {Target Hook} void TARGET_STORE_RETURNED_BOUNDS (rtx @var{slot}, rtx @var{bounds})
5173 This hook is used by expand pass to emit insn to store @var{bounds} 5271 This hook is used by expand pass to emit insn to store @var{bounds}
5174 returned by function call into @var{slot}. 5272 returned by function call into @var{slot}.
5175 @end deftypefn 5273 @end deftypefn
5176 5274
5177 @deftypefn {Target Hook} rtx TARGET_CHKP_FUNCTION_VALUE_BOUNDS (const_tree @var{ret_type}, const_tree @var{fn_decl_or_type}, bool @var{outgoing})
5178 Define this to return an RTX representing the place where a function
5179 returns bounds for returned pointers. Arguments meaning is similar to
5180 @code{TARGET_FUNCTION_VALUE}.
5181 @end deftypefn
5182
5183 @deftypefn {Target Hook} void TARGET_SETUP_INCOMING_VARARG_BOUNDS (cumulative_args_t @var{args_so_far}, machine_mode @var{mode}, tree @var{type}, int *@var{pretend_args_size}, int @var{second_time}) 5275 @deftypefn {Target Hook} void TARGET_SETUP_INCOMING_VARARG_BOUNDS (cumulative_args_t @var{args_so_far}, machine_mode @var{mode}, tree @var{type}, int *@var{pretend_args_size}, int @var{second_time})
5184 Use it to store bounds for anonymous register arguments stored 5276 Use it to store bounds for anonymous register arguments stored
5185 into the stack. Arguments meaning is similar to 5277 into the stack. Arguments meaning is similar to
5186 @code{TARGET_SETUP_INCOMING_VARARGS}. 5278 @code{TARGET_SETUP_INCOMING_VARARGS}.
5187 @end deftypefn 5279 @end deftypefn
5188 5280
5189 @node Trampolines 5281 @node Trampolines
5190 @section Trampolines for Nested Functions 5282 @section Support for Nested Functions
5283 @cindex support for nested functions
5191 @cindex trampolines for nested functions 5284 @cindex trampolines for nested functions
5192 @cindex nested functions, trampolines for 5285 @cindex descriptors for nested functions
5193 5286 @cindex nested functions, support for
5194 A @dfn{trampoline} is a small piece of code that is created at run time 5287
5195 when the address of a nested function is taken. It normally resides on 5288 Taking the address of a nested function requires special compiler
5196 the stack, in the stack frame of the containing function. These macros 5289 handling to ensure that the static chain register is loaded when
5197 tell GCC how to generate code to allocate and initialize a 5290 the function is invoked via an indirect call.
5198 trampoline. 5291
5199 5292 GCC has traditionally supported nested functions by creating an
5200 The instructions in the trampoline must do two things: load a constant 5293 executable @dfn{trampoline} at run time when the address of a nested
5201 address into the static chain register, and jump to the real address of 5294 function is taken. This is a small piece of code which normally
5202 the nested function. On CISC machines such as the m68k, this requires 5295 resides on the stack, in the stack frame of the containing function.
5203 two instructions, a move immediate and a jump. Then the two addresses 5296 The trampoline loads the static chain register and then jumps to the
5204 exist in the trampoline as word-long immediate operands. On RISC 5297 real address of the nested function.
5205 machines, it is often necessary to load each address into a register in 5298
5206 two parts. Then pieces of each address form separate immediate 5299 The use of trampolines requires an executable stack, which is a
5207 operands. 5300 security risk. To avoid this problem, GCC also supports another
5301 strategy: using descriptors for nested functions. Under this model,
5302 taking the address of a nested function results in a pointer to a
5303 non-executable function descriptor object. Initializing the static chain
5304 from the descriptor is handled at indirect call sites.
5305
5306 On some targets, including HPPA and IA-64, function descriptors may be
5307 mandated by the ABI or be otherwise handled in a target-specific way
5308 by the back end in its code generation strategy for indirect calls.
5309 GCC also provides its own generic descriptor implementation to support the
5310 @option{-fno-trampolines} option. In this case runtime detection of
5311 function descriptors at indirect call sites relies on descriptor
5312 pointers being tagged with a bit that is never set in bare function
5313 addresses. Since GCC's generic function descriptors are
5314 not ABI-compliant, this option is typically used only on a
5315 per-language basis (notably by Ada) or when it can otherwise be
5316 applied to the whole program.
5317
5318 Define the following hook if your backend either implements ABI-specified
5319 descriptor support, or can use GCC's generic descriptor implementation
5320 for nested functions.
5321
5322 @deftypevr {Target Hook} int TARGET_CUSTOM_FUNCTION_DESCRIPTORS
5323 If the target can use GCC's generic descriptor mechanism for nested
5324 functions, define this hook to a power of 2 representing an unused bit
5325 in function pointers which can be used to differentiate descriptors at
5326 run time. This value gives the number of bytes by which descriptor
5327 pointers are misaligned compared to function pointers. For example, on
5328 targets that require functions to be aligned to a 4-byte boundary, a
5329 value of either 1 or 2 is appropriate unless the architecture already
5330 reserves the bit for another purpose, such as on ARM.
5331
5332 Define this hook to 0 if the target implements ABI support for
5333 function descriptors in its standard calling sequence, like for example
5334 HPPA or IA-64.
5335
5336 Using descriptors for nested functions
5337 eliminates the need for trampolines that reside on the stack and require
5338 it to be made executable.
5339 @end deftypevr
5340
5341 The following macros tell GCC how to generate code to allocate and
5342 initialize an executable trampoline. You can also use this interface
5343 if your back end needs to create ABI-specified non-executable descriptors; in
5344 this case the "trampoline" created is the descriptor containing data only.
5345
5346 The instructions in an executable trampoline must do two things: load
5347 a constant address into the static chain register, and jump to the real
5348 address of the nested function. On CISC machines such as the m68k,
5349 this requires two instructions, a move immediate and a jump. Then the
5350 two addresses exist in the trampoline as word-long immediate operands.
5351 On RISC machines, it is often necessary to load each address into a
5352 register in two parts. Then pieces of each address form separate
5353 immediate operands.
5208 5354
5209 The code generated to initialize the trampoline must store the variable 5355 The code generated to initialize the trampoline must store the variable
5210 parts---the static chain value and the function address---into the 5356 parts---the static chain value and the function address---into the
5211 immediate operands of the instructions. On a CISC machine, this is 5357 immediate operands of the instructions. On a CISC machine, this is
5212 simply a matter of copying each address to a memory reference at the 5358 simply a matter of copying each address to a memory reference at the
5268 the address to be used for a function call should be different from the 5414 the address to be used for a function call should be different from the
5269 address at which the template was stored, the different address should 5415 address at which the template was stored, the different address should
5270 be returned; otherwise @var{addr} should be returned unchanged. 5416 be returned; otherwise @var{addr} should be returned unchanged.
5271 If this hook is not defined, @var{addr} will be used for function calls. 5417 If this hook is not defined, @var{addr} will be used for function calls.
5272 @end deftypefn 5418 @end deftypefn
5273
5274 @deftypevr {Target Hook} int TARGET_CUSTOM_FUNCTION_DESCRIPTORS
5275 This hook should be defined to a power of 2 if the target will benefit
5276 from the use of custom descriptors for nested functions instead of the
5277 standard trampolines. Such descriptors are created at run time on the
5278 stack and made up of data only, but they are non-standard so the generated
5279 code must be prepared to deal with them. This hook should be defined to 0
5280 if the target uses function descriptors for its standard calling sequence,
5281 like for example HP-PA or IA-64. Using descriptors for nested functions
5282 eliminates the need for trampolines that reside on the stack and require
5283 it to be made executable.
5284
5285 The value of the macro is used to parameterize the run-time identification
5286 scheme implemented to distinguish descriptors from function addresses: it
5287 gives the number of bytes by which their address is misaligned compared
5288 with function addresses. The value of 1 will generally work, unless it is
5289 already reserved by the target for another purpose, like for example on ARM.
5290 @end deftypevr
5291 5419
5292 Implementing trampolines is difficult on many machines because they have 5420 Implementing trampolines is difficult on many machines because they have
5293 separate instruction and data caches. Writing into a stack location 5421 separate instruction and data caches. Writing into a stack location
5294 fails to clear the memory in the instruction cache, so when the program 5422 fails to clear the memory in the instruction cache, so when the program
5295 jumps to that location, it executes the old contents. 5423 jumps to that location, it executes the old contents.
5775 5903
5776 @deftypefn {Target Hook} bool TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE (const_tree @var{type}, bool @var{is_packed}) 5904 @deftypefn {Target Hook} bool TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE (const_tree @var{type}, bool @var{is_packed})
5777 Return true if vector alignment is reachable (by peeling N iterations) for the given scalar type @var{type}. @var{is_packed} is false if the scalar access using @var{type} is known to be naturally aligned. 5905 Return true if vector alignment is reachable (by peeling N iterations) for the given scalar type @var{type}. @var{is_packed} is false if the scalar access using @var{type} is known to be naturally aligned.
5778 @end deftypefn 5906 @end deftypefn
5779 5907
5780 @deftypefn {Target Hook} bool TARGET_VECTORIZE_VEC_PERM_CONST_OK (machine_mode, @var{vec_perm_indices}) 5908 @deftypefn {Target Hook} bool TARGET_VECTORIZE_VEC_PERM_CONST (machine_mode @var{mode}, rtx @var{output}, rtx @var{in0}, rtx @var{in1}, const vec_perm_indices @var{&sel})
5781 Return true if a vector created for @code{vec_perm_const} is valid. 5909 This hook is used to test whether the target can permute up to two
5910 vectors of mode @var{mode} using the permutation vector @code{sel}, and
5911 also to emit such a permutation. In the former case @var{in0}, @var{in1}
5912 and @var{out} are all null. In the latter case @var{in0} and @var{in1} are
5913 the source vectors and @var{out} is the destination vector; all three are
5914 registers of mode @var{mode}. @var{in1} is the same as @var{in0} if
5915 @var{sel} describes a permutation on one vector instead of two.
5916
5917 Return true if the operation is possible, emitting instructions for it
5918 if rtxes are provided.
5919
5920 @cindex @code{vec_perm@var{m}} instruction pattern
5921 If the hook returns false for a mode with multibyte elements, GCC will
5922 try the equivalent byte operation. If that also fails, it will try forcing
5923 the selector into a register and using the @var{vec_perm@var{mode}}
5924 instruction pattern. There is no need for the hook to handle these two
5925 implementation approaches itself.
5782 @end deftypefn 5926 @end deftypefn
5783 5927
5784 @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_CONVERSION (unsigned @var{code}, tree @var{dest_type}, tree @var{src_type}) 5928 @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_CONVERSION (unsigned @var{code}, tree @var{dest_type}, tree @var{src_type})
5785 This hook should return the DECL of a function that implements conversion of the 5929 This hook should return the DECL of a function that implements conversion of the
5786 input vector of type @var{src_type} to type @var{dest_type}. 5930 input vector of type @var{src_type} to type @var{dest_type}.
5821 mode @var{mode}. The default is 5965 mode @var{mode}. The default is
5822 equal to @code{word_mode}, because the vectorizer can do some 5966 equal to @code{word_mode}, because the vectorizer can do some
5823 transformations even in absence of specialized @acronym{SIMD} hardware. 5967 transformations even in absence of specialized @acronym{SIMD} hardware.
5824 @end deftypefn 5968 @end deftypefn
5825 5969
5826 @deftypefn {Target Hook} {unsigned int} TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_SIZES (void) 5970 @deftypefn {Target Hook} machine_mode TARGET_VECTORIZE_SPLIT_REDUCTION (machine_mode)
5827 This hook should return a mask of sizes that should be iterated over 5971 This hook should return the preferred mode to split the final reduction
5828 after trying to autovectorize using the vector size derived from the 5972 step on @var{mode} to. The reduction is then carried out reducing upper
5829 mode returned by @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE}. 5973 against lower halves of vectors recursively until the specified mode is
5830 The default is zero which means to not iterate over other vector sizes. 5974 reached. The default is @var{mode} which means no splitting.
5831 @end deftypefn 5975 @end deftypefn
5832 5976
5833 @deftypefn {Target Hook} opt_machine_mode TARGET_VECTORIZE_GET_MASK_MODE (unsigned @var{nunits}, unsigned @var{length}) 5977 @deftypefn {Target Hook} void TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_SIZES (vector_sizes *@var{sizes})
5978 If the mode returned by @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE} is not
5979 the only one that is worth considering, this hook should add all suitable
5980 vector sizes to @var{sizes}, in order of decreasing preference. The first
5981 one should be the size of @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE}.
5982
5983 The hook does not need to do anything if the vector returned by
5984 @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE} is the only one relevant
5985 for autovectorization. The default implementation does nothing.
5986 @end deftypefn
5987
5988 @deftypefn {Target Hook} opt_machine_mode TARGET_VECTORIZE_GET_MASK_MODE (poly_uint64 @var{nunits}, poly_uint64 @var{length})
5834 A vector mask is a value that holds one boolean result for every element 5989 A vector mask is a value that holds one boolean result for every element
5835 in a vector. This hook returns the machine mode that should be used to 5990 in a vector. This hook returns the machine mode that should be used to
5836 represent such a mask when the vector in question is @var{length} bytes 5991 represent such a mask when the vector in question is @var{length} bytes
5837 long and contains @var{nunits} elements. The hook returns an empty 5992 long and contains @var{nunits} elements. The hook returns an empty
5838 @code{opt_machine_mode} if no such mode exists. 5993 @code{opt_machine_mode} if no such mode exists.
5839 5994
5840 The default implementation returns the mode of an integer vector that 5995 The default implementation returns the mode of an integer vector that
5841 is @var{length} bytes long and that contains @var{nunits} elements, 5996 is @var{length} bytes long and that contains @var{nunits} elements,
5842 if such a mode exists. 5997 if such a mode exists.
5998 @end deftypefn
5999
6000 @deftypefn {Target Hook} bool TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE (unsigned @var{ifn})
6001 This hook returns true if masked internal function @var{ifn} (really of
6002 type @code{internal_fn}) should be considered expensive when the mask is
6003 all zeros. GCC can then try to branch around the instruction instead.
5843 @end deftypefn 6004 @end deftypefn
5844 6005
5845 @deftypefn {Target Hook} {void *} TARGET_VECTORIZE_INIT_COST (struct loop *@var{loop_info}) 6006 @deftypefn {Target Hook} {void *} TARGET_VECTORIZE_INIT_COST (struct loop *@var{loop_info})
5846 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 @var{loop_info} is non-NULL, it identifies the loop being vectorized; otherwise a single block is being vectorized. 6007 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 @var{loop_info} is non-NULL, it identifies the loop being vectorized; otherwise a single block is being vectorized.
5847 @end deftypefn 6008 @end deftypefn
5931 @var{GOACC_REDUCTION} internal function, into a sequence of gimple 6092 @var{GOACC_REDUCTION} internal function, into a sequence of gimple
5932 instructions. @var{call} is gimple statement containing the call to 6093 instructions. @var{call} is gimple statement containing the call to
5933 the function. This hook removes statement @var{call} after the 6094 the function. This hook removes statement @var{call} after the
5934 expanded sequence has been inserted. This hook is also responsible 6095 expanded sequence has been inserted. This hook is also responsible
5935 for allocating any storage for reductions when necessary. 6096 for allocating any storage for reductions when necessary.
6097 @end deftypefn
6098
6099 @deftypefn {Target Hook} tree TARGET_PREFERRED_ELSE_VALUE (unsigned @var{ifn}, tree @var{type}, unsigned @var{nops}, tree *@var{ops})
6100 This hook returns the target's preferred final argument for a call
6101 to conditional internal function @var{ifn} (really of type
6102 @code{internal_fn}). @var{type} specifies the return type of the
6103 function and @var{ops} are the operands to the conditional operation,
6104 of which there are @var{nops}.
6105
6106 For example, if @var{ifn} is @code{IFN_COND_ADD}, the hook returns
6107 a value of type @var{type} that should be used when @samp{@var{ops}[0]}
6108 and @samp{@var{ops}[1]} are conditionally added together.
6109
6110 This hook is only relevant if the target supports conditional patterns
6111 like @code{cond_add@var{m}}. The default implementation returns a zero
6112 constant of type @var{type}.
5936 @end deftypefn 6113 @end deftypefn
5937 6114
5938 @node Anchored Addresses 6115 @node Anchored Addresses
5939 @section Anchored Addresses 6116 @section Anchored Addresses
5940 @cindex anchored addresses 6117 @cindex anchored addresses
6700 such as certain MIPS architectures possess both branches with and without 6877 such as certain MIPS architectures possess both branches with and without
6701 delay slots. As the eager delay slot filler can decrease performance, 6878 delay slots. As the eager delay slot filler can decrease performance,
6702 disabling it is beneficial when ordinary branches are available. Use of 6879 disabling it is beneficial when ordinary branches are available. Use of
6703 delay slot branches filled using the basic filler is often still desirable 6880 delay slot branches filled using the basic filler is often still desirable
6704 as the delay slot can hide a pipeline bubble. 6881 as the delay slot can hide a pipeline bubble.
6882 @end deftypefn
6883
6884 @deftypefn {Target Hook} HOST_WIDE_INT TARGET_ESTIMATED_POLY_VALUE (poly_int64 @var{val})
6885 Return an estimate of the runtime value of @var{val}, for use in
6886 things like cost calculations or profiling frequencies. The default
6887 implementation returns the lowest possible value of @var{val}.
6705 @end deftypefn 6888 @end deftypefn
6706 6889
6707 @node Scheduling 6890 @node Scheduling
6708 @section Adjusting the Instruction Scheduler 6891 @section Adjusting the Instruction Scheduler
6709 6892
7372 is in effect, and 0 otherwise. The hook is typically redefined 7555 is in effect, and 0 otherwise. The hook is typically redefined
7373 when the target cannot support (some kinds of) dynamic relocations 7556 when the target cannot support (some kinds of) dynamic relocations
7374 in read-only sections even in executables. 7557 in read-only sections even in executables.
7375 @end deftypefn 7558 @end deftypefn
7376 7559
7560 @deftypefn {Target Hook} bool TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC (void)
7561 Return true to generate ADDR_DIF_VEC table
7562 or false to generate ADDR_VEC table for jumps in case of -fPIC.
7563
7564 The default version of this function returns true if flag_pic
7565 equals true and false otherwise
7566 @end deftypefn
7567
7377 @deftypefn {Target Hook} {section *} TARGET_ASM_SELECT_SECTION (tree @var{exp}, int @var{reloc}, unsigned HOST_WIDE_INT @var{align}) 7568 @deftypefn {Target Hook} {section *} TARGET_ASM_SELECT_SECTION (tree @var{exp}, int @var{reloc}, unsigned HOST_WIDE_INT @var{align})
7378 Return the section into which @var{exp} should be placed. You can 7569 Return the section into which @var{exp} should be placed. You can
7379 assume that @var{exp} is either a @code{VAR_DECL} node or a constant of 7570 assume that @var{exp} is either a @code{VAR_DECL} node or a constant of
7380 some sort. @var{reloc} indicates whether the initial value of @var{exp} 7571 some sort. @var{reloc} indicates whether the initial value of @var{exp}
7381 requires link-time relocations. Bit 0 is set when variable contains 7572 requires link-time relocations. Bit 0 is set when variable contains
7697 This macro need not be defined if the standard form of output 7888 This macro need not be defined if the standard form of output
7698 for the file format in use is appropriate. 7889 for the file format in use is appropriate.
7699 @end defmac 7890 @end defmac
7700 7891
7701 @deftypefn {Target Hook} void TARGET_ASM_OUTPUT_SOURCE_FILENAME (FILE *@var{file}, const char *@var{name}) 7892 @deftypefn {Target Hook} void TARGET_ASM_OUTPUT_SOURCE_FILENAME (FILE *@var{file}, const char *@var{name})
7702 Output COFF information or DWARF debugging information which indicates that filename @var{name} is the current source file to the stdio stream @var{file}. 7893 Output DWARF debugging information which indicates that filename @var{name} is the current source file to the stdio stream @var{file}.
7703 7894
7704 This target hook need not be defined if the standard form of output for the file format in use is appropriate. 7895 This target hook need not be defined if the standard form of output for the file format in use is appropriate.
7705 @end deftypefn 7896 @end deftypefn
7706 7897
7707 @deftypefn {Target Hook} void TARGET_ASM_OUTPUT_IDENT (const char *@var{name}) 7898 @deftypefn {Target Hook} void TARGET_ASM_OUTPUT_IDENT (const char *@var{name})
9345 @defmac DWARF_CIE_DATA_ALIGNMENT 9536 @defmac DWARF_CIE_DATA_ALIGNMENT
9346 This macro need only be defined if the target might save registers in the 9537 This macro need only be defined if the target might save registers in the
9347 function prologue at an offset to the stack pointer that is not aligned to 9538 function prologue at an offset to the stack pointer that is not aligned to
9348 @code{UNITS_PER_WORD}. The definition should be the negative minimum 9539 @code{UNITS_PER_WORD}. The definition should be the negative minimum
9349 alignment if @code{STACK_GROWS_DOWNWARD} is true, and the positive 9540 alignment if @code{STACK_GROWS_DOWNWARD} is true, and the positive
9350 minimum alignment otherwise. @xref{SDB and DWARF}. Only applicable if 9541 minimum alignment otherwise. @xref{DWARF}. Only applicable if
9351 the target supports DWARF 2 frame unwind information. 9542 the target supports DWARF 2 frame unwind information.
9352 @end defmac 9543 @end defmac
9353 9544
9354 @deftypevr {Target Hook} bool TARGET_TERMINATE_DW2_EH_FRAME_INFO 9545 @deftypevr {Target Hook} bool TARGET_TERMINATE_DW2_EH_FRAME_INFO
9355 Contains the value true if the target should add a zero word onto the 9546 Contains the value true if the target should add a zero word onto the
9415 to set the variable @var{align_jumps} in the target's 9606 to set the variable @var{align_jumps} in the target's
9416 @code{TARGET_OPTION_OVERRIDE}. Otherwise, you should try to honor the user's 9607 @code{TARGET_OPTION_OVERRIDE}. Otherwise, you should try to honor the user's
9417 selection in @var{align_jumps} in a @code{JUMP_ALIGN} implementation. 9608 selection in @var{align_jumps} in a @code{JUMP_ALIGN} implementation.
9418 @end defmac 9609 @end defmac
9419 9610
9420 @deftypefn {Target Hook} int TARGET_ASM_JUMP_ALIGN_MAX_SKIP (rtx_insn *@var{label})
9421 The maximum number of bytes to skip before @var{label} when applying
9422 @code{JUMP_ALIGN}. This works only if
9423 @code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.
9424 @end deftypefn
9425
9426 @defmac LABEL_ALIGN_AFTER_BARRIER (@var{label}) 9611 @defmac LABEL_ALIGN_AFTER_BARRIER (@var{label})
9427 The alignment (log base 2) to put in front of @var{label}, which follows 9612 The alignment (log base 2) to put in front of @var{label}, which follows
9428 a @code{BARRIER}. 9613 a @code{BARRIER}.
9429 9614
9430 This macro need not be defined if you don't want any special alignment 9615 This macro need not be defined if you don't want any special alignment
9431 to be done at such a time. Most machine descriptions do not currently 9616 to be done at such a time. Most machine descriptions do not currently
9432 define the macro. 9617 define the macro.
9433 @end defmac 9618 @end defmac
9434
9435 @deftypefn {Target Hook} int TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP (rtx_insn *@var{label})
9436 The maximum number of bytes to skip before @var{label} when applying
9437 @code{LABEL_ALIGN_AFTER_BARRIER}. This works only if
9438 @code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.
9439 @end deftypefn
9440 9619
9441 @defmac LOOP_ALIGN (@var{label}) 9620 @defmac LOOP_ALIGN (@var{label})
9442 The alignment (log base 2) to put in front of @var{label} that heads 9621 The alignment (log base 2) to put in front of @var{label} that heads
9443 a frequently executed basic block (usually the header of a loop). 9622 a frequently executed basic block (usually the header of a loop).
9444 9623
9450 to set the variable @code{align_loops} in the target's 9629 to set the variable @code{align_loops} in the target's
9451 @code{TARGET_OPTION_OVERRIDE}. Otherwise, you should try to honor the user's 9630 @code{TARGET_OPTION_OVERRIDE}. Otherwise, you should try to honor the user's
9452 selection in @code{align_loops} in a @code{LOOP_ALIGN} implementation. 9631 selection in @code{align_loops} in a @code{LOOP_ALIGN} implementation.
9453 @end defmac 9632 @end defmac
9454 9633
9455 @deftypefn {Target Hook} int TARGET_ASM_LOOP_ALIGN_MAX_SKIP (rtx_insn *@var{label})
9456 The maximum number of bytes to skip when applying @code{LOOP_ALIGN} to
9457 @var{label}. This works only if @code{ASM_OUTPUT_MAX_SKIP_ALIGN} is
9458 defined.
9459 @end deftypefn
9460
9461 @defmac LABEL_ALIGN (@var{label}) 9634 @defmac LABEL_ALIGN (@var{label})
9462 The alignment (log base 2) to put in front of @var{label}. 9635 The alignment (log base 2) to put in front of @var{label}.
9463 If @code{LABEL_ALIGN_AFTER_BARRIER} / @code{LOOP_ALIGN} specify a different alignment, 9636 If @code{LABEL_ALIGN_AFTER_BARRIER} / @code{LOOP_ALIGN} specify a different alignment,
9464 the maximum of the specified values is used. 9637 the maximum of the specified values is used.
9465 9638
9466 Unless it's necessary to inspect the @var{label} parameter, it is better 9639 Unless it's necessary to inspect the @var{label} parameter, it is better
9467 to set the variable @code{align_labels} in the target's 9640 to set the variable @code{align_labels} in the target's
9468 @code{TARGET_OPTION_OVERRIDE}. Otherwise, you should try to honor the user's 9641 @code{TARGET_OPTION_OVERRIDE}. Otherwise, you should try to honor the user's
9469 selection in @code{align_labels} in a @code{LABEL_ALIGN} implementation. 9642 selection in @code{align_labels} in a @code{LABEL_ALIGN} implementation.
9470 @end defmac 9643 @end defmac
9471
9472 @deftypefn {Target Hook} int TARGET_ASM_LABEL_ALIGN_MAX_SKIP (rtx_insn *@var{label})
9473 The maximum number of bytes to skip when applying @code{LABEL_ALIGN}
9474 to @var{label}. This works only if @code{ASM_OUTPUT_MAX_SKIP_ALIGN}
9475 is defined.
9476 @end deftypefn
9477 9644
9478 @defmac ASM_OUTPUT_SKIP (@var{stream}, @var{nbytes}) 9645 @defmac ASM_OUTPUT_SKIP (@var{stream}, @var{nbytes})
9479 A C statement to output to the stdio stream @var{stream} an assembler 9646 A C statement to output to the stdio stream @var{stream} an assembler
9480 instruction to advance the location counter by @var{nbytes} bytes. 9647 instruction to advance the location counter by @var{nbytes} bytes.
9481 Those bytes should be zero when loaded. @var{nbytes} will be a C 9648 Those bytes should be zero when loaded. @var{nbytes} will be a C
9519 @menu 9686 @menu
9520 * All Debuggers:: Macros that affect all debugging formats uniformly. 9687 * All Debuggers:: Macros that affect all debugging formats uniformly.
9521 * DBX Options:: Macros enabling specific options in DBX format. 9688 * DBX Options:: Macros enabling specific options in DBX format.
9522 * DBX Hooks:: Hook macros for varying DBX format. 9689 * DBX Hooks:: Hook macros for varying DBX format.
9523 * File Names and DBX:: Macros controlling output of file names in DBX format. 9690 * File Names and DBX:: Macros controlling output of file names in DBX format.
9524 * SDB and DWARF:: Macros for SDB (COFF) and DWARF formats. 9691 * DWARF:: Macros for DWARF format.
9525 * VMS Debug:: Macros for VMS debug format. 9692 * VMS Debug:: Macros for VMS debug format.
9526 @end menu 9693 @end menu
9527 9694
9528 @node All Debuggers 9695 @node All Debuggers
9529 @subsection Macros Affecting All Debugging Formats 9696 @subsection Macros Affecting All Debugging Formats
9553 @defmac DEBUGGER_AUTO_OFFSET (@var{x}) 9720 @defmac DEBUGGER_AUTO_OFFSET (@var{x})
9554 A C expression that returns the integer offset value for an automatic 9721 A C expression that returns the integer offset value for an automatic
9555 variable having address @var{x} (an RTL expression). The default 9722 variable having address @var{x} (an RTL expression). The default
9556 computation assumes that @var{x} is based on the frame-pointer and 9723 computation assumes that @var{x} is based on the frame-pointer and
9557 gives the offset from the frame-pointer. This is required for targets 9724 gives the offset from the frame-pointer. This is required for targets
9558 that produce debugging output for DBX or COFF-style debugging output 9725 that produce debugging output for DBX and allow the frame-pointer to be
9559 for SDB and allow the frame-pointer to be eliminated when the 9726 eliminated when the @option{-g} option is used.
9560 @option{-g} options is used.
9561 @end defmac 9727 @end defmac
9562 9728
9563 @defmac DEBUGGER_ARG_OFFSET (@var{offset}, @var{x}) 9729 @defmac DEBUGGER_ARG_OFFSET (@var{offset}, @var{x})
9564 A C expression that returns the integer offset value for an argument 9730 A C expression that returns the integer offset value for an argument
9565 having address @var{x} (an RTL expression). The nominal offset is 9731 having address @var{x} (an RTL expression). The nominal offset is
9569 @defmac PREFERRED_DEBUGGING_TYPE 9735 @defmac PREFERRED_DEBUGGING_TYPE
9570 A C expression that returns the type of debugging output GCC should 9736 A C expression that returns the type of debugging output GCC should
9571 produce when the user specifies just @option{-g}. Define 9737 produce when the user specifies just @option{-g}. Define
9572 this if you have arranged for GCC to support more than one format of 9738 this if you have arranged for GCC to support more than one format of
9573 debugging output. Currently, the allowable values are @code{DBX_DEBUG}, 9739 debugging output. Currently, the allowable values are @code{DBX_DEBUG},
9574 @code{SDB_DEBUG}, @code{DWARF_DEBUG}, @code{DWARF2_DEBUG}, 9740 @code{DWARF2_DEBUG}, @code{XCOFF_DEBUG}, @code{VMS_DEBUG},
9575 @code{XCOFF_DEBUG}, @code{VMS_DEBUG}, and @code{VMS_AND_DWARF2_DEBUG}. 9741 and @code{VMS_AND_DWARF2_DEBUG}.
9576 9742
9577 When the user specifies @option{-ggdb}, GCC normally also uses the 9743 When the user specifies @option{-ggdb}, GCC normally also uses the
9578 value of this macro to select the debugging output format, but with two 9744 value of this macro to select the debugging output format, but with two
9579 exceptions. If @code{DWARF2_DEBUGGING_INFO} is defined, GCC uses the 9745 exceptions. If @code{DWARF2_DEBUGGING_INFO} is defined, GCC uses the
9580 value @code{DWARF2_DEBUG}. Otherwise, if @code{DBX_DEBUGGING_INFO} is 9746 value @code{DWARF2_DEBUG}. Otherwise, if @code{DBX_DEBUGGING_INFO} is
9581 defined, GCC uses @code{DBX_DEBUG}. 9747 defined, GCC uses @code{DBX_DEBUG}.
9582 9748
9583 The value of this macro only affects the default debugging output; the 9749 The value of this macro only affects the default debugging output; the
9584 user can always get a specific type of output by using @option{-gstabs}, 9750 user can always get a specific type of output by using @option{-gstabs},
9585 @option{-gcoff}, @option{-gdwarf-2}, @option{-gxcoff}, or @option{-gvms}. 9751 @option{-gdwarf-2}, @option{-gxcoff}, or @option{-gvms}.
9586 @end defmac 9752 @end defmac
9587 9753
9588 @node DBX Options 9754 @node DBX Options
9589 @subsection Specific Options for DBX Output 9755 @subsection Specific Options for DBX Output
9590 9756
9798 the end of compilation is an @code{N_SO} stab with an empty string, 9964 the end of compilation is an @code{N_SO} stab with an empty string,
9799 whose value is the highest absolute text address in the file. 9965 whose value is the highest absolute text address in the file.
9800 @end defmac 9966 @end defmac
9801 9967
9802 @need 2000 9968 @need 2000
9803 @node SDB and DWARF 9969 @node DWARF
9804 @subsection Macros for SDB and DWARF Output 9970 @subsection Macros for DWARF Output
9805 9971
9806 @c prevent bad page break with this line 9972 @c prevent bad page break with this line
9807 Here are macros for SDB and DWARF output. 9973 Here are macros for DWARF output.
9808
9809 @defmac SDB_DEBUGGING_INFO
9810 Define this macro to 1 if GCC should produce COFF-style debugging output
9811 for SDB in response to the @option{-g} option.
9812 @end defmac
9813 9974
9814 @defmac DWARF2_DEBUGGING_INFO 9975 @defmac DWARF2_DEBUGGING_INFO
9815 Define this macro if GCC should produce dwarf version 2 format 9976 Define this macro if GCC should produce dwarf version 2 format
9816 debugging output in response to the @option{-g} option. 9977 debugging output in response to the @option{-g} option.
9817 9978
9853 Define this macro to be a nonzero value if the assembler can generate Dwarf 2 10014 Define this macro to be a nonzero value if the assembler can generate Dwarf 2
9854 line debug info sections. This will result in much more compact line number 10015 line debug info sections. This will result in much more compact line number
9855 tables, and hence is desirable if it works. 10016 tables, and hence is desirable if it works.
9856 @end defmac 10017 @end defmac
9857 10018
10019 @defmac DWARF2_ASM_VIEW_DEBUG_INFO
10020 Define this macro to be a nonzero value if the assembler supports view
10021 assignment and verification in @code{.loc}. If it does not, but the
10022 user enables location views, the compiler may have to fallback to
10023 internal line number tables.
10024 @end defmac
10025
10026 @deftypefn {Target Hook} int TARGET_RESET_LOCATION_VIEW (rtx_insn *@var{})
10027 This hook, if defined, enables -ginternal-reset-location-views, and
10028 uses its result to override cases in which the estimated min insn
10029 length might be nonzero even when a PC advance (i.e., a view reset)
10030 cannot be taken for granted.
10031
10032 If the hook is defined, it must return a positive value to indicate
10033 the insn definitely advances the PC, and so the view number can be
10034 safely assumed to be reset; a negative value to mean the insn
10035 definitely does not advance the PC, and os the view number must not
10036 be reset; or zero to decide based on the estimated insn length.
10037
10038 If insn length is to be regarded as reliable, set the hook to
10039 @code{hook_int_rtx_insn_0}.
10040 @end deftypefn
10041
9858 @deftypevr {Target Hook} bool TARGET_WANT_DEBUG_PUB_SECTIONS 10042 @deftypevr {Target Hook} bool TARGET_WANT_DEBUG_PUB_SECTIONS
9859 True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections should be emitted. These sections are not used on most platforms, and in particular GDB does not use them. 10043 True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections should be emitted. These sections are not used on most platforms, and in particular GDB does not use them.
9860 @end deftypevr 10044 @end deftypevr
9861 10045
9862 @deftypevr {Target Hook} bool TARGET_DELAY_SCHED2 10046 @deftypevr {Target Hook} bool TARGET_DELAY_SCHED2
9912 10096
9913 @deftypefn {Target Hook} void TARGET_ASM_OUTPUT_DWARF_DTPREL (FILE *@var{file}, int @var{size}, rtx @var{x}) 10097 @deftypefn {Target Hook} void TARGET_ASM_OUTPUT_DWARF_DTPREL (FILE *@var{file}, int @var{size}, rtx @var{x})
9914 If defined, this target hook is a function which outputs a DTP-relative 10098 If defined, this target hook is a function which outputs a DTP-relative
9915 reference to the given TLS symbol of the specified size. 10099 reference to the given TLS symbol of the specified size.
9916 @end deftypefn 10100 @end deftypefn
9917
9918 @defmac PUT_SDB_@dots{}
9919 Define these macros to override the assembler syntax for the special
9920 SDB assembler directives. See @file{sdbout.c} for a list of these
9921 macros and their arguments. If the standard syntax is used, you need
9922 not define them yourself.
9923 @end defmac
9924
9925 @defmac SDB_DELIM
9926 Some assemblers do not support a semicolon as a delimiter, even between
9927 SDB assembler directives. In that case, define this macro to be the
9928 delimiter to use (usually @samp{\n}). It is not necessary to define
9929 a new set of @code{PUT_SDB_@var{op}} macros if this is the only change
9930 required.
9931 @end defmac
9932
9933 @defmac SDB_ALLOW_UNKNOWN_REFERENCES
9934 Define this macro to allow references to unknown structure,
9935 union, or enumeration tags to be emitted. Standard COFF does not
9936 allow handling of unknown references, MIPS ECOFF has support for
9937 it.
9938 @end defmac
9939
9940 @defmac SDB_ALLOW_FORWARD_REFERENCES
9941 Define this macro to allow references to structure, union, or
9942 enumeration tags that have not yet been seen to be handled. Some
9943 assemblers choke if forward tags are used, while some require it.
9944 @end defmac
9945
9946 @defmac SDB_OUTPUT_SOURCE_LINE (@var{stream}, @var{line})
9947 A C statement to output SDB debugging information before code for line
9948 number @var{line} of the current source file to the stdio stream
9949 @var{stream}. The default is to emit an @code{.ln} directive.
9950 @end defmac
9951 10101
9952 @need 2000 10102 @need 2000
9953 @node VMS Debug 10103 @node VMS Debug
9954 @subsection Macros for VMS Debug Format 10104 @subsection Macros for VMS Debug Format
9955 10105
10687 five otherwise. This is best for most machines. 10837 five otherwise. This is best for most machines.
10688 @end deftypefn 10838 @end deftypefn
10689 10839
10690 @defmac WORD_REGISTER_OPERATIONS 10840 @defmac WORD_REGISTER_OPERATIONS
10691 Define this macro to 1 if operations between registers with integral mode 10841 Define this macro to 1 if operations between registers with integral mode
10692 smaller than a word are always performed on the entire register. 10842 smaller than a word are always performed on the entire register. To be
10693 Most RISC machines have this property and most CISC machines do not. 10843 more explicit, if you start with a pair of @code{word_mode} registers with
10844 known values and you do a subword, for example @code{QImode}, addition on
10845 the low part of the registers, then the compiler may consider that the
10846 result has a known value in @code{word_mode} too if the macro is defined
10847 to 1. Most RISC machines have this property and most CISC machines do not.
10694 @end defmac 10848 @end defmac
10695 10849
10696 @deftypefn {Target Hook} {unsigned int} TARGET_MIN_ARITHMETIC_PRECISION (void) 10850 @deftypefn {Target Hook} {unsigned int} TARGET_MIN_ARITHMETIC_PRECISION (void)
10697 On some RISC architectures with 64-bit registers, the processor also 10851 On some RISC architectures with 64-bit registers, the processor also
10698 maintains 32-bit condition codes that make it possible to do real 32-bit 10852 maintains 32-bit condition codes that make it possible to do real 32-bit
10812 @code{SHIFT_COUNT_TRUNCATED} is false, and some shift patterns 10966 @code{SHIFT_COUNT_TRUNCATED} is false, and some shift patterns
10813 nevertheless truncate the shift count, you may get better code 10967 nevertheless truncate the shift count, you may get better code
10814 by overriding it. 10968 by overriding it.
10815 @end deftypefn 10969 @end deftypefn
10816 10970
10817 @deftypefn {Target Hook} bool TARGET_TRULY_NOOP_TRUNCATION (unsigned int @var{outprec}, unsigned int @var{inprec}) 10971 @deftypefn {Target Hook} bool TARGET_TRULY_NOOP_TRUNCATION (poly_uint64 @var{outprec}, poly_uint64 @var{inprec})
10818 This hook returns true if it is safe to ``convert'' a value of 10972 This hook returns true if it is safe to ``convert'' a value of
10819 @var{inprec} bits to one of @var{outprec} bits (where @var{outprec} is 10973 @var{inprec} bits to one of @var{outprec} bits (where @var{outprec} is
10820 smaller than @var{inprec}) by merely operating on it as if it had only 10974 smaller than @var{inprec}) by merely operating on it as if it had only
10821 @var{outprec} bits. The default returns true unconditionally, which 10975 @var{outprec} bits. The default returns true unconditionally, which
10822 is correct for most machines. 10976 is correct for most machines.
10852 In order to enforce the representation of @code{mode}, 11006 In order to enforce the representation of @code{mode},
10853 @code{TARGET_TRULY_NOOP_TRUNCATION} should return false when truncating to 11007 @code{TARGET_TRULY_NOOP_TRUNCATION} should return false when truncating to
10854 @code{mode}. 11008 @code{mode}.
10855 @end deftypefn 11009 @end deftypefn
10856 11010
11011 @deftypefn {Target Hook} bool TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P (void)
11012 On some targets, it is assumed that the compiler will spill all pseudos
11013 that are live across a call to @code{setjmp}, while other targets treat
11014 @code{setjmp} calls as normal function calls.
11015
11016 This hook returns false if @code{setjmp} calls do not preserve all
11017 non-volatile registers so that gcc that must spill all pseudos that are
11018 live across @code{setjmp} calls. Define this to return true if the
11019 target does not need to spill all pseudos live across @code{setjmp} calls.
11020 The default implementation conservatively assumes all pseudos must be
11021 spilled across @code{setjmp} calls.
11022 @end deftypefn
11023
10857 @defmac STORE_FLAG_VALUE 11024 @defmac STORE_FLAG_VALUE
10858 A C expression describing the value returned by a comparison operator 11025 A C expression describing the value returned by a comparison operator
10859 with an integral mode and stored by a store-flag instruction 11026 with an integral mode and stored by a store-flag instruction
10860 (@samp{cstore@var{mode}4}) when the condition is true. This description must 11027 (@samp{cstore@var{mode}4}) when the condition is true. This description must
10861 apply to @emph{all} the @samp{cstore@var{mode}4} patterns and all the 11028 apply to @emph{all} the @samp{cstore@var{mode}4} patterns and all the
11041 11208
11042 @deftypefn {C Target Hook} bool TARGET_CXX_IMPLICIT_EXTERN_C (const char*@var{}) 11209 @deftypefn {C Target Hook} bool TARGET_CXX_IMPLICIT_EXTERN_C (const char*@var{})
11043 Define this hook to add target-specific C++ implicit extern C functions. If this function returns true for the name of a file-scope function, that function implicitly gets extern "C" linkage rather than whatever language linkage the declaration would normally have. An example of such function is WinMain on Win32 targets. 11210 Define this hook to add target-specific C++ implicit extern C functions. If this function returns true for the name of a file-scope function, that function implicitly gets extern "C" linkage rather than whatever language linkage the declaration would normally have. An example of such function is WinMain on Win32 targets.
11044 @end deftypefn 11211 @end deftypefn
11045 11212
11046 @defmac NO_IMPLICIT_EXTERN_C 11213 @defmac SYSTEM_IMPLICIT_EXTERN_C
11047 Define this macro if the system header files support C++ as well as C@. 11214 Define this macro if the system header files do not support C++@.
11048 This macro inhibits the usual method of using system header files in 11215 This macro handles system header files by pretending that system
11049 C++, which is to pretend that the file's contents are enclosed in 11216 header files are enclosed in @samp{extern "C" @{@dots{}@}}.
11050 @samp{extern "C" @{@dots{}@}}.
11051 @end defmac 11217 @end defmac
11052 11218
11053 @findex #pragma 11219 @findex #pragma
11054 @findex pragma 11220 @findex pragma
11055 @defmac REGISTER_TARGET_PRAGMAS () 11221 @defmac REGISTER_TARGET_PRAGMAS ()
11301 convenient, and have mode @var{mode} if that is convenient. 11467 convenient, and have mode @var{mode} if that is convenient.
11302 @var{subtarget} may be used as the target for computing one of 11468 @var{subtarget} may be used as the target for computing one of
11303 @var{exp}'s operands. @var{ignore} is nonzero if the value is to be 11469 @var{exp}'s operands. @var{ignore} is nonzero if the value is to be
11304 ignored. This function should return the result of the call to the 11470 ignored. This function should return the result of the call to the
11305 built-in function. 11471 built-in function.
11306 @end deftypefn
11307
11308 @deftypefn {Target Hook} tree TARGET_BUILTIN_CHKP_FUNCTION (unsigned @var{fcode})
11309 This hook allows target to redefine built-in functions used by
11310 Pointer Bounds Checker for code instrumentation. Hook should return
11311 fndecl of function implementing generic builtin whose code is
11312 passed in @var{fcode}. Currently following built-in functions are
11313 obtained using this hook:
11314 @deftypefn {Built-in Function} __bounds_type __chkp_bndmk (const void *@var{lb}, size_t @var{size})
11315 Function code - BUILT_IN_CHKP_BNDMK. This built-in function is used
11316 by Pointer Bounds Checker to create bound values. @var{lb} holds low
11317 bound of the resulting bounds. @var{size} holds size of created bounds.
11318 @end deftypefn
11319
11320 @deftypefn {Built-in Function} void __chkp_bndstx (const void *@var{ptr}, __bounds_type @var{b}, const void **@var{loc})
11321 Function code - @code{BUILT_IN_CHKP_BNDSTX}. This built-in function is used
11322 by Pointer Bounds Checker to store bounds @var{b} for pointer @var{ptr}
11323 when @var{ptr} is stored by address @var{loc}.
11324 @end deftypefn
11325
11326 @deftypefn {Built-in Function} __bounds_type __chkp_bndldx (const void **@var{loc}, const void *@var{ptr})
11327 Function code - @code{BUILT_IN_CHKP_BNDLDX}. This built-in function is used
11328 by Pointer Bounds Checker to get bounds of pointer @var{ptr} loaded by
11329 address @var{loc}.
11330 @end deftypefn
11331
11332 @deftypefn {Built-in Function} void __chkp_bndcl (const void *@var{ptr}, __bounds_type @var{b})
11333 Function code - @code{BUILT_IN_CHKP_BNDCL}. This built-in function is used
11334 by Pointer Bounds Checker to perform check for pointer @var{ptr} against
11335 lower bound of bounds @var{b}.
11336 @end deftypefn
11337
11338 @deftypefn {Built-in Function} void __chkp_bndcu (const void *@var{ptr}, __bounds_type @var{b})
11339 Function code - @code{BUILT_IN_CHKP_BNDCU}. This built-in function is used
11340 by Pointer Bounds Checker to perform check for pointer @var{ptr} against
11341 upper bound of bounds @var{b}.
11342 @end deftypefn
11343
11344 @deftypefn {Built-in Function} __bounds_type __chkp_bndret (void *@var{ptr})
11345 Function code - @code{BUILT_IN_CHKP_BNDRET}. This built-in function is used
11346 by Pointer Bounds Checker to obtain bounds returned by a call statement.
11347 @var{ptr} passed to built-in is @code{SSA_NAME} returned by the call.
11348 @end deftypefn
11349
11350 @deftypefn {Built-in Function} __bounds_type __chkp_intersect (__bounds_type @var{b1}, __bounds_type @var{b2})
11351 Function code - @code{BUILT_IN_CHKP_INTERSECT}. This built-in function
11352 returns intersection of bounds @var{b1} and @var{b2}.
11353 @end deftypefn
11354
11355 @deftypefn {Built-in Function} __bounds_type __chkp_narrow (const void *@var{ptr}, __bounds_type @var{b}, size_t @var{s})
11356 Function code - @code{BUILT_IN_CHKP_NARROW}. This built-in function
11357 returns intersection of bounds @var{b} and
11358 [@var{ptr}, @var{ptr} + @var{s} - @code{1}].
11359 @end deftypefn
11360
11361 @deftypefn {Built-in Function} size_t __chkp_sizeof (const void *@var{ptr})
11362 Function code - @code{BUILT_IN_CHKP_SIZEOF}. This built-in function
11363 returns size of object referenced by @var{ptr}. @var{ptr} is always
11364 @code{ADDR_EXPR} of @code{VAR_DECL}. This built-in is used by
11365 Pointer Bounds Checker when bounds of object cannot be computed statically
11366 (e.g. object has incomplete type).
11367 @end deftypefn
11368
11369 @deftypefn {Built-in Function} const void *__chkp_extract_lower (__bounds_type @var{b})
11370 Function code - @code{BUILT_IN_CHKP_EXTRACT_LOWER}. This built-in function
11371 returns lower bound of bounds @var{b}.
11372 @end deftypefn
11373
11374 @deftypefn {Built-in Function} const void *__chkp_extract_upper (__bounds_type @var{b})
11375 Function code - @code{BUILT_IN_CHKP_EXTRACT_UPPER}. This built-in function
11376 returns upper bound of bounds @var{b}.
11377 @end deftypefn
11378 @end deftypefn
11379 @deftypefn {Target Hook} tree TARGET_CHKP_BOUND_TYPE (void)
11380 Return type to be used for bounds
11381 @end deftypefn
11382 @deftypefn {Target Hook} machine_mode TARGET_CHKP_BOUND_MODE (void)
11383 Return mode to be used for bounds.
11384 @end deftypefn
11385 @deftypefn {Target Hook} tree TARGET_CHKP_MAKE_BOUNDS_CONSTANT (HOST_WIDE_INT @var{lb}, HOST_WIDE_INT @var{ub})
11386 Return constant used to statically initialize constant bounds
11387 with specified lower bound @var{lb} and upper bounds @var{ub}.
11388 @end deftypefn
11389 @deftypefn {Target Hook} int TARGET_CHKP_INITIALIZE_BOUNDS (tree @var{var}, tree @var{lb}, tree @var{ub}, tree *@var{stmts})
11390 Generate a list of statements @var{stmts} to initialize pointer
11391 bounds variable @var{var} with bounds @var{lb} and @var{ub}. Return
11392 the number of generated statements.
11393 @end deftypefn 11472 @end deftypefn
11394 11473
11395 @deftypefn {Target Hook} tree TARGET_RESOLVE_OVERLOADED_BUILTIN (unsigned int @var{loc}, tree @var{fndecl}, void *@var{arglist}) 11474 @deftypefn {Target Hook} tree TARGET_RESOLVE_OVERLOADED_BUILTIN (unsigned int @var{loc}, tree @var{fndecl}, void *@var{arglist})
11396 Select a replacement for a machine specific built-in function that 11475 Select a replacement for a machine specific built-in function that
11397 was set up by @samp{TARGET_INIT_BUILTINS}. This is done 11476 was set up by @samp{TARGET_INIT_BUILTINS}. This is done
11904 All and all it does not take long to convert ports that the 11983 All and all it does not take long to convert ports that the
11905 maintainer is familiar with. 11984 maintainer is familiar with.
11906 11985
11907 @end defmac 11986 @end defmac
11908 11987
11988 @deftypefn {Target Hook} bool TARGET_HAVE_SPECULATION_SAFE_VALUE (bool @var{active})
11989 This hook is used to determine the level of target support for
11990 @code{__builtin_speculation_safe_value}. If called with an argument
11991 of false, it returns true if the target has been modified to support
11992 this builtin. If called with an argument of true, it returns true
11993 if the target requires active mitigation execution might be speculative.
11994
11995 The default implementation returns false if the target does not define
11996 a pattern named @code{speculation_barrier}. Else it returns true
11997 for the first case and whether the pattern is enabled for the current
11998 compilation for the second case.
11999
12000 For targets that have no processors that can execute instructions
12001 speculatively an alternative implemenation of this hook is available:
12002 simply redefine this hook to @code{speculation_safe_value_not_needed}
12003 along with your other target hooks.
12004 @end deftypefn
12005
12006 @deftypefn {Target Hook} rtx TARGET_SPECULATION_SAFE_VALUE (machine_mode @var{mode}, rtx @var{result}, rtx @var{val}, rtx @var{failval})
12007 This target hook can be used to generate a target-specific code
12008 sequence that implements the @code{__builtin_speculation_safe_value}
12009 built-in function. The function must always return @var{val} in
12010 @var{result} in mode @var{mode} when the cpu is not executing
12011 speculatively, but must never return that when speculating until it
12012 is known that the speculation will not be unwound. The hook supports
12013 two primary mechanisms for implementing the requirements. The first
12014 is to emit a speculation barrier which forces the processor to wait
12015 until all prior speculative operations have been resolved; the second
12016 is to use a target-specific mechanism that can track the speculation
12017 state and to return @var{failval} if it can determine that
12018 speculation must be unwound at a later time.
12019
12020 The default implementation simply copies @var{val} to @var{result} and
12021 emits a @code{speculation_barrier} instruction if that is defined.
12022 @end deftypefn
12023
11909 @deftypefn {Target Hook} void TARGET_RUN_TARGET_SELFTESTS (void) 12024 @deftypefn {Target Hook} void TARGET_RUN_TARGET_SELFTESTS (void)
11910 If selftests are enabled, run any selftests for this target. 12025 If selftests are enabled, run any selftests for this target.
11911 @end deftypefn 12026 @end deftypefn