Mercurial > hg > CbC > CbC_gcc
comparison gcc/doc/tm.texi @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 @c Copyright (C) 1988-2018 Free Software Foundation, Inc. | 1 @c Copyright (C) 1988-2020 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 |
50 * Target Attributes:: Defining target-specific uses of @code{__attribute__}. | 50 * Target Attributes:: Defining target-specific uses of @code{__attribute__}. |
51 * Emulated TLS:: Emulated TLS support. | 51 * Emulated TLS:: Emulated TLS support. |
52 * MIPS Coprocessors:: MIPS coprocessor support and how to customize it. | 52 * MIPS Coprocessors:: MIPS coprocessor support and how to customize it. |
53 * PCH Target:: Validity checking for precompiled headers. | 53 * PCH Target:: Validity checking for precompiled headers. |
54 * C++ ABI:: Controlling C++ ABI changes. | 54 * C++ ABI:: Controlling C++ ABI changes. |
55 * D Language and ABI:: Controlling D ABI changes. | |
55 * Named Address Spaces:: Adding support for named address spaces | 56 * Named Address Spaces:: Adding support for named address spaces |
56 * Misc:: Everything else. | 57 * Misc:: Everything else. |
57 @end menu | 58 @end menu |
58 | 59 |
59 @node Target Structure | 60 @node Target Structure |
104 @file{common/common-target-def.h}. If targets initialize | 105 @file{common/common-target-def.h}. If targets initialize |
105 @code{targetm_common} themselves, they should set | 106 @code{targetm_common} themselves, they should set |
106 @code{target_has_targetm_common=yes} in @file{config.gcc}; otherwise a | 107 @code{target_has_targetm_common=yes} in @file{config.gcc}; otherwise a |
107 default definition is used. | 108 default definition is used. |
108 | 109 |
110 Similarly, there is a @code{targetdm} variable for hooks that are | |
111 specific to the D language front end, documented as ``D Target Hook''. | |
112 This is declared in @file{d/d-target.h}, the initializer | |
113 @code{TARGETDM_INITIALIZER} in @file{d/d-target-def.h}. If targets | |
114 initialize @code{targetdm} themselves, they should set | |
115 @code{target_has_targetdm=yes} in @file{config.gcc}; otherwise a default | |
116 definition is used. | |
117 | |
109 @node Driver | 118 @node Driver |
110 @section Controlling the Compilation Driver, @file{gcc} | 119 @section Controlling the Compilation Driver, @file{gcc} |
111 @cindex driver | 120 @cindex driver |
112 @cindex controlling the compilation driver | 121 @cindex controlling the compilation driver |
113 | 122 |
747 | 756 |
748 @deftypefn {Common Target Hook} void TARGET_OPTION_INIT_STRUCT (struct gcc_options *@var{opts}) | 757 @deftypefn {Common Target Hook} void TARGET_OPTION_INIT_STRUCT (struct gcc_options *@var{opts}) |
749 Set target-dependent initial values of fields in @var{opts}. | 758 Set target-dependent initial values of fields in @var{opts}. |
750 @end deftypefn | 759 @end deftypefn |
751 | 760 |
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}. | |
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}. | |
758 @end deftypefn | |
759 | |
760 @defmac SWITCHABLE_TARGET | 761 @defmac SWITCHABLE_TARGET |
761 Some targets need to switch between substantially different subtargets | 762 Some targets need to switch between substantially different subtargets |
762 during compilation. For example, the MIPS target has one subtarget for | 763 during compilation. For example, the MIPS target has one subtarget for |
763 the traditional MIPS architecture and another for MIPS16. Source code | 764 the traditional MIPS architecture and another for MIPS16. Source code |
764 can switch between these two subarchitectures using the @code{mips16} | 765 can switch between these two subarchitectures using the @code{mips16} |
1070 @end defmac | 1071 @end defmac |
1071 | 1072 |
1072 @defmac MAX_OFILE_ALIGNMENT | 1073 @defmac MAX_OFILE_ALIGNMENT |
1073 Biggest alignment supported by the object file format of this machine. | 1074 Biggest alignment supported by the object file format of this machine. |
1074 Use this macro to limit the alignment which can be specified using the | 1075 Use this macro to limit the alignment which can be specified using the |
1075 @code{__attribute__ ((aligned (@var{n})))} construct. If not defined, | 1076 @code{__attribute__ ((aligned (@var{n})))} construct for functions and |
1076 the default value is @code{BIGGEST_ALIGNMENT}. | 1077 objects with static storage duration. The alignment of automatic |
1078 objects may exceed the object file format maximum up to the maximum | |
1079 supported by GCC. If not defined, the default value is | |
1080 @code{BIGGEST_ALIGNMENT}. | |
1077 | 1081 |
1078 On systems that use ELF, the default (in @file{config/elfos.h}) is | 1082 On systems that use ELF, the default (in @file{config/elfos.h}) is |
1079 the largest supported 32-bit ELF section alignment representable on | 1083 the largest supported 32-bit ELF section alignment representable on |
1080 a 32-bit host e.g. @samp{(((uint64_t) 1 << 28) * 8)}. | 1084 a 32-bit host e.g.@: @samp{(((uint64_t) 1 << 28) * 8)}. |
1081 On 32-bit ELF the largest supported section alignment in bits is | 1085 On 32-bit ELF the largest supported section alignment in bits is |
1082 @samp{(0x80000000 * 8)}, but this is not representable on 32-bit hosts. | 1086 @samp{(0x80000000 * 8)}, but this is not representable on 32-bit hosts. |
1083 @end defmac | 1087 @end defmac |
1084 | 1088 |
1085 @deftypefn {Target Hook} HOST_WIDE_INT TARGET_STATIC_RTX_ALIGNMENT (machine_mode @var{mode}) | 1089 @deftypefn {Target Hook} HOST_WIDE_INT TARGET_STATIC_RTX_ALIGNMENT (machine_mode @var{mode}) |
1864 function calls. | 1868 function calls. |
1865 | 1869 |
1866 If a register has 0 in @code{CALL_USED_REGISTERS}, the compiler | 1870 If a register has 0 in @code{CALL_USED_REGISTERS}, the compiler |
1867 automatically saves it on function entry and restores it on function | 1871 automatically saves it on function entry and restores it on function |
1868 exit, if the register is used within the function. | 1872 exit, if the register is used within the function. |
1873 | |
1874 Exactly one of @code{CALL_USED_REGISTERS} and @code{CALL_REALLY_USED_REGISTERS} | |
1875 must be defined. Modern ports should define @code{CALL_REALLY_USED_REGISTERS}. | |
1869 @end defmac | 1876 @end defmac |
1870 | 1877 |
1871 @defmac CALL_REALLY_USED_REGISTERS | 1878 @defmac CALL_REALLY_USED_REGISTERS |
1872 @cindex call-used register | 1879 @cindex call-used register |
1873 @cindex call-clobbered register | 1880 @cindex call-clobbered register |
1874 @cindex call-saved register | 1881 @cindex call-saved register |
1875 Like @code{CALL_USED_REGISTERS} except this macro doesn't require | 1882 Like @code{CALL_USED_REGISTERS} except this macro doesn't require |
1876 that the entire set of @code{FIXED_REGISTERS} be included. | 1883 that the entire set of @code{FIXED_REGISTERS} be included. |
1877 (@code{CALL_USED_REGISTERS} must be a superset of @code{FIXED_REGISTERS}). | 1884 (@code{CALL_USED_REGISTERS} must be a superset of @code{FIXED_REGISTERS}). |
1878 This macro is optional. If not specified, it defaults to the value | 1885 |
1879 of @code{CALL_USED_REGISTERS}. | 1886 Exactly one of @code{CALL_USED_REGISTERS} and @code{CALL_REALLY_USED_REGISTERS} |
1887 must be defined. Modern ports should define @code{CALL_REALLY_USED_REGISTERS}. | |
1880 @end defmac | 1888 @end defmac |
1881 | 1889 |
1882 @cindex call-used register | 1890 @cindex call-used register |
1883 @cindex call-clobbered register | 1891 @cindex call-clobbered register |
1884 @cindex call-saved register | 1892 @cindex call-saved register |
1885 @deftypefn {Target Hook} bool TARGET_HARD_REGNO_CALL_PART_CLOBBERED (unsigned int @var{regno}, machine_mode @var{mode}) | 1893 @deftypefn {Target Hook} {const predefined_function_abi &} TARGET_FNTYPE_ABI (const_tree @var{type}) |
1886 This hook should return true if @var{regno} is partly call-saved and | 1894 Return the ABI used by a function with type @var{type}; see the |
1887 partly call-clobbered, and if a value of mode @var{mode} would be partly | 1895 definition of @code{predefined_function_abi} for details of the ABI |
1888 clobbered by a call. For example, if the low 32 bits of @var{regno} are | 1896 descriptor. Targets only need to define this hook if they support |
1889 preserved across a call but higher bits are clobbered, this hook should | 1897 interoperability between several ABIs in the same translation unit. |
1890 return true for a 64-bit mode but false for a 32-bit mode. | 1898 @end deftypefn |
1899 | |
1900 @deftypefn {Target Hook} {const predefined_function_abi &} TARGET_INSN_CALLEE_ABI (const rtx_insn *@var{insn}) | |
1901 This hook returns a description of the ABI used by the target of | |
1902 call instruction @var{insn}; see the definition of | |
1903 @code{predefined_function_abi} for details of the ABI descriptor. | |
1904 Only the global function @code{insn_callee_abi} should call this hook | |
1905 directly. | |
1906 | |
1907 Targets only need to define this hook if they support | |
1908 interoperability between several ABIs in the same translation unit. | |
1909 @end deftypefn | |
1910 | |
1911 @cindex call-used register | |
1912 @cindex call-clobbered register | |
1913 @cindex call-saved register | |
1914 @deftypefn {Target Hook} bool TARGET_HARD_REGNO_CALL_PART_CLOBBERED (unsigned int @var{abi_id}, unsigned int @var{regno}, machine_mode @var{mode}) | |
1915 ABIs usually specify that calls must preserve the full contents | |
1916 of a particular register, or that calls can alter any part of a | |
1917 particular register. This information is captured by the target macro | |
1918 @code{CALL_REALLY_USED_REGISTERS}. However, some ABIs specify that calls | |
1919 must preserve certain bits of a particular register but can alter others. | |
1920 This hook should return true if this applies to at least one of the | |
1921 registers in @samp{(reg:@var{mode} @var{regno})}, and if as a result the | |
1922 call would alter part of the @var{mode} value. For example, if a call | |
1923 preserves the low 32 bits of a 64-bit hard register @var{regno} but can | |
1924 clobber the upper 32 bits, this hook should return true for a 64-bit mode | |
1925 but false for a 32-bit mode. | |
1926 | |
1927 The value of @var{abi_id} comes from the @code{predefined_function_abi} | |
1928 structure that describes the ABI of the call; see the definition of the | |
1929 structure for more details. If (as is usual) the target uses the same ABI | |
1930 for all functions in a translation unit, @var{abi_id} is always 0. | |
1891 | 1931 |
1892 The default implementation returns false, which is correct | 1932 The default implementation returns false, which is correct |
1893 for targets that don't have partly call-clobbered registers. | 1933 for targets that don't have partly call-clobbered registers. |
1934 @end deftypefn | |
1935 | |
1936 @deftypefn {Target Hook} {const char *} TARGET_GET_MULTILIB_ABI_NAME (void) | |
1937 This hook returns name of multilib ABI name. | |
1894 @end deftypefn | 1938 @end deftypefn |
1895 | 1939 |
1896 @findex fixed_regs | 1940 @findex fixed_regs |
1897 @findex call_used_regs | 1941 @findex call_used_regs |
1898 @findex global_regs | 1942 @findex global_regs |
3917 | 3961 |
3918 This section describes the macros which let you control how various | 3962 This section describes the macros which let you control how various |
3919 types of arguments are passed in registers or how they are arranged in | 3963 types of arguments are passed in registers or how they are arranged in |
3920 the stack. | 3964 the stack. |
3921 | 3965 |
3922 @deftypefn {Target Hook} rtx TARGET_FUNCTION_ARG (cumulative_args_t @var{ca}, machine_mode @var{mode}, const_tree @var{type}, bool @var{named}) | 3966 @deftypefn {Target Hook} rtx TARGET_FUNCTION_ARG (cumulative_args_t @var{ca}, const function_arg_info @var{&arg}) |
3923 Return an RTX indicating whether a function argument is passed in a | 3967 Return an RTX indicating whether function argument @var{arg} is passed |
3924 register and if so, which register. | 3968 in a register and if so, which register. Argument @var{ca} summarizes all |
3925 | 3969 the previous arguments. |
3926 The arguments are @var{ca}, which summarizes all the previous | |
3927 arguments; @var{mode}, the machine mode of the argument; @var{type}, | |
3928 the data type of the argument as a tree node or 0 if that is not known | |
3929 (which happens for C support library functions); and @var{named}, | |
3930 which is @code{true} for an ordinary argument and @code{false} for | |
3931 nameless arguments that correspond to @samp{@dots{}} in the called | |
3932 function's prototype. @var{type} can be an incomplete type if a | |
3933 syntax error has previously occurred. | |
3934 | 3970 |
3935 The return value is usually either a @code{reg} RTX for the hard | 3971 The return value is usually either a @code{reg} RTX for the hard |
3936 register in which to pass the argument, or zero to pass the argument | 3972 register in which to pass the argument, or zero to pass the argument |
3937 on the stack. | 3973 on the stack. |
3938 | 3974 |
3976 argument, the compiler will abort. If @code{REG_PARM_STACK_SPACE} is | 4012 argument, the compiler will abort. If @code{REG_PARM_STACK_SPACE} is |
3977 defined, the argument will be computed in the stack and then loaded into | 4013 defined, the argument will be computed in the stack and then loaded into |
3978 a register. | 4014 a register. |
3979 @end deftypefn | 4015 @end deftypefn |
3980 | 4016 |
3981 @deftypefn {Target Hook} bool TARGET_MUST_PASS_IN_STACK (machine_mode @var{mode}, const_tree @var{type}) | 4017 @deftypefn {Target Hook} bool TARGET_MUST_PASS_IN_STACK (const function_arg_info @var{&arg}) |
3982 This target hook should return @code{true} if we should not pass @var{type} | 4018 This target hook should return @code{true} if we should not pass @var{arg} |
3983 solely in registers. The file @file{expr.h} defines a | 4019 solely in registers. The file @file{expr.h} defines a |
3984 definition that is usually appropriate, refer to @file{expr.h} for additional | 4020 definition that is usually appropriate, refer to @file{expr.h} for additional |
3985 documentation. | 4021 documentation. |
3986 @end deftypefn | 4022 @end deftypefn |
3987 | 4023 |
3988 @deftypefn {Target Hook} rtx TARGET_FUNCTION_INCOMING_ARG (cumulative_args_t @var{ca}, machine_mode @var{mode}, const_tree @var{type}, bool @var{named}) | 4024 @deftypefn {Target Hook} rtx TARGET_FUNCTION_INCOMING_ARG (cumulative_args_t @var{ca}, const function_arg_info @var{&arg}) |
3989 Define this hook if the caller and callee on the target have different | 4025 Define this hook if the caller and callee on the target have different |
3990 views of where arguments are passed. Also define this hook if there are | 4026 views of where arguments are passed. Also define this hook if there are |
3991 functions that are never directly called, but are invoked by the hardware | 4027 functions that are never directly called, but are invoked by the hardware |
3992 and which have nonstandard calling conventions. | 4028 and which have nonstandard calling conventions. |
3993 | 4029 |
4013 @deftypefn {Target Hook} void TARGET_INIT_PIC_REG (void) | 4049 @deftypefn {Target Hook} void TARGET_INIT_PIC_REG (void) |
4014 Perform a target dependent initialization of pic_offset_table_rtx. | 4050 Perform a target dependent initialization of pic_offset_table_rtx. |
4015 This hook is called at the start of register allocation. | 4051 This hook is called at the start of register allocation. |
4016 @end deftypefn | 4052 @end deftypefn |
4017 | 4053 |
4018 @deftypefn {Target Hook} int TARGET_ARG_PARTIAL_BYTES (cumulative_args_t @var{cum}, machine_mode @var{mode}, tree @var{type}, bool @var{named}) | 4054 @deftypefn {Target Hook} int TARGET_ARG_PARTIAL_BYTES (cumulative_args_t @var{cum}, const function_arg_info @var{&arg}) |
4019 This target hook returns the number of bytes at the beginning of an | 4055 This target hook returns the number of bytes at the beginning of an |
4020 argument that must be put in registers. The value must be zero for | 4056 argument that must be put in registers. The value must be zero for |
4021 arguments that are passed entirely in registers or that are entirely | 4057 arguments that are passed entirely in registers or that are entirely |
4022 pushed on the stack. | 4058 pushed on the stack. |
4023 | 4059 |
4032 @code{TARGET_FUNCTION_ARG} for these arguments should return the first | 4068 @code{TARGET_FUNCTION_ARG} for these arguments should return the first |
4033 register to be used by the caller for this argument; likewise | 4069 register to be used by the caller for this argument; likewise |
4034 @code{TARGET_FUNCTION_INCOMING_ARG}, for the called function. | 4070 @code{TARGET_FUNCTION_INCOMING_ARG}, for the called function. |
4035 @end deftypefn | 4071 @end deftypefn |
4036 | 4072 |
4037 @deftypefn {Target Hook} bool TARGET_PASS_BY_REFERENCE (cumulative_args_t @var{cum}, machine_mode @var{mode}, const_tree @var{type}, bool @var{named}) | 4073 @deftypefn {Target Hook} bool TARGET_PASS_BY_REFERENCE (cumulative_args_t @var{cum}, const function_arg_info @var{&arg}) |
4038 This target hook should return @code{true} if an argument at the | 4074 This target hook should return @code{true} if argument @var{arg} at the |
4039 position indicated by @var{cum} should be passed by reference. This | 4075 position indicated by @var{cum} should be passed by reference. This |
4040 predicate is queried after target independent reasons for being | 4076 predicate is queried after target independent reasons for being |
4041 passed by reference, such as @code{TREE_ADDRESSABLE (type)}. | 4077 passed by reference, such as @code{TREE_ADDRESSABLE (@var{arg}.type)}. |
4042 | 4078 |
4043 If the hook returns true, a copy of that argument is made in memory and a | 4079 If the hook returns true, a copy of that argument is made in memory and a |
4044 pointer to the argument is passed instead of the argument itself. | 4080 pointer to the argument is passed instead of the argument itself. |
4045 The pointer is passed in whatever way is appropriate for passing a pointer | 4081 The pointer is passed in whatever way is appropriate for passing a pointer |
4046 to that type. | 4082 to that type. |
4047 @end deftypefn | 4083 @end deftypefn |
4048 | 4084 |
4049 @deftypefn {Target Hook} bool TARGET_CALLEE_COPIES (cumulative_args_t @var{cum}, machine_mode @var{mode}, const_tree @var{type}, bool @var{named}) | 4085 @deftypefn {Target Hook} bool TARGET_CALLEE_COPIES (cumulative_args_t @var{cum}, const function_arg_info @var{&arg}) |
4050 The function argument described by the parameters to this hook is | 4086 The function argument described by the parameters to this hook is |
4051 known to be passed by reference. The hook should return true if the | 4087 known to be passed by reference. The hook should return true if the |
4052 function argument should be copied by the callee instead of copied | 4088 function argument should be copied by the callee instead of copied |
4053 by the caller. | 4089 by the caller. |
4054 | 4090 |
4123 @code{INIT_CUMULATIVE_ARGS}. | 4159 @code{INIT_CUMULATIVE_ARGS}. |
4124 @c could use "this macro" in place of @code{INIT_CUMULATIVE_ARGS}, maybe. | 4160 @c could use "this macro" in place of @code{INIT_CUMULATIVE_ARGS}, maybe. |
4125 @c --mew 5feb93 i switched the order of the sentences. --mew 10feb93 | 4161 @c --mew 5feb93 i switched the order of the sentences. --mew 10feb93 |
4126 @end defmac | 4162 @end defmac |
4127 | 4163 |
4128 @deftypefn {Target Hook} void TARGET_FUNCTION_ARG_ADVANCE (cumulative_args_t @var{ca}, machine_mode @var{mode}, const_tree @var{type}, bool @var{named}) | 4164 @deftypefn {Target Hook} void TARGET_FUNCTION_ARG_ADVANCE (cumulative_args_t @var{ca}, const function_arg_info @var{&arg}) |
4129 This hook updates the summarizer variable pointed to by @var{ca} to | 4165 This hook updates the summarizer variable pointed to by @var{ca} to |
4130 advance past an argument in the argument list. The values @var{mode}, | 4166 advance past argument @var{arg} in the argument list. Once this is done, |
4131 @var{type} and @var{named} describe that argument. Once this is done, | |
4132 the variable @var{cum} is suitable for analyzing the @emph{following} | 4167 the variable @var{cum} is suitable for analyzing the @emph{following} |
4133 argument with @code{TARGET_FUNCTION_ARG}, etc. | 4168 argument with @code{TARGET_FUNCTION_ARG}, etc. |
4134 | 4169 |
4135 This hook need not do anything if the argument in question was passed | 4170 This hook need not do anything if the argument in question was passed |
4136 on the stack. The compiler knows how to track the amount of stack space | 4171 on the stack. The compiler knows how to track the amount of stack space |
4257 Define this to return nonzero if the port can handle pointers | 4292 Define this to return nonzero if the port can handle pointers |
4258 with machine mode @var{mode}. The default version of this | 4293 with machine mode @var{mode}. The default version of this |
4259 hook returns true for both @code{ptr_mode} and @code{Pmode}. | 4294 hook returns true for both @code{ptr_mode} and @code{Pmode}. |
4260 @end deftypefn | 4295 @end deftypefn |
4261 | 4296 |
4262 @deftypefn {Target Hook} bool TARGET_REF_MAY_ALIAS_ERRNO (struct ao_ref *@var{ref}) | 4297 @deftypefn {Target Hook} bool TARGET_REF_MAY_ALIAS_ERRNO (ao_ref *@var{ref}) |
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. | 4298 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. |
4264 @end deftypefn | 4299 @end deftypefn |
4265 | 4300 |
4266 @deftypefn {Target Hook} machine_mode TARGET_TRANSLATE_MODE_ATTRIBUTE (machine_mode @var{mode}) | 4301 @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 | 4302 Define this hook if during mode attribute processing, the port should |
4285 | 4320 |
4286 @deftypefn {Target Hook} bool TARGET_VECTOR_MODE_SUPPORTED_P (machine_mode @var{mode}) | 4321 @deftypefn {Target Hook} bool TARGET_VECTOR_MODE_SUPPORTED_P (machine_mode @var{mode}) |
4287 Define this to return nonzero if the port is prepared to handle | 4322 Define this to return nonzero if the port is prepared to handle |
4288 insns involving vector mode @var{mode}. At the very least, it | 4323 insns involving vector mode @var{mode}. At the very least, it |
4289 must have move patterns for this mode. | 4324 must have move patterns for this mode. |
4325 @end deftypefn | |
4326 | |
4327 @deftypefn {Target Hook} bool TARGET_COMPATIBLE_VECTOR_TYPES_P (const_tree @var{type1}, const_tree @var{type2}) | |
4328 Return true if there is no target-specific reason for treating | |
4329 vector types @var{type1} and @var{type2} as distinct types. The caller | |
4330 has already checked for target-independent reasons, meaning that the | |
4331 types are known to have the same mode, to have the same number of elements, | |
4332 and to have what the caller considers to be compatible element types. | |
4333 | |
4334 The main reason for defining this hook is to reject pairs of types | |
4335 that are handled differently by the target's calling convention. | |
4336 For example, when a new @var{N}-bit vector architecture is added | |
4337 to a target, the target may want to handle normal @var{N}-bit | |
4338 @code{VECTOR_TYPE} arguments and return values in the same way as | |
4339 before, to maintain backwards compatibility. However, it may also | |
4340 provide new, architecture-specific @code{VECTOR_TYPE}s that are passed | |
4341 and returned in a more efficient way. It is then important to maintain | |
4342 a distinction between the ``normal'' @code{VECTOR_TYPE}s and the new | |
4343 architecture-specific ones. | |
4344 | |
4345 The default implementation returns true, which is correct for most targets. | |
4290 @end deftypefn | 4346 @end deftypefn |
4291 | 4347 |
4292 @deftypefn {Target Hook} opt_machine_mode TARGET_ARRAY_MODE (machine_mode @var{mode}, unsigned HOST_WIDE_INT @var{nelems}) | 4348 @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 | 4349 Return the mode that GCC should use for an array that has |
4294 @var{nelems} elements, with each element having mode @var{mode}. | 4350 @var{nelems} elements, with each element having mode @var{mode}. |
4946 or @code{NULL} if this is an indirect call. | 5002 or @code{NULL} if this is an indirect call. |
4947 | 5003 |
4948 It is not uncommon for limitations of calling conventions to prevent | 5004 It is not uncommon for limitations of calling conventions to prevent |
4949 tail calls to functions outside the current unit of translation, or | 5005 tail calls to functions outside the current unit of translation, or |
4950 during PIC compilation. The hook is used to enforce these restrictions, | 5006 during PIC compilation. The hook is used to enforce these restrictions, |
4951 as the @code{sibcall} md pattern can not fail, or fall over to a | 5007 as the @code{sibcall} md pattern cannot fail, or fall over to a |
4952 ``normal'' call. The criteria for successful sibling call optimization | 5008 ``normal'' call. The criteria for successful sibling call optimization |
4953 may vary greatly between different architectures. | 5009 may vary greatly between different architectures. |
4954 @end deftypefn | 5010 @end deftypefn |
4955 | 5011 |
4956 @deftypefn {Target Hook} void TARGET_EXTRA_LIVE_ON_ENTRY (bitmap @var{regs}) | 5012 @deftypefn {Target Hook} void TARGET_EXTRA_LIVE_ON_ENTRY (bitmap @var{regs}) |
5075 | 5131 |
5076 @deftypevr {Target Hook} bool TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS | 5132 @deftypevr {Target Hook} bool TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS |
5077 Set to true if each call that binds to a local definition explicitly | 5133 Set to true if each call that binds to a local definition explicitly |
5078 clobbers or sets all non-fixed registers modified by performing the call. | 5134 clobbers or sets all non-fixed registers modified by performing the call. |
5079 That is, by the call pattern itself, or by code that might be inserted by the | 5135 That is, by the call pattern itself, or by code that might be inserted by the |
5080 linker (e.g. stubs, veneers, branch islands), but not including those | 5136 linker (e.g.@: stubs, veneers, branch islands), but not including those |
5081 modifiable by the callee. The affected registers may be mentioned explicitly | 5137 modifiable by the callee. The affected registers may be mentioned explicitly |
5082 in the call pattern, or included as clobbers in CALL_INSN_FUNCTION_USAGE. | 5138 in the call pattern, or included as clobbers in CALL_INSN_FUNCTION_USAGE. |
5083 The default version of this hook is set to false. The purpose of this hook | 5139 The default version of this hook is set to false. The purpose of this hook |
5084 is to enable the fipa-ra optimization. | 5140 is to enable the fipa-ra optimization. |
5085 @end deftypevr | 5141 @end deftypevr |
5158 beginning of the function, before any parameter access are made. The | 5214 beginning of the function, before any parameter access are made. The |
5159 return value of this function should be an RTX that contains the value | 5215 return value of this function should be an RTX that contains the value |
5160 to use as the return of @code{__builtin_saveregs}. | 5216 to use as the return of @code{__builtin_saveregs}. |
5161 @end deftypefn | 5217 @end deftypefn |
5162 | 5218 |
5163 @deftypefn {Target Hook} void TARGET_SETUP_INCOMING_VARARGS (cumulative_args_t @var{args_so_far}, machine_mode @var{mode}, tree @var{type}, int *@var{pretend_args_size}, int @var{second_time}) | 5219 @deftypefn {Target Hook} void TARGET_SETUP_INCOMING_VARARGS (cumulative_args_t @var{args_so_far}, const function_arg_info @var{&arg}, int *@var{pretend_args_size}, int @var{second_time}) |
5164 This target hook offers an alternative to using | 5220 This target hook offers an alternative to using |
5165 @code{__builtin_saveregs} and defining the hook | 5221 @code{__builtin_saveregs} and defining the hook |
5166 @code{TARGET_EXPAND_BUILTIN_SAVEREGS}. Use it to store the anonymous | 5222 @code{TARGET_EXPAND_BUILTIN_SAVEREGS}. Use it to store the anonymous |
5167 register arguments into the stack so that all the arguments appear to | 5223 register arguments into the stack so that all the arguments appear to |
5168 have been passed consecutively on the stack. Once this is done, you can | 5224 have been passed consecutively on the stack. Once this is done, you can |
5169 use the standard implementation of varargs that works for machines that | 5225 use the standard implementation of varargs that works for machines that |
5170 pass all their arguments on the stack. | 5226 pass all their arguments on the stack. |
5171 | 5227 |
5172 The argument @var{args_so_far} points to the @code{CUMULATIVE_ARGS} data | 5228 The argument @var{args_so_far} points to the @code{CUMULATIVE_ARGS} data |
5173 structure, containing the values that are obtained after processing the | 5229 structure, containing the values that are obtained after processing the |
5174 named arguments. The arguments @var{mode} and @var{type} describe the | 5230 named arguments. The argument @var{arg} describes the last of these named |
5175 last named argument---its machine mode and its data type as a tree node. | 5231 arguments. |
5176 | 5232 |
5177 The target hook should do two things: first, push onto the stack all the | 5233 The target hook should do two things: first, push onto the stack all the |
5178 argument registers @emph{not} used for the named arguments, and second, | 5234 argument registers @emph{not} used for the named arguments, and second, |
5179 store the size of the data thus pushed into the @code{int}-valued | 5235 store the size of the data thus pushed into the @code{int}-valued |
5180 variable pointed to by @var{pretend_args_size}. The value that you | 5236 variable pointed to by @var{pretend_args_size}. The value that you |
5270 @deftypefn {Target Hook} void TARGET_STORE_RETURNED_BOUNDS (rtx @var{slot}, rtx @var{bounds}) | 5326 @deftypefn {Target Hook} void TARGET_STORE_RETURNED_BOUNDS (rtx @var{slot}, rtx @var{bounds}) |
5271 This hook is used by expand pass to emit insn to store @var{bounds} | 5327 This hook is used by expand pass to emit insn to store @var{bounds} |
5272 returned by function call into @var{slot}. | 5328 returned by function call into @var{slot}. |
5273 @end deftypefn | 5329 @end deftypefn |
5274 | 5330 |
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}) | |
5276 Use it to store bounds for anonymous register arguments stored | |
5277 into the stack. Arguments meaning is similar to | |
5278 @code{TARGET_SETUP_INCOMING_VARARGS}. | |
5279 @end deftypefn | |
5280 | |
5281 @node Trampolines | 5331 @node Trampolines |
5282 @section Support for Nested Functions | 5332 @section Support for Nested Functions |
5283 @cindex support for nested functions | 5333 @cindex support for nested functions |
5284 @cindex trampolines for nested functions | 5334 @cindex trampolines for nested functions |
5285 @cindex descriptors for nested functions | 5335 @cindex descriptors for nested functions |
5547 macro, a reasonable default is used. | 5597 macro, a reasonable default is used. |
5548 @end defmac | 5598 @end defmac |
5549 | 5599 |
5550 @deftypefn {Target Hook} bool TARGET_LIBC_HAS_FUNCTION (enum function_class @var{fn_class}) | 5600 @deftypefn {Target Hook} bool TARGET_LIBC_HAS_FUNCTION (enum function_class @var{fn_class}) |
5551 This hook determines whether a function from a class of functions | 5601 This hook determines whether a function from a class of functions |
5552 @var{fn_class} is present at the runtime. | 5602 @var{fn_class} is present in the target C library. |
5603 @end deftypefn | |
5604 | |
5605 @deftypefn {Target Hook} bool TARGET_LIBC_HAS_FAST_FUNCTION (int @var{fcode}) | |
5606 This hook determines whether a function from a class of functions | |
5607 @code{(enum function_class)}@var{fcode} has a fast implementation. | |
5553 @end deftypefn | 5608 @end deftypefn |
5554 | 5609 |
5555 @defmac NEXT_OBJC_RUNTIME | 5610 @defmac NEXT_OBJC_RUNTIME |
5556 Set this macro to 1 to use the "NeXT" Objective-C message sending conventions | 5611 Set this macro to 1 to use the "NeXT" Objective-C message sending conventions |
5557 by default. This calling convention involves passing the object, the selector | 5612 by default. This calling convention involves passing the object, the selector |
5887 Returns cost of different scalar or vector statements for vectorization cost model. | 5942 Returns cost of different scalar or vector statements for vectorization cost model. |
5888 For vector memory operations the cost may depend on type (@var{vectype}) and | 5943 For vector memory operations the cost may depend on type (@var{vectype}) and |
5889 misalignment value (@var{misalign}). | 5944 misalignment value (@var{misalign}). |
5890 @end deftypefn | 5945 @end deftypefn |
5891 | 5946 |
5892 @deftypefn {Target Hook} HOST_WIDE_INT TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT (const_tree @var{type}) | 5947 @deftypefn {Target Hook} poly_uint64 TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT (const_tree @var{type}) |
5893 This hook returns the preferred alignment in bits for accesses to | 5948 This hook returns the preferred alignment in bits for accesses to |
5894 vectors of type @var{type} in vectorized code. This might be less than | 5949 vectors of type @var{type} in vectorized code. This might be less than |
5895 or greater than the ABI-defined value returned by | 5950 or greater than the ABI-defined value returned by |
5896 @code{TARGET_VECTOR_ALIGNMENT}. It can be equal to the alignment of | 5951 @code{TARGET_VECTOR_ALIGNMENT}. It can be equal to the alignment of |
5897 a single element, in which case the vectorizer will not try to optimize | 5952 a single element, in which case the vectorizer will not try to optimize |
5923 the selector into a register and using the @var{vec_perm@var{mode}} | 5978 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 | 5979 instruction pattern. There is no need for the hook to handle these two |
5925 implementation approaches itself. | 5980 implementation approaches itself. |
5926 @end deftypefn | 5981 @end deftypefn |
5927 | 5982 |
5928 @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_CONVERSION (unsigned @var{code}, tree @var{dest_type}, tree @var{src_type}) | |
5929 This hook should return the DECL of a function that implements conversion of the | |
5930 input vector of type @var{src_type} to type @var{dest_type}. | |
5931 The value of @var{code} is one of the enumerators in @code{enum tree_code} and | |
5932 specifies how the conversion is to be applied | |
5933 (truncation, rounding, etc.). | |
5934 | |
5935 If this hook is defined, the autovectorizer will use the | |
5936 @code{TARGET_VECTORIZE_BUILTIN_CONVERSION} target hook when vectorizing | |
5937 conversion. Otherwise, it will return @code{NULL_TREE}. | |
5938 @end deftypefn | |
5939 | |
5940 @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION (unsigned @var{code}, tree @var{vec_type_out}, tree @var{vec_type_in}) | 5983 @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION (unsigned @var{code}, tree @var{vec_type_out}, tree @var{vec_type_in}) |
5941 This hook should return the decl of a function that implements the | 5984 This hook should return the decl of a function that implements the |
5942 vectorized variant of the function with the @code{combined_fn} code | 5985 vectorized variant of the function with the @code{combined_fn} code |
5943 @var{code} or @code{NULL_TREE} if such a function is not available. | 5986 @var{code} or @code{NULL_TREE} if such a function is not available. |
5944 The return type of the vectorized function shall be of vector type | 5987 The return type of the vectorized function shall be of vector type |
5972 step on @var{mode} to. The reduction is then carried out reducing upper | 6015 step on @var{mode} to. The reduction is then carried out reducing upper |
5973 against lower halves of vectors recursively until the specified mode is | 6016 against lower halves of vectors recursively until the specified mode is |
5974 reached. The default is @var{mode} which means no splitting. | 6017 reached. The default is @var{mode} which means no splitting. |
5975 @end deftypefn | 6018 @end deftypefn |
5976 | 6019 |
5977 @deftypefn {Target Hook} void TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_SIZES (vector_sizes *@var{sizes}) | 6020 @deftypefn {Target Hook} {unsigned int} TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_MODES (vector_modes *@var{modes}, bool @var{all}) |
5978 If the mode returned by @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE} is not | 6021 If using the mode returned by @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE} |
5979 the only one that is worth considering, this hook should add all suitable | 6022 is not the only approach worth considering, this hook should add one mode to |
5980 vector sizes to @var{sizes}, in order of decreasing preference. The first | 6023 @var{modes} for each useful alternative approach. These modes are then |
5981 one should be the size of @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE}. | 6024 passed to @code{TARGET_VECTORIZE_RELATED_MODE} to obtain the vector mode |
6025 for a given element mode. | |
6026 | |
6027 The modes returned in @var{modes} should use the smallest element mode | |
6028 possible for the vectorization approach that they represent, preferring | |
6029 integer modes over floating-poing modes in the event of a tie. The first | |
6030 mode should be the @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE} for its | |
6031 element mode. | |
6032 | |
6033 If @var{all} is true, add suitable vector modes even when they are generally | |
6034 not expected to be worthwhile. | |
6035 | |
6036 The hook returns a bitmask of flags that control how the modes in | |
6037 @var{modes} are used. The flags are: | |
6038 @table @code | |
6039 @item VECT_COMPARE_COSTS | |
6040 Tells the loop vectorizer to try all the provided modes and pick the one | |
6041 with the lowest cost. By default the vectorizer will choose the first | |
6042 mode that works. | |
6043 @end table | |
5982 | 6044 |
5983 The hook does not need to do anything if the vector returned by | 6045 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 | 6046 @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE} is the only one relevant |
5985 for autovectorization. The default implementation does nothing. | 6047 for autovectorization. The default implementation adds no modes and |
5986 @end deftypefn | 6048 returns 0. |
5987 | 6049 @end deftypefn |
5988 @deftypefn {Target Hook} opt_machine_mode TARGET_VECTORIZE_GET_MASK_MODE (poly_uint64 @var{nunits}, poly_uint64 @var{length}) | 6050 |
5989 A vector mask is a value that holds one boolean result for every element | 6051 @deftypefn {Target Hook} opt_machine_mode TARGET_VECTORIZE_RELATED_MODE (machine_mode @var{vector_mode}, scalar_mode @var{element_mode}, poly_uint64 @var{nunits}) |
5990 in a vector. This hook returns the machine mode that should be used to | 6052 If a piece of code is using vector mode @var{vector_mode} and also wants |
5991 represent such a mask when the vector in question is @var{length} bytes | 6053 to operate on elements of mode @var{element_mode}, return the vector mode |
5992 long and contains @var{nunits} elements. The hook returns an empty | 6054 it should use for those elements. If @var{nunits} is nonzero, ensure that |
5993 @code{opt_machine_mode} if no such mode exists. | 6055 the mode has exactly @var{nunits} elements, otherwise pick whichever vector |
5994 | 6056 size pairs the most naturally with @var{vector_mode}. Return an empty |
5995 The default implementation returns the mode of an integer vector that | 6057 @code{opt_machine_mode} if there is no supported vector mode with the |
5996 is @var{length} bytes long and that contains @var{nunits} elements, | 6058 required properties. |
5997 if such a mode exists. | 6059 |
6060 There is no prescribed way of handling the case in which @var{nunits} | |
6061 is zero. One common choice is to pick a vector mode with the same size | |
6062 as @var{vector_mode}; this is the natural choice if the target has a | |
6063 fixed vector size. Another option is to choose a vector mode with the | |
6064 same number of elements as @var{vector_mode}; this is the natural choice | |
6065 if the target has a fixed number of elements. Alternatively, the hook | |
6066 might choose a middle ground, such as trying to keep the number of | |
6067 elements as similar as possible while applying maximum and minimum | |
6068 vector sizes. | |
6069 | |
6070 The default implementation uses @code{mode_for_vector} to find the | |
6071 requested mode, returning a mode with the same size as @var{vector_mode} | |
6072 when @var{nunits} is zero. This is the correct behavior for most targets. | |
6073 @end deftypefn | |
6074 | |
6075 @deftypefn {Target Hook} opt_machine_mode TARGET_VECTORIZE_GET_MASK_MODE (machine_mode @var{mode}) | |
6076 Return the mode to use for a vector mask that holds one boolean | |
6077 result for each element of vector mode @var{mode}. The returned mask mode | |
6078 can be a vector of integers (class @code{MODE_VECTOR_INT}), a vector of | |
6079 booleans (class @code{MODE_VECTOR_BOOL}) or a scalar integer (class | |
6080 @code{MODE_INT}). Return an empty @code{opt_machine_mode} if no such | |
6081 mask mode exists. | |
6082 | |
6083 The default implementation returns a @code{MODE_VECTOR_INT} with the | |
6084 same size and number of elements as @var{mode}, if such a mode exists. | |
5998 @end deftypefn | 6085 @end deftypefn |
5999 | 6086 |
6000 @deftypefn {Target Hook} bool TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE (unsigned @var{ifn}) | 6087 @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 | 6088 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 | 6089 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. | 6090 all zeros. GCC can then try to branch around the instruction instead. |
6004 @end deftypefn | 6091 @end deftypefn |
6005 | 6092 |
6006 @deftypefn {Target Hook} {void *} TARGET_VECTORIZE_INIT_COST (struct loop *@var{loop_info}) | 6093 @deftypefn {Target Hook} {void *} TARGET_VECTORIZE_INIT_COST (class loop *@var{loop_info}) |
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. | 6094 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. |
6008 @end deftypefn | 6095 @end deftypefn |
6009 | 6096 |
6010 @deftypefn {Target Hook} unsigned TARGET_VECTORIZE_ADD_STMT_COST (void *@var{data}, int @var{count}, enum vect_cost_for_stmt @var{kind}, struct _stmt_vec_info *@var{stmt_info}, int @var{misalign}, enum vect_cost_model_location @var{where}) | 6097 @deftypefn {Target Hook} unsigned TARGET_VECTORIZE_ADD_STMT_COST (void *@var{data}, int @var{count}, enum vect_cost_for_stmt @var{kind}, class _stmt_vec_info *@var{stmt_info}, int @var{misalign}, enum vect_cost_model_location @var{where}) |
6011 This hook should update the target-specific @var{data} in response to adding @var{count} copies of the given @var{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 @var{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. | 6098 This hook should update the target-specific @var{data} in response to adding @var{count} copies of the given @var{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 @var{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. |
6012 @end deftypefn | 6099 @end deftypefn |
6013 | 6100 |
6014 @deftypefn {Target Hook} void TARGET_VECTORIZE_FINISH_COST (void *@var{data}, unsigned *@var{prologue_cost}, unsigned *@var{body_cost}, unsigned *@var{epilogue_cost}) | 6101 @deftypefn {Target Hook} void TARGET_VECTORIZE_FINISH_COST (void *@var{data}, unsigned *@var{prologue_cost}, unsigned *@var{body_cost}, unsigned *@var{epilogue_cost}) |
6015 This hook should complete calculations of the cost of vectorizing a loop or basic block based on @var{data}, and return the prologue, body, and epilogue costs as unsigned integers. The default returns the value of the three accumulators. | 6102 This hook should complete calculations of the cost of vectorizing a loop or basic block based on @var{data}, and return the prologue, body, and epilogue costs as unsigned integers. The default returns the value of the three accumulators. |
6057 | 6144 |
6058 @deftypefn {Target Hook} int TARGET_SIMT_VF (void) | 6145 @deftypefn {Target Hook} int TARGET_SIMT_VF (void) |
6059 Return number of threads in SIMT thread group on the target. | 6146 Return number of threads in SIMT thread group on the target. |
6060 @end deftypefn | 6147 @end deftypefn |
6061 | 6148 |
6062 @deftypefn {Target Hook} bool TARGET_GOACC_VALIDATE_DIMS (tree @var{decl}, int *@var{dims}, int @var{fn_level}) | 6149 @deftypefn {Target Hook} int TARGET_OMP_DEVICE_KIND_ARCH_ISA (enum omp_device_kind_arch_isa @var{trait}, const char *@var{name}) |
6150 Return 1 if @var{trait} @var{name} is present in the OpenMP context's | |
6151 device trait set, return 0 if not present in any OpenMP context in the | |
6152 whole translation unit, or -1 if not present in the current OpenMP context | |
6153 but might be present in another OpenMP context in the same TU. | |
6154 @end deftypefn | |
6155 | |
6156 @deftypefn {Target Hook} bool TARGET_GOACC_VALIDATE_DIMS (tree @var{decl}, int *@var{dims}, int @var{fn_level}, unsigned @var{used}) | |
6063 This hook should check the launch dimensions provided for an OpenACC | 6157 This hook should check the launch dimensions provided for an OpenACC |
6064 compute region, or routine. Defaulted values are represented as -1 | 6158 compute region, or routine. Defaulted values are represented as -1 |
6065 and non-constant values as 0. The @var{fn_level} is negative for the | 6159 and non-constant values as 0. The @var{fn_level} is negative for the |
6066 function corresponding to the compute region. For a routine is is the | 6160 function corresponding to the compute region. For a routine is is the |
6067 outermost level at which partitioned execution may be spawned. The hook | 6161 outermost level at which partitioned execution may be spawned. The hook |
6308 when the condition code is set this way some bits (such as the overflow | 6402 when the condition code is set this way some bits (such as the overflow |
6309 bit) are not set in the same way as a test instruction, so that a different | 6403 bit) are not set in the same way as a test instruction, so that a different |
6310 branch instruction must be used for some conditional branches. When | 6404 branch instruction must be used for some conditional branches. When |
6311 this happens, use the machine mode of the condition code register to | 6405 this happens, use the machine mode of the condition code register to |
6312 record different formats of the condition code register. Modes can | 6406 record different formats of the condition code register. Modes can |
6313 also be used to record which compare instruction (e.g. a signed or an | 6407 also be used to record which compare instruction (e.g.@: a signed or an |
6314 unsigned comparison) produced the condition codes. | 6408 unsigned comparison) produced the condition codes. |
6315 | 6409 |
6316 If other modes than @code{CCmode} are required, add them to | 6410 If other modes than @code{CCmode} are required, add them to |
6317 @file{@var{machine}-modes.def} and define @code{SELECT_CC_MODE} to choose | 6411 @file{@var{machine}-modes.def} and define @code{SELECT_CC_MODE} to choose |
6318 a mode given an operand of a compare. This is needed because the modes | 6412 a mode given an operand of a compare. This is needed because the modes |
6436 same. If they are, it returns that mode. If they are different, it | 6530 same. If they are, it returns that mode. If they are different, it |
6437 returns @code{VOIDmode}. | 6531 returns @code{VOIDmode}. |
6438 @end deftypefn | 6532 @end deftypefn |
6439 | 6533 |
6440 @deftypevr {Target Hook} {unsigned int} TARGET_FLAGS_REGNUM | 6534 @deftypevr {Target Hook} {unsigned int} TARGET_FLAGS_REGNUM |
6441 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. | 6535 If the target has a dedicated flags register, and it needs to use the |
6536 post-reload comparison elimination pass, or the delay slot filler pass, | |
6537 then this value should be set appropriately. | |
6442 @end deftypevr | 6538 @end deftypevr |
6443 | 6539 |
6444 @node Costs | 6540 @node Costs |
6445 @section Describing Relative Costs of Operations | 6541 @section Describing Relative Costs of Operations |
6446 @cindex costs of instructions | 6542 @cindex costs of instructions |
6575 | 6671 |
6576 @deftypefn {Target Hook} bool TARGET_SLOW_UNALIGNED_ACCESS (machine_mode @var{mode}, unsigned int @var{align}) | 6672 @deftypefn {Target Hook} bool TARGET_SLOW_UNALIGNED_ACCESS (machine_mode @var{mode}, unsigned int @var{align}) |
6577 This hook returns true if memory accesses described by the | 6673 This hook returns true if memory accesses described by the |
6578 @var{mode} and @var{alignment} parameters have a cost many times greater | 6674 @var{mode} and @var{alignment} parameters have a cost many times greater |
6579 than aligned accesses, for example if they are emulated in a trap handler. | 6675 than aligned accesses, for example if they are emulated in a trap handler. |
6580 This hook is invoked only for unaligned accesses, i.e. when | 6676 This hook is invoked only for unaligned accesses, i.e.@: when |
6581 @code{@var{alignment} < GET_MODE_ALIGNMENT (@var{mode})}. | 6677 @code{@var{alignment} < GET_MODE_ALIGNMENT (@var{mode})}. |
6582 | 6678 |
6583 When this hook returns true, the compiler will act as if | 6679 When this hook returns true, the compiler will act as if |
6584 @code{STRICT_ALIGNMENT} were true when generating code for block | 6680 @code{STRICT_ALIGNMENT} were true when generating code for block |
6585 moves. This can cause significantly more instructions to be produced. | 6681 moves. This can cause significantly more instructions to be produced. |
6610 GCC will attempt several strategies when asked to copy between | 6706 GCC will attempt several strategies when asked to copy between |
6611 two areas of memory, or to set, clear or store to memory, for example | 6707 two areas of memory, or to set, clear or store to memory, for example |
6612 when copying a @code{struct}. The @code{by_pieces} infrastructure | 6708 when copying a @code{struct}. The @code{by_pieces} infrastructure |
6613 implements such memory operations as a sequence of load, store or move | 6709 implements such memory operations as a sequence of load, store or move |
6614 insns. Alternate strategies are to expand the | 6710 insns. Alternate strategies are to expand the |
6615 @code{movmem} or @code{setmem} optabs, to emit a library call, or to emit | 6711 @code{cpymem} or @code{setmem} optabs, to emit a library call, or to emit |
6616 unit-by-unit, loop-based operations. | 6712 unit-by-unit, loop-based operations. |
6617 | 6713 |
6618 This target hook should return true if, for a memory operation with a | 6714 This target hook should return true if, for a memory operation with a |
6619 given @var{size} and @var{alignment}, using the @code{by_pieces} | 6715 given @var{size} and @var{alignment}, using the @code{by_pieces} |
6620 infrastructure is expected to result in better code generation. | 6716 infrastructure is expected to result in better code generation. |
6629 The parameter @var{speed_p} is true if the code is currently being | 6725 The parameter @var{speed_p} is true if the code is currently being |
6630 optimized for speed rather than size. | 6726 optimized for speed rather than size. |
6631 | 6727 |
6632 Returning true for higher values of @var{size} can improve code generation | 6728 Returning true for higher values of @var{size} can improve code generation |
6633 for speed if the target does not provide an implementation of the | 6729 for speed if the target does not provide an implementation of the |
6634 @code{movmem} or @code{setmem} standard names, if the @code{movmem} or | 6730 @code{cpymem} or @code{setmem} standard names, if the @code{cpymem} or |
6635 @code{setmem} implementation would be more expensive than a sequence of | 6731 @code{setmem} implementation would be more expensive than a sequence of |
6636 insns, or if the overhead of a library call would dominate that of | 6732 insns, or if the overhead of a library call would dominate that of |
6637 the body of the memory operation. | 6733 the body of the memory operation. |
6638 | 6734 |
6639 Returning true for higher values of @code{size} may also cause an increase | 6735 Returning true for higher values of @code{size} may also cause an increase |
8022 @subsection Output of Data | 8118 @subsection Output of Data |
8023 | 8119 |
8024 | 8120 |
8025 @deftypevr {Target Hook} {const char *} TARGET_ASM_BYTE_OP | 8121 @deftypevr {Target Hook} {const char *} TARGET_ASM_BYTE_OP |
8026 @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_HI_OP | 8122 @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_HI_OP |
8123 @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_PSI_OP | |
8027 @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_SI_OP | 8124 @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_SI_OP |
8125 @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_PDI_OP | |
8028 @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_DI_OP | 8126 @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_DI_OP |
8127 @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_PTI_OP | |
8029 @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_TI_OP | 8128 @deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_TI_OP |
8030 @deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_HI_OP | 8129 @deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_HI_OP |
8130 @deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_PSI_OP | |
8031 @deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_SI_OP | 8131 @deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_SI_OP |
8132 @deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_PDI_OP | |
8032 @deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_DI_OP | 8133 @deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_DI_OP |
8134 @deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_PTI_OP | |
8033 @deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_TI_OP | 8135 @deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_TI_OP |
8034 These hooks specify assembly directives for creating certain kinds | 8136 These hooks specify assembly directives for creating certain kinds |
8035 of integer object. The @code{TARGET_ASM_BYTE_OP} directive creates a | 8137 of integer object. The @code{TARGET_ASM_BYTE_OP} directive creates a |
8036 byte-sized object, the @code{TARGET_ASM_ALIGNED_HI_OP} one creates an | 8138 byte-sized object, the @code{TARGET_ASM_ALIGNED_HI_OP} one creates an |
8037 aligned two-byte object, and so on. Any of the hooks may be | 8139 aligned two-byte object, and so on. Any of the hooks may be |
9402 | 9504 |
9403 If this macro is not defined, nothing special is output at the end of | 9505 If this macro is not defined, nothing special is output at the end of |
9404 the jump-table. | 9506 the jump-table. |
9405 @end defmac | 9507 @end defmac |
9406 | 9508 |
9509 @deftypefn {Target Hook} void TARGET_ASM_POST_CFI_STARTPROC (FILE *@var{}, @var{tree}) | |
9510 This target hook is used to emit assembly strings required by the target | |
9511 after the .cfi_startproc directive. The first argument is the file stream to | |
9512 write the strings to and the second argument is the function's declaration. The | |
9513 expected use is to add more .cfi_* directives. | |
9514 | |
9515 The default is to not output any assembly strings. | |
9516 @end deftypefn | |
9517 | |
9407 @deftypefn {Target Hook} void TARGET_ASM_EMIT_UNWIND_LABEL (FILE *@var{stream}, tree @var{decl}, int @var{for_eh}, int @var{empty}) | 9518 @deftypefn {Target Hook} void TARGET_ASM_EMIT_UNWIND_LABEL (FILE *@var{stream}, tree @var{decl}, int @var{for_eh}, int @var{empty}) |
9408 This target hook emits a label at the beginning of each FDE@. It | 9519 This target hook emits a label at the beginning of each FDE@. It |
9409 should be defined on targets where FDEs need special labels, and it | 9520 should be defined on targets where FDEs need special labels, and it |
9410 should write the appropriate label, for the FDE associated with the | 9521 should write the appropriate label, for the FDE associated with the |
9411 function declaration @var{decl}, to the stdio stream @var{stream}. | 9522 function declaration @var{decl}, to the stdio stream @var{stream}. |
10064 @var{lab1} minus @var{lab2}, using an integer of the given @var{size}. | 10175 @var{lab1} minus @var{lab2}, using an integer of the given @var{size}. |
10065 @end defmac | 10176 @end defmac |
10066 | 10177 |
10067 @defmac ASM_OUTPUT_DWARF_VMS_DELTA (@var{stream}, @var{size}, @var{label1}, @var{label2}) | 10178 @defmac ASM_OUTPUT_DWARF_VMS_DELTA (@var{stream}, @var{size}, @var{label1}, @var{label2}) |
10068 A C statement to issue assembly directives that create a difference | 10179 A C statement to issue assembly directives that create a difference |
10069 between the two given labels in system defined units, e.g. instruction | 10180 between the two given labels in system defined units, e.g.@: instruction |
10070 slots on IA64 VMS, using an integer of the given size. | 10181 slots on IA64 VMS, using an integer of the given size. |
10071 @end defmac | 10182 @end defmac |
10072 | 10183 |
10073 @defmac ASM_OUTPUT_DWARF_OFFSET (@var{stream}, @var{size}, @var{label}, @var{offset}, @var{section}) | 10184 @defmac ASM_OUTPUT_DWARF_OFFSET (@var{stream}, @var{size}, @var{label}, @var{offset}, @var{section}) |
10074 A C statement to issue assembly directives that create a | 10185 A C statement to issue assembly directives that create a |
10340 the list and @code{*@var{attr_ptr}} modified to point to the new | 10451 the list and @code{*@var{attr_ptr}} modified to point to the new |
10341 attributes, or a copy of the list may be made if further changes are | 10452 attributes, or a copy of the list may be made if further changes are |
10342 needed. | 10453 needed. |
10343 @end deftypefn | 10454 @end deftypefn |
10344 | 10455 |
10456 @deftypefn {Target Hook} tree TARGET_HANDLE_GENERIC_ATTRIBUTE (tree *@var{node}, tree @var{name}, tree @var{args}, int @var{flags}, bool *@var{no_add_attrs}) | |
10457 Define this target hook if you want to be able to perform additional | |
10458 target-specific processing of an attribute which is handled generically | |
10459 by a front end. The arguments are the same as those which are passed to | |
10460 attribute handlers. So far this only affects the @var{noinit} and | |
10461 @var{section} attribute. | |
10462 @end deftypefn | |
10463 | |
10345 @deftypefn {Target Hook} bool TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P (const_tree @var{fndecl}) | 10464 @deftypefn {Target Hook} bool TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P (const_tree @var{fndecl}) |
10346 @cindex inlining | 10465 @cindex inlining |
10347 This target hook returns @code{true} if it is OK to inline @var{fndecl} | 10466 This target hook returns @code{true} if it is OK to inline @var{fndecl} |
10348 into the current function, despite its having target-specific | 10467 into the current function, despite its having target-specific |
10349 attributes, @code{false} otherwise. By default, if a function has a | 10468 attributes, @code{false} otherwise. By default, if a function has a |
10663 @var{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). | 10782 @var{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). |
10664 @end deftypefn | 10783 @end deftypefn |
10665 | 10784 |
10666 @deftypefn {Target Hook} tree TARGET_CXX_DECL_MANGLING_CONTEXT (const_tree @var{decl}) | 10785 @deftypefn {Target Hook} tree TARGET_CXX_DECL_MANGLING_CONTEXT (const_tree @var{decl}) |
10667 Return target-specific mangling context of @var{decl} or @code{NULL_TREE}. | 10786 Return target-specific mangling context of @var{decl} or @code{NULL_TREE}. |
10787 @end deftypefn | |
10788 | |
10789 @node D Language and ABI | |
10790 @section D ABI parameters | |
10791 @cindex parameters, d abi | |
10792 | |
10793 @deftypefn {D Target Hook} void TARGET_D_CPU_VERSIONS (void) | |
10794 Declare all environmental version identifiers relating to the target CPU | |
10795 using the function @code{builtin_version}, which takes a string representing | |
10796 the name of the version. Version identifiers predefined by this hook apply | |
10797 to all modules that are being compiled and imported. | |
10798 @end deftypefn | |
10799 | |
10800 @deftypefn {D Target Hook} void TARGET_D_OS_VERSIONS (void) | |
10801 Similarly to @code{TARGET_D_CPU_VERSIONS}, but is used for versions | |
10802 relating to the target operating system. | |
10803 @end deftypefn | |
10804 | |
10805 @deftypefn {D Target Hook} unsigned TARGET_D_CRITSEC_SIZE (void) | |
10806 Returns the size of the data structure used by the target operating system | |
10807 for critical sections and monitors. For example, on Microsoft Windows this | |
10808 would return the @code{sizeof(CRITICAL_SECTION)}, while other platforms that | |
10809 implement pthreads would return @code{sizeof(pthread_mutex_t)}. | |
10668 @end deftypefn | 10810 @end deftypefn |
10669 | 10811 |
10670 @node Named Address Spaces | 10812 @node Named Address Spaces |
10671 @section Adding support for named address spaces | 10813 @section Adding support for named address spaces |
10672 @cindex named address spaces | 10814 @cindex named address spaces |
11481 complete expression that implements the operation, usually | 11623 complete expression that implements the operation, usually |
11482 another @code{CALL_EXPR}. | 11624 another @code{CALL_EXPR}. |
11483 @var{arglist} really has type @samp{VEC(tree,gc)*} | 11625 @var{arglist} really has type @samp{VEC(tree,gc)*} |
11484 @end deftypefn | 11626 @end deftypefn |
11485 | 11627 |
11628 @deftypefn {Target Hook} bool TARGET_CHECK_BUILTIN_CALL (location_t @var{loc}, vec<location_t> @var{arg_loc}, tree @var{fndecl}, tree @var{orig_fndecl}, unsigned int @var{nargs}, tree *@var{args}) | |
11629 Perform semantic checking on a call to a machine-specific built-in | |
11630 function after its arguments have been constrained to the function | |
11631 signature. Return true if the call is valid, otherwise report an error | |
11632 and return false. | |
11633 | |
11634 This hook is called after @code{TARGET_RESOLVE_OVERLOADED_BUILTIN}. | |
11635 The call was originally to built-in function @var{orig_fndecl}, | |
11636 but after the optional @code{TARGET_RESOLVE_OVERLOADED_BUILTIN} | |
11637 step is now to built-in function @var{fndecl}. @var{loc} is the | |
11638 location of the call and @var{args} is an array of function arguments, | |
11639 of which there are @var{nargs}. @var{arg_loc} specifies the location | |
11640 of each argument. | |
11641 @end deftypefn | |
11642 | |
11486 @deftypefn {Target Hook} tree TARGET_FOLD_BUILTIN (tree @var{fndecl}, int @var{n_args}, tree *@var{argp}, bool @var{ignore}) | 11643 @deftypefn {Target Hook} tree TARGET_FOLD_BUILTIN (tree @var{fndecl}, int @var{n_args}, tree *@var{argp}, bool @var{ignore}) |
11487 Fold a call to a machine specific built-in function that was set up by | 11644 Fold a call to a machine specific built-in function that was set up by |
11488 @samp{TARGET_INIT_BUILTINS}. @var{fndecl} is the declaration of the | 11645 @samp{TARGET_INIT_BUILTINS}. @var{fndecl} is the declaration of the |
11489 built-in function. @var{n_args} is the number of arguments passed to | 11646 built-in function. @var{n_args} is the number of arguments passed to |
11490 the function; the arguments themselves are pointed to by @var{argp}. | 11647 the function; the arguments themselves are pointed to by @var{argp}. |
11520 This hook is used to generate the dispatcher logic to invoke the right | 11677 This hook is used to generate the dispatcher logic to invoke the right |
11521 function version at run-time for a given set of function versions. | 11678 function version at run-time for a given set of function versions. |
11522 @var{arg} points to the callgraph node of the dispatcher function whose | 11679 @var{arg} points to the callgraph node of the dispatcher function whose |
11523 body must be generated. | 11680 body must be generated. |
11524 @end deftypefn | 11681 @end deftypefn |
11682 | |
11683 @deftypefn {Target Hook} bool TARGET_PREDICT_DOLOOP_P (class loop *@var{loop}) | |
11684 Return true if we can predict it is possible to use a low-overhead loop | |
11685 for a particular loop. The parameter @var{loop} is a pointer to the loop. | |
11686 This target hook is required only when the target supports low-overhead | |
11687 loops, and will help ivopts to make some decisions. | |
11688 The default version of this hook returns false. | |
11689 @end deftypefn | |
11690 | |
11691 @deftypevr {Target Hook} bool TARGET_HAVE_COUNT_REG_DECR_P | |
11692 Return true if the target supports hardware count register for decrement | |
11693 and branch. | |
11694 The default value is false. | |
11695 @end deftypevr | |
11696 | |
11697 @deftypevr {Target Hook} int64_t TARGET_DOLOOP_COST_FOR_GENERIC | |
11698 One IV candidate dedicated for doloop is introduced in IVOPTs, we can | |
11699 calculate the computation cost of adopting it to any generic IV use by | |
11700 function get_computation_cost as before. But for targets which have | |
11701 hardware count register support for decrement and branch, it may have to | |
11702 move IV value from hardware count register to general purpose register | |
11703 while doloop IV candidate is used for generic IV uses. It probably takes | |
11704 expensive penalty. This hook allows target owners to define the cost for | |
11705 this especially for generic IV uses. | |
11706 The default value is zero. | |
11707 @end deftypevr | |
11708 | |
11709 @deftypevr {Target Hook} int64_t TARGET_DOLOOP_COST_FOR_ADDRESS | |
11710 One IV candidate dedicated for doloop is introduced in IVOPTs, we can | |
11711 calculate the computation cost of adopting it to any address IV use by | |
11712 function get_computation_cost as before. But for targets which have | |
11713 hardware count register support for decrement and branch, it may have to | |
11714 move IV value from hardware count register to general purpose register | |
11715 while doloop IV candidate is used for address IV uses. It probably takes | |
11716 expensive penalty. This hook allows target owners to define the cost for | |
11717 this escpecially for address IV uses. | |
11718 The default value is zero. | |
11719 @end deftypevr | |
11525 | 11720 |
11526 @deftypefn {Target Hook} bool TARGET_CAN_USE_DOLOOP_P (const widest_int @var{&iterations}, const widest_int @var{&iterations_max}, unsigned int @var{loop_depth}, bool @var{entered_at_top}) | 11721 @deftypefn {Target Hook} bool TARGET_CAN_USE_DOLOOP_P (const widest_int @var{&iterations}, const widest_int @var{&iterations_max}, unsigned int @var{loop_depth}, bool @var{entered_at_top}) |
11527 Return true if it is possible to use low-overhead loops (@code{doloop_end} | 11722 Return true if it is possible to use low-overhead loops (@code{doloop_end} |
11528 and @code{doloop_begin}) for a particular loop. @var{iterations} gives the | 11723 and @code{doloop_begin}) for a particular loop. @var{iterations} gives the |
11529 exact number of iterations, or 0 if not known. @var{iterations_max} gives | 11724 exact number of iterations, or 0 if not known. @var{iterations_max} gives |
11634 Define this macro for systems like AIX, where the linker discards | 11829 Define this macro for systems like AIX, where the linker discards |
11635 object files that are not referenced from @code{main} and uses export | 11830 object files that are not referenced from @code{main} and uses export |
11636 lists. | 11831 lists. |
11637 @end defmac | 11832 @end defmac |
11638 | 11833 |
11639 @defmac MODIFY_JNI_METHOD_CALL (@var{mdecl}) | |
11640 Define this macro to a C expression representing a variant of the | |
11641 method call @var{mdecl}, if Java Native Interface (JNI) methods | |
11642 must be invoked differently from other methods on your target. | |
11643 For example, on 32-bit Microsoft Windows, JNI methods must be invoked using | |
11644 the @code{stdcall} calling convention and this macro is then | |
11645 defined as this expression: | |
11646 | |
11647 @smallexample | |
11648 build_type_attribute_variant (@var{mdecl}, | |
11649 build_tree_list | |
11650 (get_identifier ("stdcall"), | |
11651 NULL)) | |
11652 @end smallexample | |
11653 @end defmac | |
11654 | |
11655 @deftypefn {Target Hook} bool TARGET_CANNOT_MODIFY_JUMPS_P (void) | 11834 @deftypefn {Target Hook} bool TARGET_CANNOT_MODIFY_JUMPS_P (void) |
11656 This target hook returns @code{true} past the point in which new jump | 11835 This target hook returns @code{true} past the point in which new jump |
11657 instructions could be created. On machines that require a register for | 11836 instructions could be created. On machines that require a register for |
11658 every jump such as the SHmedia ISA of SH5, this point would typically be | 11837 every jump such as the SHmedia ISA of SH5, this point would typically be |
11659 reload, so this target hook should be defined to a function such as: | 11838 reload, so this target hook should be defined to a function such as: |
11663 cannot_modify_jumps_past_reload_p () | 11842 cannot_modify_jumps_past_reload_p () |
11664 @{ | 11843 @{ |
11665 return (reload_completed || reload_in_progress); | 11844 return (reload_completed || reload_in_progress); |
11666 @} | 11845 @} |
11667 @end smallexample | 11846 @end smallexample |
11668 @end deftypefn | |
11669 | |
11670 @deftypefn {Target Hook} reg_class_t TARGET_BRANCH_TARGET_REGISTER_CLASS (void) | |
11671 This target hook returns a register class for which branch target register | |
11672 optimizations should be applied. All registers in this class should be | |
11673 usable interchangeably. After reload, registers in this class will be | |
11674 re-allocated and loads will be hoisted out of loops and be subjected | |
11675 to inter-block scheduling. | |
11676 @end deftypefn | |
11677 | |
11678 @deftypefn {Target Hook} bool TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED (bool @var{after_prologue_epilogue_gen}) | |
11679 Branch target register optimization will by default exclude callee-saved | |
11680 registers | |
11681 that are not already live during the current function; if this target hook | |
11682 returns true, they will be included. The target code must than make sure | |
11683 that all target registers in the class returned by | |
11684 @samp{TARGET_BRANCH_TARGET_REGISTER_CLASS} that might need saving are | |
11685 saved. @var{after_prologue_epilogue_gen} indicates if prologues and | |
11686 epilogues have already been generated. Note, even if you only return | |
11687 true when @var{after_prologue_epilogue_gen} is false, you still are likely | |
11688 to have to make special provisions in @code{INITIAL_ELIMINATION_OFFSET} | |
11689 to reserve space for caller-saved target registers. | |
11690 @end deftypefn | 11847 @end deftypefn |
11691 | 11848 |
11692 @deftypefn {Target Hook} bool TARGET_HAVE_CONDITIONAL_EXECUTION (void) | 11849 @deftypefn {Target Hook} bool TARGET_HAVE_CONDITIONAL_EXECUTION (void) |
11693 This target hook returns true if the target supports conditional execution. | 11850 This target hook returns true if the target supports conditional execution. |
11694 This target hook is required only when the target has several different | 11851 This target hook is required only when the target has several different |
11718 be appropriate for passing to @code{gen_ccmp_next} or @code{cbranch_optab}. | 11875 be appropriate for passing to @code{gen_ccmp_next} or @code{cbranch_optab}. |
11719 @var{code} is the @code{rtx_code} of the compare for @var{op0} and @var{op1}. | 11876 @var{code} is the @code{rtx_code} of the compare for @var{op0} and @var{op1}. |
11720 @var{bit_code} is @code{AND} or @code{IOR}, which is the op on the compares. | 11877 @var{bit_code} is @code{AND} or @code{IOR}, which is the op on the compares. |
11721 @end deftypefn | 11878 @end deftypefn |
11722 | 11879 |
11723 @deftypefn {Target Hook} unsigned TARGET_LOOP_UNROLL_ADJUST (unsigned @var{nunroll}, struct loop *@var{loop}) | 11880 @deftypefn {Target Hook} unsigned TARGET_LOOP_UNROLL_ADJUST (unsigned @var{nunroll}, class loop *@var{loop}) |
11724 This target hook returns a new value for the number of times @var{loop} | 11881 This target hook returns a new value for the number of times @var{loop} |
11725 should be unrolled. The parameter @var{nunroll} is the number of times | 11882 should be unrolled. The parameter @var{nunroll} is the number of times |
11726 the loop is to be unrolled. The parameter @var{loop} is a pointer to | 11883 the loop is to be unrolled. The parameter @var{loop} is a pointer to |
11727 the loop, which is going to be checked for unrolling. This target hook | 11884 the loop, which is going to be checked for unrolling. This target hook |
11728 is required only when the target has special constraints like maximum | 11885 is required only when the target has special constraints like maximum |
11838 @var{type}. It should return the converted expression, | 11995 @var{type}. It should return the converted expression, |
11839 or @code{NULL_TREE} to apply the front end's normal conversion rules. | 11996 or @code{NULL_TREE} to apply the front end's normal conversion rules. |
11840 This hook is useful when there are target-specific types with special | 11997 This hook is useful when there are target-specific types with special |
11841 conversion rules. | 11998 conversion rules. |
11842 This is currently used only by the C and C++ front ends. | 11999 This is currently used only by the C and C++ front ends. |
12000 @end deftypefn | |
12001 | |
12002 @deftypefn {Target Hook} bool TARGET_VERIFY_TYPE_CONTEXT (location_t @var{loc}, type_context_kind @var{context}, const_tree @var{type}, bool @var{silent_p}) | |
12003 If defined, this hook returns false if there is a target-specific reason | |
12004 why type @var{type} cannot be used in the source language context described | |
12005 by @var{context}. When @var{silent_p} is false, the hook also reports an | |
12006 error against @var{loc} for invalid uses of @var{type}. | |
12007 | |
12008 Calls to this hook should be made through the global function | |
12009 @code{verify_type_context}, which makes the @var{silent_p} parameter | |
12010 default to false and also handles @code{error_mark_node}. | |
12011 | |
12012 The default implementation always returns true. | |
11843 @end deftypefn | 12013 @end deftypefn |
11844 | 12014 |
11845 @defmac OBJC_JBLEN | 12015 @defmac OBJC_JBLEN |
11846 This macro determines the size of the objective C jump buffer for the | 12016 This macro determines the size of the objective C jump buffer for the |
11847 NeXT runtime. By default, OBJC_JBLEN is defined to an innocuous value. | 12017 NeXT runtime. By default, OBJC_JBLEN is defined to an innocuous value. |
11905 Validate target specific memory model mask bits. When NULL no target specific | 12075 Validate target specific memory model mask bits. When NULL no target specific |
11906 memory model bits are allowed. | 12076 memory model bits are allowed. |
11907 @end deftypefn | 12077 @end deftypefn |
11908 | 12078 |
11909 @deftypevr {Target Hook} {unsigned char} TARGET_ATOMIC_TEST_AND_SET_TRUEVAL | 12079 @deftypevr {Target Hook} {unsigned char} TARGET_ATOMIC_TEST_AND_SET_TRUEVAL |
11910 This value should be set if the result written by @code{atomic_test_and_set} is not exactly 1, i.e. the @code{bool} @code{true}. | 12080 This value should be set if the result written by @code{atomic_test_and_set} is not exactly 1, i.e.@: the @code{bool} @code{true}. |
11911 @end deftypevr | 12081 @end deftypevr |
11912 | 12082 |
11913 @deftypefn {Target Hook} bool TARGET_HAS_IFUNC_P (void) | 12083 @deftypefn {Target Hook} bool TARGET_HAS_IFUNC_P (void) |
11914 It returns true if the target supports GNU indirect functions. | 12084 It returns true if the target supports GNU indirect functions. |
11915 The support includes the assembler, linker and dynamic linker. | 12085 The support includes the assembler, linker and dynamic linker. |