comparison gcc/doc/tm.texi.in @ 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
725 @code{optimize} attribute. 734 @code{optimize} attribute.
726 @end deftypevr 735 @end deftypevr
727 736
728 @hook TARGET_OPTION_INIT_STRUCT 737 @hook TARGET_OPTION_INIT_STRUCT
729 738
730 @hook TARGET_OPTION_DEFAULT_PARAMS
731
732 @hook TARGET_OPTION_VALIDATE_PARAM
733
734 @defmac SWITCHABLE_TARGET 739 @defmac SWITCHABLE_TARGET
735 Some targets need to switch between substantially different subtargets 740 Some targets need to switch between substantially different subtargets
736 during compilation. For example, the MIPS target has one subtarget for 741 during compilation. For example, the MIPS target has one subtarget for
737 the traditional MIPS architecture and another for MIPS16. Source code 742 the traditional MIPS architecture and another for MIPS16. Source code
738 can switch between these two subarchitectures using the @code{mips16} 743 can switch between these two subarchitectures using the @code{mips16}
1016 @end defmac 1021 @end defmac
1017 1022
1018 @defmac MAX_OFILE_ALIGNMENT 1023 @defmac MAX_OFILE_ALIGNMENT
1019 Biggest alignment supported by the object file format of this machine. 1024 Biggest alignment supported by the object file format of this machine.
1020 Use this macro to limit the alignment which can be specified using the 1025 Use this macro to limit the alignment which can be specified using the
1021 @code{__attribute__ ((aligned (@var{n})))} construct. If not defined, 1026 @code{__attribute__ ((aligned (@var{n})))} construct for functions and
1022 the default value is @code{BIGGEST_ALIGNMENT}. 1027 objects with static storage duration. The alignment of automatic
1028 objects may exceed the object file format maximum up to the maximum
1029 supported by GCC. If not defined, the default value is
1030 @code{BIGGEST_ALIGNMENT}.
1023 1031
1024 On systems that use ELF, the default (in @file{config/elfos.h}) is 1032 On systems that use ELF, the default (in @file{config/elfos.h}) is
1025 the largest supported 32-bit ELF section alignment representable on 1033 the largest supported 32-bit ELF section alignment representable on
1026 a 32-bit host e.g. @samp{(((uint64_t) 1 << 28) * 8)}. 1034 a 32-bit host e.g.@: @samp{(((uint64_t) 1 << 28) * 8)}.
1027 On 32-bit ELF the largest supported section alignment in bits is 1035 On 32-bit ELF the largest supported section alignment in bits is
1028 @samp{(0x80000000 * 8)}, but this is not representable on 32-bit hosts. 1036 @samp{(0x80000000 * 8)}, but this is not representable on 32-bit hosts.
1029 @end defmac 1037 @end defmac
1030 1038
1031 @hook TARGET_STATIC_RTX_ALIGNMENT 1039 @hook TARGET_STATIC_RTX_ALIGNMENT
1675 function calls. 1683 function calls.
1676 1684
1677 If a register has 0 in @code{CALL_USED_REGISTERS}, the compiler 1685 If a register has 0 in @code{CALL_USED_REGISTERS}, the compiler
1678 automatically saves it on function entry and restores it on function 1686 automatically saves it on function entry and restores it on function
1679 exit, if the register is used within the function. 1687 exit, if the register is used within the function.
1688
1689 Exactly one of @code{CALL_USED_REGISTERS} and @code{CALL_REALLY_USED_REGISTERS}
1690 must be defined. Modern ports should define @code{CALL_REALLY_USED_REGISTERS}.
1680 @end defmac 1691 @end defmac
1681 1692
1682 @defmac CALL_REALLY_USED_REGISTERS 1693 @defmac CALL_REALLY_USED_REGISTERS
1683 @cindex call-used register 1694 @cindex call-used register
1684 @cindex call-clobbered register 1695 @cindex call-clobbered register
1685 @cindex call-saved register 1696 @cindex call-saved register
1686 Like @code{CALL_USED_REGISTERS} except this macro doesn't require 1697 Like @code{CALL_USED_REGISTERS} except this macro doesn't require
1687 that the entire set of @code{FIXED_REGISTERS} be included. 1698 that the entire set of @code{FIXED_REGISTERS} be included.
1688 (@code{CALL_USED_REGISTERS} must be a superset of @code{FIXED_REGISTERS}). 1699 (@code{CALL_USED_REGISTERS} must be a superset of @code{FIXED_REGISTERS}).
1689 This macro is optional. If not specified, it defaults to the value 1700
1690 of @code{CALL_USED_REGISTERS}. 1701 Exactly one of @code{CALL_USED_REGISTERS} and @code{CALL_REALLY_USED_REGISTERS}
1691 @end defmac 1702 must be defined. Modern ports should define @code{CALL_REALLY_USED_REGISTERS}.
1703 @end defmac
1704
1705 @cindex call-used register
1706 @cindex call-clobbered register
1707 @cindex call-saved register
1708 @hook TARGET_FNTYPE_ABI
1709
1710 @hook TARGET_INSN_CALLEE_ABI
1692 1711
1693 @cindex call-used register 1712 @cindex call-used register
1694 @cindex call-clobbered register 1713 @cindex call-clobbered register
1695 @cindex call-saved register 1714 @cindex call-saved register
1696 @hook TARGET_HARD_REGNO_CALL_PART_CLOBBERED 1715 @hook TARGET_HARD_REGNO_CALL_PART_CLOBBERED
1716
1717 @hook TARGET_GET_MULTILIB_ABI_NAME
1697 1718
1698 @findex fixed_regs 1719 @findex fixed_regs
1699 @findex call_used_regs 1720 @findex call_used_regs
1700 @findex global_regs 1721 @findex global_regs
1701 @findex reg_names 1722 @findex reg_names
3342 3363
3343 @hook TARGET_SCALAR_MODE_SUPPORTED_P 3364 @hook TARGET_SCALAR_MODE_SUPPORTED_P
3344 3365
3345 @hook TARGET_VECTOR_MODE_SUPPORTED_P 3366 @hook TARGET_VECTOR_MODE_SUPPORTED_P
3346 3367
3368 @hook TARGET_COMPATIBLE_VECTOR_TYPES_P
3369
3347 @hook TARGET_ARRAY_MODE 3370 @hook TARGET_ARRAY_MODE
3348 3371
3349 @hook TARGET_ARRAY_MODE_SUPPORTED_P 3372 @hook TARGET_ARRAY_MODE_SUPPORTED_P
3350 3373
3351 @hook TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P 3374 @hook TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P
3765 3788
3766 @hook TARGET_LOAD_RETURNED_BOUNDS 3789 @hook TARGET_LOAD_RETURNED_BOUNDS
3767 3790
3768 @hook TARGET_STORE_RETURNED_BOUNDS 3791 @hook TARGET_STORE_RETURNED_BOUNDS
3769 3792
3770 @hook TARGET_SETUP_INCOMING_VARARG_BOUNDS
3771
3772 @node Trampolines 3793 @node Trampolines
3773 @section Support for Nested Functions 3794 @section Support for Nested Functions
3774 @cindex support for nested functions 3795 @cindex support for nested functions
3775 @cindex trampolines for nested functions 3796 @cindex trampolines for nested functions
3776 @cindex descriptors for nested functions 3797 @cindex descriptors for nested functions
3971 macro, a reasonable default is used. 3992 macro, a reasonable default is used.
3972 @end defmac 3993 @end defmac
3973 3994
3974 @hook TARGET_LIBC_HAS_FUNCTION 3995 @hook TARGET_LIBC_HAS_FUNCTION
3975 3996
3997 @hook TARGET_LIBC_HAS_FAST_FUNCTION
3998
3976 @defmac NEXT_OBJC_RUNTIME 3999 @defmac NEXT_OBJC_RUNTIME
3977 Set this macro to 1 to use the "NeXT" Objective-C message sending conventions 4000 Set this macro to 1 to use the "NeXT" Objective-C message sending conventions
3978 by default. This calling convention involves passing the object, the selector 4001 by default. This calling convention involves passing the object, the selector
3979 and the method arguments all at once to the method-lookup library function. 4002 and the method arguments all at once to the method-lookup library function.
3980 This is the usual setting when targeting Darwin/Mac OS X systems, which have 4003 This is the usual setting when targeting Darwin/Mac OS X systems, which have
4140 4163
4141 @hook TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE 4164 @hook TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE
4142 4165
4143 @hook TARGET_VECTORIZE_VEC_PERM_CONST 4166 @hook TARGET_VECTORIZE_VEC_PERM_CONST
4144 4167
4145 @hook TARGET_VECTORIZE_BUILTIN_CONVERSION
4146
4147 @hook TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION 4168 @hook TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION
4148 4169
4149 @hook TARGET_VECTORIZE_BUILTIN_MD_VECTORIZED_FUNCTION 4170 @hook TARGET_VECTORIZE_BUILTIN_MD_VECTORIZED_FUNCTION
4150 4171
4151 @hook TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT 4172 @hook TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT
4152 4173
4153 @hook TARGET_VECTORIZE_PREFERRED_SIMD_MODE 4174 @hook TARGET_VECTORIZE_PREFERRED_SIMD_MODE
4154 4175
4155 @hook TARGET_VECTORIZE_SPLIT_REDUCTION 4176 @hook TARGET_VECTORIZE_SPLIT_REDUCTION
4156 4177
4157 @hook TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_SIZES 4178 @hook TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_MODES
4179
4180 @hook TARGET_VECTORIZE_RELATED_MODE
4158 4181
4159 @hook TARGET_VECTORIZE_GET_MASK_MODE 4182 @hook TARGET_VECTORIZE_GET_MASK_MODE
4160 4183
4161 @hook TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE 4184 @hook TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE
4162 4185
4177 @hook TARGET_SIMD_CLONE_ADJUST 4200 @hook TARGET_SIMD_CLONE_ADJUST
4178 4201
4179 @hook TARGET_SIMD_CLONE_USABLE 4202 @hook TARGET_SIMD_CLONE_USABLE
4180 4203
4181 @hook TARGET_SIMT_VF 4204 @hook TARGET_SIMT_VF
4205
4206 @hook TARGET_OMP_DEVICE_KIND_ARCH_ISA
4182 4207
4183 @hook TARGET_GOACC_VALIDATE_DIMS 4208 @hook TARGET_GOACC_VALIDATE_DIMS
4184 4209
4185 @hook TARGET_GOACC_DIM_LIMIT 4210 @hook TARGET_GOACC_DIM_LIMIT
4186 4211
4359 when the condition code is set this way some bits (such as the overflow 4384 when the condition code is set this way some bits (such as the overflow
4360 bit) are not set in the same way as a test instruction, so that a different 4385 bit) are not set in the same way as a test instruction, so that a different
4361 branch instruction must be used for some conditional branches. When 4386 branch instruction must be used for some conditional branches. When
4362 this happens, use the machine mode of the condition code register to 4387 this happens, use the machine mode of the condition code register to
4363 record different formats of the condition code register. Modes can 4388 record different formats of the condition code register. Modes can
4364 also be used to record which compare instruction (e.g. a signed or an 4389 also be used to record which compare instruction (e.g.@: a signed or an
4365 unsigned comparison) produced the condition codes. 4390 unsigned comparison) produced the condition codes.
4366 4391
4367 If other modes than @code{CCmode} are required, add them to 4392 If other modes than @code{CCmode} are required, add them to
4368 @file{@var{machine}-modes.def} and define @code{SELECT_CC_MODE} to choose 4393 @file{@var{machine}-modes.def} and define @code{SELECT_CC_MODE} to choose
4369 a mode given an operand of a compare. This is needed because the modes 4394 a mode given an operand of a compare. This is needed because the modes
6415 6440
6416 If this macro is not defined, nothing special is output at the end of 6441 If this macro is not defined, nothing special is output at the end of
6417 the jump-table. 6442 the jump-table.
6418 @end defmac 6443 @end defmac
6419 6444
6445 @hook TARGET_ASM_POST_CFI_STARTPROC
6446
6420 @hook TARGET_ASM_EMIT_UNWIND_LABEL 6447 @hook TARGET_ASM_EMIT_UNWIND_LABEL
6421 6448
6422 @hook TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL 6449 @hook TARGET_ASM_EMIT_EXCEPT_TABLE_LABEL
6423 6450
6424 @hook TARGET_ASM_EMIT_EXCEPT_PERSONALITY 6451 @hook TARGET_ASM_EMIT_EXCEPT_PERSONALITY
6978 @var{lab1} minus @var{lab2}, using an integer of the given @var{size}. 7005 @var{lab1} minus @var{lab2}, using an integer of the given @var{size}.
6979 @end defmac 7006 @end defmac
6980 7007
6981 @defmac ASM_OUTPUT_DWARF_VMS_DELTA (@var{stream}, @var{size}, @var{label1}, @var{label2}) 7008 @defmac ASM_OUTPUT_DWARF_VMS_DELTA (@var{stream}, @var{size}, @var{label1}, @var{label2})
6982 A C statement to issue assembly directives that create a difference 7009 A C statement to issue assembly directives that create a difference
6983 between the two given labels in system defined units, e.g. instruction 7010 between the two given labels in system defined units, e.g.@: instruction
6984 slots on IA64 VMS, using an integer of the given size. 7011 slots on IA64 VMS, using an integer of the given size.
6985 @end defmac 7012 @end defmac
6986 7013
6987 @defmac ASM_OUTPUT_DWARF_OFFSET (@var{stream}, @var{size}, @var{label}, @var{offset}, @var{section}) 7014 @defmac ASM_OUTPUT_DWARF_OFFSET (@var{stream}, @var{size}, @var{label}, @var{offset}, @var{section})
6988 A C statement to issue assembly directives that create a 7015 A C statement to issue assembly directives that create a
7178 on this implementation detail. 7205 on this implementation detail.
7179 @end defmac 7206 @end defmac
7180 7207
7181 @hook TARGET_INSERT_ATTRIBUTES 7208 @hook TARGET_INSERT_ATTRIBUTES
7182 7209
7210 @hook TARGET_HANDLE_GENERIC_ATTRIBUTE
7211
7183 @hook TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P 7212 @hook TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P
7184 7213
7185 @hook TARGET_OPTION_VALID_ATTRIBUTE_P 7214 @hook TARGET_OPTION_VALID_ATTRIBUTE_P
7186 7215
7187 @hook TARGET_OPTION_SAVE 7216 @hook TARGET_OPTION_SAVE
7307 @hook TARGET_CXX_USE_ATEXIT_FOR_CXA_ATEXIT 7336 @hook TARGET_CXX_USE_ATEXIT_FOR_CXA_ATEXIT
7308 7337
7309 @hook TARGET_CXX_ADJUST_CLASS_AT_DEFINITION 7338 @hook TARGET_CXX_ADJUST_CLASS_AT_DEFINITION
7310 7339
7311 @hook TARGET_CXX_DECL_MANGLING_CONTEXT 7340 @hook TARGET_CXX_DECL_MANGLING_CONTEXT
7341
7342 @node D Language and ABI
7343 @section D ABI parameters
7344 @cindex parameters, d abi
7345
7346 @hook TARGET_D_CPU_VERSIONS
7347
7348 @hook TARGET_D_OS_VERSIONS
7349
7350 @hook TARGET_D_CRITSEC_SIZE
7312 7351
7313 @node Named Address Spaces 7352 @node Named Address Spaces
7314 @section Adding support for named address spaces 7353 @section Adding support for named address spaces
7315 @cindex named address spaces 7354 @cindex named address spaces
7316 7355
7900 7939
7901 @hook TARGET_EXPAND_BUILTIN 7940 @hook TARGET_EXPAND_BUILTIN
7902 7941
7903 @hook TARGET_RESOLVE_OVERLOADED_BUILTIN 7942 @hook TARGET_RESOLVE_OVERLOADED_BUILTIN
7904 7943
7944 @hook TARGET_CHECK_BUILTIN_CALL
7945
7905 @hook TARGET_FOLD_BUILTIN 7946 @hook TARGET_FOLD_BUILTIN
7906 7947
7907 @hook TARGET_GIMPLE_FOLD_BUILTIN 7948 @hook TARGET_GIMPLE_FOLD_BUILTIN
7908 7949
7909 @hook TARGET_COMPARE_VERSION_PRIORITY 7950 @hook TARGET_COMPARE_VERSION_PRIORITY
7910 7951
7911 @hook TARGET_GET_FUNCTION_VERSIONS_DISPATCHER 7952 @hook TARGET_GET_FUNCTION_VERSIONS_DISPATCHER
7912 7953
7913 @hook TARGET_GENERATE_VERSION_DISPATCHER_BODY 7954 @hook TARGET_GENERATE_VERSION_DISPATCHER_BODY
7955
7956 @hook TARGET_PREDICT_DOLOOP_P
7957
7958 @hook TARGET_HAVE_COUNT_REG_DECR_P
7959
7960 @hook TARGET_DOLOOP_COST_FOR_GENERIC
7961
7962 @hook TARGET_DOLOOP_COST_FOR_ADDRESS
7914 7963
7915 @hook TARGET_CAN_USE_DOLOOP_P 7964 @hook TARGET_CAN_USE_DOLOOP_P
7916 7965
7917 @hook TARGET_INVALID_WITHIN_DOLOOP 7966 @hook TARGET_INVALID_WITHIN_DOLOOP
7918 7967
7947 Define this macro for systems like AIX, where the linker discards 7996 Define this macro for systems like AIX, where the linker discards
7948 object files that are not referenced from @code{main} and uses export 7997 object files that are not referenced from @code{main} and uses export
7949 lists. 7998 lists.
7950 @end defmac 7999 @end defmac
7951 8000
7952 @defmac MODIFY_JNI_METHOD_CALL (@var{mdecl})
7953 Define this macro to a C expression representing a variant of the
7954 method call @var{mdecl}, if Java Native Interface (JNI) methods
7955 must be invoked differently from other methods on your target.
7956 For example, on 32-bit Microsoft Windows, JNI methods must be invoked using
7957 the @code{stdcall} calling convention and this macro is then
7958 defined as this expression:
7959
7960 @smallexample
7961 build_type_attribute_variant (@var{mdecl},
7962 build_tree_list
7963 (get_identifier ("stdcall"),
7964 NULL))
7965 @end smallexample
7966 @end defmac
7967
7968 @hook TARGET_CANNOT_MODIFY_JUMPS_P 8001 @hook TARGET_CANNOT_MODIFY_JUMPS_P
7969
7970 @hook TARGET_BRANCH_TARGET_REGISTER_CLASS
7971
7972 @hook TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED
7973 8002
7974 @hook TARGET_HAVE_CONDITIONAL_EXECUTION 8003 @hook TARGET_HAVE_CONDITIONAL_EXECUTION
7975 8004
7976 @hook TARGET_GEN_CCMP_FIRST 8005 @hook TARGET_GEN_CCMP_FIRST
7977 8006
8058 8087
8059 @hook TARGET_PROMOTED_TYPE 8088 @hook TARGET_PROMOTED_TYPE
8060 8089
8061 @hook TARGET_CONVERT_TO_TYPE 8090 @hook TARGET_CONVERT_TO_TYPE
8062 8091
8092 @hook TARGET_VERIFY_TYPE_CONTEXT
8093
8063 @defmac OBJC_JBLEN 8094 @defmac OBJC_JBLEN
8064 This macro determines the size of the objective C jump buffer for the 8095 This macro determines the size of the objective C jump buffer for the
8065 NeXT runtime. By default, OBJC_JBLEN is defined to an innocuous value. 8096 NeXT runtime. By default, OBJC_JBLEN is defined to an innocuous value.
8066 @end defmac 8097 @end defmac
8067 8098