gccint: Misc
1
1 18.30 Miscellaneous Parameters
1 ==============================
1
1 Here are several miscellaneous parameters.
1
1 -- Macro: HAS_LONG_COND_BRANCH
1 Define this boolean macro to indicate whether or not your
1 architecture has conditional branches that can span all of memory.
1 It is used in conjunction with an optimization that partitions hot
1 and cold basic blocks into separate sections of the executable. If
1 this macro is set to false, gcc will convert any conditional
1 branches that attempt to cross between sections into unconditional
1 branches or indirect jumps.
1
1 -- Macro: HAS_LONG_UNCOND_BRANCH
1 Define this boolean macro to indicate whether or not your
1 architecture has unconditional branches that can span all of
1 memory. It is used in conjunction with an optimization that
1 partitions hot and cold basic blocks into separate sections of the
1 executable. If this macro is set to false, gcc will convert any
1 unconditional branches that attempt to cross between sections into
1 indirect jumps.
1
1 -- Macro: CASE_VECTOR_MODE
1 An alias for a machine mode name. This is the machine mode that
1 elements of a jump-table should have.
1
1 -- Macro: CASE_VECTOR_SHORTEN_MODE (MIN_OFFSET, MAX_OFFSET, BODY)
1 Optional: return the preferred mode for an 'addr_diff_vec' when the
1 minimum and maximum offset are known. If you define this, it
1 enables extra code in branch shortening to deal with
1 'addr_diff_vec'. To make this work, you also have to define
1 'INSN_ALIGN' and make the alignment for 'addr_diff_vec' explicit.
1 The BODY argument is provided so that the offset_unsigned and scale
1 flags can be updated.
1
1 -- Macro: CASE_VECTOR_PC_RELATIVE
1 Define this macro to be a C expression to indicate when jump-tables
1 should contain relative addresses. You need not define this macro
1 if jump-tables never contain relative addresses, or jump-tables
1 should contain relative addresses only when '-fPIC' or '-fPIC' is
1 in effect.
1
1 -- Target Hook: unsigned int TARGET_CASE_VALUES_THRESHOLD (void)
1 This function return the smallest number of different values for
1 which it is best to use a jump-table instead of a tree of
1 conditional branches. The default is four for machines with a
1 'casesi' instruction and five otherwise. This is best for most
1 machines.
1
1 -- Macro: WORD_REGISTER_OPERATIONS
1 Define this macro to 1 if operations between registers with
1 integral mode smaller than a word are always performed on the
1 entire register. To be more explicit, if you start with a pair of
1 'word_mode' registers with known values and you do a subword, for
1 example 'QImode', addition on the low part of the registers, then
1 the compiler may consider that the result has a known value in
1 'word_mode' too if the macro is defined to 1. Most RISC machines
1 have this property and most CISC machines do not.
1
1 -- Target Hook: unsigned int TARGET_MIN_ARITHMETIC_PRECISION (void)
1 On some RISC architectures with 64-bit registers, the processor
1 also maintains 32-bit condition codes that make it possible to do
1 real 32-bit arithmetic, although the operations are performed on
1 the full registers.
1
1 On such architectures, defining this hook to 32 tells the compiler
1 to try using 32-bit arithmetical operations setting the condition
1 codes instead of doing full 64-bit arithmetic.
1
1 More generally, define this hook on RISC architectures if you want
1 the compiler to try using arithmetical operations setting the
1 condition codes with a precision lower than the word precision.
1
1 You need not define this hook if 'WORD_REGISTER_OPERATIONS' is not
1 defined to 1.
1
1 -- Macro: LOAD_EXTEND_OP (MEM_MODE)
1 Define this macro to be a C expression indicating when insns that
1 read memory in MEM_MODE, an integral mode narrower than a word, set
1 the bits outside of MEM_MODE to be either the sign-extension or the
1 zero-extension of the data read. Return 'SIGN_EXTEND' for values
1 of MEM_MODE for which the insn sign-extends, 'ZERO_EXTEND' for
1 which it zero-extends, and 'UNKNOWN' for other modes.
1
1 This macro is not called with MEM_MODE non-integral or with a width
1 greater than or equal to 'BITS_PER_WORD', so you may return any
1 value in this case. Do not define this macro if it would always
1 return 'UNKNOWN'. On machines where this macro is defined, you
1 will normally define it as the constant 'SIGN_EXTEND' or
1 'ZERO_EXTEND'.
1
1 You may return a non-'UNKNOWN' value even if for some hard
1 registers the sign extension is not performed, if for the
1 'REGNO_REG_CLASS' of these hard registers
1 'TARGET_CAN_CHANGE_MODE_CLASS' returns false when the FROM mode is
1 MEM_MODE and the TO mode is any integral mode larger than this but
1 not larger than 'word_mode'.
1
1 You must return 'UNKNOWN' if for some hard registers that allow
1 this mode, 'TARGET_CAN_CHANGE_MODE_CLASS' says that they cannot
1 change to 'word_mode', but that they can change to another integral
1 mode that is larger then MEM_MODE but still smaller than
1 'word_mode'.
1
1 -- Macro: SHORT_IMMEDIATES_SIGN_EXTEND
1 Define this macro to 1 if loading short immediate values into
1 registers sign extends.
1
1 -- Target Hook: unsigned int TARGET_MIN_DIVISIONS_FOR_RECIP_MUL
1 (machine_mode MODE)
1 When '-ffast-math' is in effect, GCC tries to optimize divisions by
1 the same divisor, by turning them into multiplications by the
1 reciprocal. This target hook specifies the minimum number of
1 divisions that should be there for GCC to perform the optimization
1 for a variable of mode MODE. The default implementation returns 3
1 if the machine has an instruction for the division, and 2 if it
1 does not.
1
1 -- Macro: MOVE_MAX
1 The maximum number of bytes that a single instruction can move
1 quickly between memory and registers or between two memory
1 locations.
1
1 -- Macro: MAX_MOVE_MAX
1 The maximum number of bytes that a single instruction can move
1 quickly between memory and registers or between two memory
1 locations. If this is undefined, the default is 'MOVE_MAX'.
1 Otherwise, it is the constant value that is the largest value that
1 'MOVE_MAX' can have at run-time.
1
1 -- Macro: SHIFT_COUNT_TRUNCATED
1 A C expression that is nonzero if on this machine the number of
1 bits actually used for the count of a shift operation is equal to
1 the number of bits needed to represent the size of the object being
1 shifted. When this macro is nonzero, the compiler will assume that
1 it is safe to omit a sign-extend, zero-extend, and certain bitwise
1 'and' instructions that truncates the count of a shift operation.
1 On machines that have instructions that act on bit-fields at
1 variable positions, which may include 'bit test' instructions, a
1 nonzero 'SHIFT_COUNT_TRUNCATED' also enables deletion of
1 truncations of the values that serve as arguments to bit-field
1 instructions.
1
1 If both types of instructions truncate the count (for shifts) and
1 position (for bit-field operations), or if no variable-position
1 bit-field instructions exist, you should define this macro.
1
1 However, on some machines, such as the 80386 and the 680x0,
1 truncation only applies to shift operations and not the (real or
1 pretended) bit-field operations. Define 'SHIFT_COUNT_TRUNCATED' to
1 be zero on such machines. Instead, add patterns to the 'md' file
1 that include the implied truncation of the shift instructions.
1
1 You need not define this macro if it would always have the value of
1 zero.
1
1 -- Target Hook: unsigned HOST_WIDE_INT TARGET_SHIFT_TRUNCATION_MASK
1 (machine_mode MODE)
1 This function describes how the standard shift patterns for MODE
1 deal with shifts by negative amounts or by more than the width of
1 the mode. ⇒shift patterns.
1
1 On many machines, the shift patterns will apply a mask M to the
1 shift count, meaning that a fixed-width shift of X by Y is
1 equivalent to an arbitrary-width shift of X by Y & M. If this is
1 true for mode MODE, the function should return M, otherwise it
1 should return 0. A return value of 0 indicates that no particular
1 behavior is guaranteed.
1
1 Note that, unlike 'SHIFT_COUNT_TRUNCATED', this function does _not_
1 apply to general shift rtxes; it applies only to instructions that
1 are generated by the named shift patterns.
1
1 The default implementation of this function returns
1 'GET_MODE_BITSIZE (MODE) - 1' if 'SHIFT_COUNT_TRUNCATED' and 0
1 otherwise. This definition is always safe, but if
1 'SHIFT_COUNT_TRUNCATED' is false, and some shift patterns
1 nevertheless truncate the shift count, you may get better code by
1 overriding it.
1
1 -- Target Hook: bool TARGET_TRULY_NOOP_TRUNCATION (poly_uint64 OUTPREC,
1 poly_uint64 INPREC)
1 This hook returns true if it is safe to "convert" a value of INPREC
1 bits to one of OUTPREC bits (where OUTPREC is smaller than INPREC)
1 by merely operating on it as if it had only OUTPREC bits. The
1 default returns true unconditionally, which is correct for most
1 machines.
1
1 If 'TARGET_MODES_TIEABLE_P' returns false for a pair of modes,
1 suboptimal code can result if this hook returns true for the
1 corresponding mode sizes. Making this hook return false in such
1 cases may improve things.
1
1 -- Target Hook: int TARGET_MODE_REP_EXTENDED (scalar_int_mode MODE,
1 scalar_int_mode REP_MODE)
1 The representation of an integral mode can be such that the values
1 are always extended to a wider integral mode. Return 'SIGN_EXTEND'
1 if values of MODE are represented in sign-extended form to
1 REP_MODE. Return 'UNKNOWN' otherwise. (Currently, none of the
1 targets use zero-extended representation this way so unlike
1 'LOAD_EXTEND_OP', 'TARGET_MODE_REP_EXTENDED' is expected to return
1 either 'SIGN_EXTEND' or 'UNKNOWN'. Also no target extends MODE to
1 REP_MODE so that REP_MODE is not the next widest integral mode and
1 currently we take advantage of this fact.)
1
1 Similarly to 'LOAD_EXTEND_OP' you may return a non-'UNKNOWN' value
1 even if the extension is not performed on certain hard registers as
1 long as for the 'REGNO_REG_CLASS' of these hard registers
1 'TARGET_CAN_CHANGE_MODE_CLASS' returns false.
1
1 Note that 'TARGET_MODE_REP_EXTENDED' and 'LOAD_EXTEND_OP' describe
1 two related properties. If you define 'TARGET_MODE_REP_EXTENDED
1 (mode, word_mode)' you probably also want to define 'LOAD_EXTEND_OP
1 (mode)' to return the same type of extension.
1
1 In order to enforce the representation of 'mode',
1 'TARGET_TRULY_NOOP_TRUNCATION' should return false when truncating
1 to 'mode'.
1
1 -- Macro: STORE_FLAG_VALUE
1 A C expression describing the value returned by a comparison
1 operator with an integral mode and stored by a store-flag
1 instruction ('cstoreMODE4') when the condition is true. This
1 description must apply to _all_ the 'cstoreMODE4' patterns and all
1 the comparison operators whose results have a 'MODE_INT' mode.
1
1 A value of 1 or -1 means that the instruction implementing the
1 comparison operator returns exactly 1 or -1 when the comparison is
1 true and 0 when the comparison is false. Otherwise, the value
1 indicates which bits of the result are guaranteed to be 1 when the
1 comparison is true. This value is interpreted in the mode of the
1 comparison operation, which is given by the mode of the first
1 operand in the 'cstoreMODE4' pattern. Either the low bit or the
1 sign bit of 'STORE_FLAG_VALUE' be on. Presently, only those bits
1 are used by the compiler.
1
1 If 'STORE_FLAG_VALUE' is neither 1 or -1, the compiler will
1 generate code that depends only on the specified bits. It can also
1 replace comparison operators with equivalent operations if they
1 cause the required bits to be set, even if the remaining bits are
1 undefined. For example, on a machine whose comparison operators
1 return an 'SImode' value and where 'STORE_FLAG_VALUE' is defined as
1 '0x80000000', saying that just the sign bit is relevant, the
1 expression
1
1 (ne:SI (and:SI X (const_int POWER-OF-2)) (const_int 0))
1
1 can be converted to
1
1 (ashift:SI X (const_int N))
1
1 where N is the appropriate shift count to move the bit being tested
1 into the sign bit.
1
1 There is no way to describe a machine that always sets the
1 low-order bit for a true value, but does not guarantee the value of
1 any other bits, but we do not know of any machine that has such an
1 instruction. If you are trying to port GCC to such a machine,
1 include an instruction to perform a logical-and of the result with
1 1 in the pattern for the comparison operators and let us know at
1 <gcc@gcc.gnu.org>.
1
1 Often, a machine will have multiple instructions that obtain a
1 value from a comparison (or the condition codes). Here are rules
1 to guide the choice of value for 'STORE_FLAG_VALUE', and hence the
1 instructions to be used:
1
1 * Use the shortest sequence that yields a valid definition for
1 'STORE_FLAG_VALUE'. It is more efficient for the compiler to
1 "normalize" the value (convert it to, e.g., 1 or 0) than for
1 the comparison operators to do so because there may be
1 opportunities to combine the normalization with other
1 operations.
1
1 * For equal-length sequences, use a value of 1 or -1, with -1
1 being slightly preferred on machines with expensive jumps and
1 1 preferred on other machines.
1
1 * As a second choice, choose a value of '0x80000001' if
1 instructions exist that set both the sign and low-order bits
1 but do not define the others.
1
1 * Otherwise, use a value of '0x80000000'.
1
1 Many machines can produce both the value chosen for
1 'STORE_FLAG_VALUE' and its negation in the same number of
1 instructions. On those machines, you should also define a pattern
1 for those cases, e.g., one matching
1
1 (set A (neg:M (ne:M B C)))
1
1 Some machines can also perform 'and' or 'plus' operations on
1 condition code values with less instructions than the corresponding
1 'cstoreMODE4' insn followed by 'and' or 'plus'. On those machines,
1 define the appropriate patterns. Use the names 'incscc' and
1 'decscc', respectively, for the patterns which perform 'plus' or
1 'minus' operations on condition code values. See 'rs6000.md' for
1 some examples. The GNU Superoptimizer can be used to find such
1 instruction sequences on other machines.
1
1 If this macro is not defined, the default value, 1, is used. You
1 need not define 'STORE_FLAG_VALUE' if the machine has no store-flag
1 instructions, or if the value generated by these instructions is 1.
1
1 -- Macro: FLOAT_STORE_FLAG_VALUE (MODE)
1 A C expression that gives a nonzero 'REAL_VALUE_TYPE' value that is
1 returned when comparison operators with floating-point results are
1 true. Define this macro on machines that have comparison
1 operations that return floating-point values. If there are no such
1 operations, do not define this macro.
1
1 -- Macro: VECTOR_STORE_FLAG_VALUE (MODE)
1 A C expression that gives a rtx representing the nonzero true
1 element for vector comparisons. The returned rtx should be valid
1 for the inner mode of MODE which is guaranteed to be a vector mode.
1 Define this macro on machines that have vector comparison
1 operations that return a vector result. If there are no such
1 operations, do not define this macro. Typically, this macro is
1 defined as 'const1_rtx' or 'constm1_rtx'. This macro may return
1 'NULL_RTX' to prevent the compiler optimizing such vector
1 comparison operations for the given mode.
1
1 -- Macro: CLZ_DEFINED_VALUE_AT_ZERO (MODE, VALUE)
1 -- Macro: CTZ_DEFINED_VALUE_AT_ZERO (MODE, VALUE)
1 A C expression that indicates whether the architecture defines a
1 value for 'clz' or 'ctz' with a zero operand. A result of '0'
1 indicates the value is undefined. If the value is defined for only
1 the RTL expression, the macro should evaluate to '1'; if the value
1 applies also to the corresponding optab entry (which is normally
1 the case if it expands directly into the corresponding RTL), then
1 the macro should evaluate to '2'. In the cases where the value is
1 defined, VALUE should be set to this value.
1
1 If this macro is not defined, the value of 'clz' or 'ctz' at zero
1 is assumed to be undefined.
1
1 This macro must be defined if the target's expansion for 'ffs'
1 relies on a particular value to get correct results. Otherwise it
1 is not necessary, though it may be used to optimize some corner
1 cases, and to provide a default expansion for the 'ffs' optab.
1
1 Note that regardless of this macro the "definedness" of 'clz' and
1 'ctz' at zero do _not_ extend to the builtin functions visible to
1 the user. Thus one may be free to adjust the value at will to
1 match the target expansion of these operations without fear of
1 breaking the API.
1
1 -- Macro: Pmode
1 An alias for the machine mode for pointers. On most machines,
1 define this to be the integer mode corresponding to the width of a
1 hardware pointer; 'SImode' on 32-bit machine or 'DImode' on 64-bit
1 machines. On some machines you must define this to be one of the
1 partial integer modes, such as 'PSImode'.
1
1 The width of 'Pmode' must be at least as large as the value of
1 'POINTER_SIZE'. If it is not equal, you must define the macro
1 'POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to
1 'Pmode'.
1
1 -- Macro: FUNCTION_MODE
1 An alias for the machine mode used for memory references to
1 functions being called, in 'call' RTL expressions. On most CISC
1 machines, where an instruction can begin at any byte address, this
1 should be 'QImode'. On most RISC machines, where all instructions
1 have fixed size and alignment, this should be a mode with the same
1 size and alignment as the machine instruction words - typically
1 'SImode' or 'HImode'.
1
1 -- Macro: STDC_0_IN_SYSTEM_HEADERS
1 In normal operation, the preprocessor expands '__STDC__' to the
1 constant 1, to signify that GCC conforms to ISO Standard C. On
1 some hosts, like Solaris, the system compiler uses a different
1 convention, where '__STDC__' is normally 0, but is 1 if the user
1 specifies strict conformance to the C Standard.
1
1 Defining 'STDC_0_IN_SYSTEM_HEADERS' makes GNU CPP follows the host
1 convention when processing system header files, but when processing
1 user files '__STDC__' will always expand to 1.
1
1 -- C Target Hook: const char * TARGET_C_PREINCLUDE (void)
1 Define this hook to return the name of a header file to be included
1 at the start of all compilations, as if it had been included with
1 '#include <FILE>'. If this hook returns 'NULL', or is not defined,
1 or the header is not found, or if the user specifies
1 '-ffreestanding' or '-nostdinc', no header is included.
1
1 This hook can be used together with a header provided by the system
1 C library to implement ISO C requirements for certain macros to be
1 predefined that describe properties of the whole implementation
1 rather than just the compiler.
1
1 -- C Target Hook: bool TARGET_CXX_IMPLICIT_EXTERN_C (const char*)
1 Define this hook to add target-specific C++ implicit extern C
1 functions. If this function returns true for the name of a
1 file-scope function, that function implicitly gets extern "C"
1 linkage rather than whatever language linkage the declaration would
1 normally have. An example of such function is WinMain on Win32
1 targets.
1
1 -- Macro: NO_IMPLICIT_EXTERN_C
1 Define this macro if the system header files support C++ as well as
1 C. This macro inhibits the usual method of using system header
1 files in C++, which is to pretend that the file's contents are
1 enclosed in 'extern "C" {...}'.
1
1 -- Macro: REGISTER_TARGET_PRAGMAS ()
1 Define this macro if you want to implement any target-specific
1 pragmas. If defined, it is a C expression which makes a series of
1 calls to 'c_register_pragma' or 'c_register_pragma_with_expansion'
1 for each pragma. The macro may also do any setup required for the
1 pragmas.
1
1 The primary reason to define this macro is to provide compatibility
1 with other compilers for the same target. In general, we
1 discourage definition of target-specific pragmas for GCC.
1
1 If the pragma can be implemented by attributes then you should
1 consider defining the target hook 'TARGET_INSERT_ATTRIBUTES' as
1 well.
1
1 Preprocessor macros that appear on pragma lines are not expanded.
1 All '#pragma' directives that do not match any registered pragma
1 are silently ignored, unless the user specifies
1 '-Wunknown-pragmas'.
1
1 -- Function: void c_register_pragma (const char *SPACE, const char
1 *NAME, void (*CALLBACK) (struct cpp_reader *))
1 -- Function: void c_register_pragma_with_expansion (const char *SPACE,
1 const char *NAME, void (*CALLBACK) (struct cpp_reader *))
1
1 Each call to 'c_register_pragma' or
1 'c_register_pragma_with_expansion' establishes one pragma. The
1 CALLBACK routine will be called when the preprocessor encounters a
1 pragma of the form
1
1 #pragma [SPACE] NAME ...
1
1 SPACE is the case-sensitive namespace of the pragma, or 'NULL' to
1 put the pragma in the global namespace. The callback routine
1 receives PFILE as its first argument, which can be passed on to
1 cpplib's functions if necessary. You can lex tokens after the NAME
1 by calling 'pragma_lex'. Tokens that are not read by the callback
1 will be silently ignored. The end of the line is indicated by a
1 token of type 'CPP_EOF'. Macro expansion occurs on the arguments
1 of pragmas registered with 'c_register_pragma_with_expansion' but
1 not on the arguments of pragmas registered with
1 'c_register_pragma'.
1
1 Note that the use of 'pragma_lex' is specific to the C and C++
1 compilers. It will not work in the Java or Fortran compilers, or
1 any other language compilers for that matter. Thus if 'pragma_lex'
1 is going to be called from target-specific code, it must only be
1 done so when building the C and C++ compilers. This can be done by
1 defining the variables 'c_target_objs' and 'cxx_target_objs' in the
1 target entry in the 'config.gcc' file. These variables should name
1 the target-specific, language-specific object file which contains
1 the code that uses 'pragma_lex'. Note it will also be necessary to
1 add a rule to the makefile fragment pointed to by 'tmake_file' that
1 shows how to build this object file.
1
1 -- Macro: HANDLE_PRAGMA_PACK_WITH_EXPANSION
1 Define this macro if macros should be expanded in the arguments of
1 '#pragma pack'.
1
1 -- Macro: TARGET_DEFAULT_PACK_STRUCT
1 If your target requires a structure packing default other than 0
1 (meaning the machine default), define this macro to the necessary
1 value (in bytes). This must be a value that would also be valid to
1 use with '#pragma pack()' (that is, a small power of two).
1
1 -- Macro: DOLLARS_IN_IDENTIFIERS
1 Define this macro to control use of the character '$' in identifier
1 names for the C family of languages. 0 means '$' is not allowed by
1 default; 1 means it is allowed. 1 is the default; there is no need
1 to define this macro in that case.
1
1 -- Macro: INSN_SETS_ARE_DELAYED (INSN)
1 Define this macro as a C expression that is nonzero if it is safe
1 for the delay slot scheduler to place instructions in the delay
1 slot of INSN, even if they appear to use a resource set or
1 clobbered in INSN. INSN is always a 'jump_insn' or an 'insn'; GCC
1 knows that every 'call_insn' has this behavior. On machines where
1 some 'insn' or 'jump_insn' is really a function call and hence has
1 this behavior, you should define this macro.
1
1 You need not define this macro if it would always return zero.
1
1 -- Macro: INSN_REFERENCES_ARE_DELAYED (INSN)
1 Define this macro as a C expression that is nonzero if it is safe
1 for the delay slot scheduler to place instructions in the delay
1 slot of INSN, even if they appear to set or clobber a resource
1 referenced in INSN. INSN is always a 'jump_insn' or an 'insn'. On
1 machines where some 'insn' or 'jump_insn' is really a function call
1 and its operands are registers whose use is actually in the
1 subroutine it calls, you should define this macro. Doing so allows
1 the delay slot scheduler to move instructions which copy arguments
1 into the argument registers into the delay slot of INSN.
1
1 You need not define this macro if it would always return zero.
1
1 -- Macro: MULTIPLE_SYMBOL_SPACES
1 Define this macro as a C expression that is nonzero if, in some
1 cases, global symbols from one translation unit may not be bound to
1 undefined symbols in another translation unit without user
1 intervention. For instance, under Microsoft Windows symbols must
1 be explicitly imported from shared libraries (DLLs).
1
1 You need not define this macro if it would always evaluate to zero.
1
1 -- Target Hook: rtx_insn * TARGET_MD_ASM_ADJUST (vec<rtx>& OUTPUTS,
1 vec<rtx>& INPUTS, vec<const char *>& CONSTRAINTS, vec<rtx>&
1 CLOBBERS, HARD_REG_SET& CLOBBERED_REGS)
1 This target hook may add "clobbers" to CLOBBERS and CLOBBERED_REGS
1 for any hard regs the port wishes to automatically clobber for an
1 asm. The OUTPUTS and INPUTS may be inspected to avoid clobbering a
1 register that is already used by the asm.
1
1 It may modify the OUTPUTS, INPUTS, and CONSTRAINTS as necessary for
1 other pre-processing. In this case the return value is a sequence
1 of insns to emit after the asm.
1
1 -- Macro: MATH_LIBRARY
1 Define this macro as a C string constant for the linker argument to
1 link in the system math library, minus the initial '"-l"', or '""'
1 if the target does not have a separate math library.
1
1 You need only define this macro if the default of '"m"' is wrong.
1
1 -- Macro: LIBRARY_PATH_ENV
1 Define this macro as a C string constant for the environment
1 variable that specifies where the linker should look for libraries.
1
1 You need only define this macro if the default of '"LIBRARY_PATH"'
1 is wrong.
1
1 -- Macro: TARGET_POSIX_IO
1 Define this macro if the target supports the following POSIX file
1 functions, access, mkdir and file locking with fcntl / F_SETLKW.
1 Defining 'TARGET_POSIX_IO' will enable the test coverage code to
1 use file locking when exiting a program, which avoids race
1 conditions if the program has forked. It will also create
1 directories at run-time for cross-profiling.
1
1 -- Macro: MAX_CONDITIONAL_EXECUTE
1
1 A C expression for the maximum number of instructions to execute
1 via conditional execution instructions instead of a branch. A
1 value of 'BRANCH_COST'+1 is the default if the machine does not use
1 cc0, and 1 if it does use cc0.
1
1 -- Macro: IFCVT_MODIFY_TESTS (CE_INFO, TRUE_EXPR, FALSE_EXPR)
1 Used if the target needs to perform machine-dependent modifications
1 on the conditionals used for turning basic blocks into
1 conditionally executed code. CE_INFO points to a data structure,
1 'struct ce_if_block', which contains information about the
1 currently processed blocks. TRUE_EXPR and FALSE_EXPR are the tests
1 that are used for converting the then-block and the else-block,
1 respectively. Set either TRUE_EXPR or FALSE_EXPR to a null pointer
1 if the tests cannot be converted.
1
1 -- Macro: IFCVT_MODIFY_MULTIPLE_TESTS (CE_INFO, BB, TRUE_EXPR,
1 FALSE_EXPR)
1 Like 'IFCVT_MODIFY_TESTS', but used when converting more
1 complicated if-statements into conditions combined by 'and' and
1 'or' operations. BB contains the basic block that contains the
1 test that is currently being processed and about to be turned into
1 a condition.
1
1 -- Macro: IFCVT_MODIFY_INSN (CE_INFO, PATTERN, INSN)
1 A C expression to modify the PATTERN of an INSN that is to be
1 converted to conditional execution format. CE_INFO points to a
1 data structure, 'struct ce_if_block', which contains information
1 about the currently processed blocks.
1
1 -- Macro: IFCVT_MODIFY_FINAL (CE_INFO)
1 A C expression to perform any final machine dependent modifications
1 in converting code to conditional execution. The involved basic
1 blocks can be found in the 'struct ce_if_block' structure that is
1 pointed to by CE_INFO.
1
1 -- Macro: IFCVT_MODIFY_CANCEL (CE_INFO)
1 A C expression to cancel any machine dependent modifications in
1 converting code to conditional execution. The involved basic
1 blocks can be found in the 'struct ce_if_block' structure that is
1 pointed to by CE_INFO.
1
1 -- Macro: IFCVT_MACHDEP_INIT (CE_INFO)
1 A C expression to initialize any machine specific data for
1 if-conversion of the if-block in the 'struct ce_if_block' structure
1 that is pointed to by CE_INFO.
1
1 -- Target Hook: void TARGET_MACHINE_DEPENDENT_REORG (void)
1 If non-null, this hook performs a target-specific pass over the
1 instruction stream. The compiler will run it at all optimization
1 levels, just before the point at which it normally does
1 delayed-branch scheduling.
1
1 The exact purpose of the hook varies from target to target. Some
1 use it to do transformations that are necessary for correctness,
1 such as laying out in-function constant pools or avoiding hardware
1 hazards. Others use it as an opportunity to do some
1 machine-dependent optimizations.
1
1 You need not implement the hook if it has nothing to do. The
1 default definition is null.
1
1 -- Target Hook: void TARGET_INIT_BUILTINS (void)
1 Define this hook if you have any machine-specific built-in
1 functions that need to be defined. It should be a function that
1 performs the necessary setup.
1
1 Machine specific built-in functions can be useful to expand special
1 machine instructions that would otherwise not normally be generated
1 because they have no equivalent in the source language (for
1 example, SIMD vector instructions or prefetch instructions).
1
1 To create a built-in function, call the function
1 'lang_hooks.builtin_function' which is defined by the language
1 front end. You can use any type nodes set up by
1 'build_common_tree_nodes'; only language front ends that use those
1 two functions will call 'TARGET_INIT_BUILTINS'.
1
1 -- Target Hook: tree TARGET_BUILTIN_DECL (unsigned CODE, bool
1 INITIALIZE_P)
1 Define this hook if you have any machine-specific built-in
1 functions that need to be defined. It should be a function that
1 returns the builtin function declaration for the builtin function
1 code CODE. If there is no such builtin and it cannot be
1 initialized at this time if INITIALIZE_P is true the function
1 should return 'NULL_TREE'. If CODE is out of range the function
1 should return 'error_mark_node'.
1
1 -- Target Hook: rtx TARGET_EXPAND_BUILTIN (tree EXP, rtx TARGET, rtx
1 SUBTARGET, machine_mode MODE, int IGNORE)
1
1 Expand a call to a machine specific built-in function that was set
1 up by 'TARGET_INIT_BUILTINS'. EXP is the expression for the
1 function call; the result should go to TARGET if that is
1 convenient, and have mode MODE if that is convenient. SUBTARGET
1 may be used as the target for computing one of EXP's operands.
1 IGNORE is nonzero if the value is to be ignored. This function
1 should return the result of the call to the built-in function.
1
1 -- Target Hook: tree TARGET_BUILTIN_CHKP_FUNCTION (unsigned FCODE)
1 This hook allows target to redefine built-in functions used by
1 Pointer Bounds Checker for code instrumentation. Hook should
1 return fndecl of function implementing generic builtin whose code
1 is passed in FCODE. Currently following built-in functions are
1 obtained using this hook:
1 -- Built-in Function: __bounds_type __chkp_bndmk (const void *LB,
1 size_t SIZE)
1 Function code - BUILT_IN_CHKP_BNDMK. This built-in function is
1 used by Pointer Bounds Checker to create bound values. LB
1 holds low bound of the resulting bounds. SIZE holds size of
1 created bounds.
1
1 -- Built-in Function: void __chkp_bndstx (const void *PTR,
1 __bounds_type B, const void **LOC)
1 Function code - 'BUILT_IN_CHKP_BNDSTX'. This built-in
1 function is used by Pointer Bounds Checker to store bounds B
1 for pointer PTR when PTR is stored by address LOC.
1
1 -- Built-in Function: __bounds_type __chkp_bndldx (const void
1 **LOC, const void *PTR)
1 Function code - 'BUILT_IN_CHKP_BNDLDX'. This built-in
1 function is used by Pointer Bounds Checker to get bounds of
1 pointer PTR loaded by address LOC.
1
1 -- Built-in Function: void __chkp_bndcl (const void *PTR,
1 __bounds_type B)
1 Function code - 'BUILT_IN_CHKP_BNDCL'. This built-in function
1 is used by Pointer Bounds Checker to perform check for pointer
1 PTR against lower bound of bounds B.
1
1 -- Built-in Function: void __chkp_bndcu (const void *PTR,
1 __bounds_type B)
1 Function code - 'BUILT_IN_CHKP_BNDCU'. This built-in function
1 is used by Pointer Bounds Checker to perform check for pointer
1 PTR against upper bound of bounds B.
1
1 -- Built-in Function: __bounds_type __chkp_bndret (void *PTR)
1 Function code - 'BUILT_IN_CHKP_BNDRET'. This built-in
1 function is used by Pointer Bounds Checker to obtain bounds
1 returned by a call statement. PTR passed to built-in is
1 'SSA_NAME' returned by the call.
1
1 -- Built-in Function: __bounds_type __chkp_intersect
1 (__bounds_type B1, __bounds_type B2)
1 Function code - 'BUILT_IN_CHKP_INTERSECT'. This built-in
1 function returns intersection of bounds B1 and B2.
1
1 -- Built-in Function: __bounds_type __chkp_narrow (const void
1 *PTR, __bounds_type B, size_t S)
1 Function code - 'BUILT_IN_CHKP_NARROW'. This built-in
1 function returns intersection of bounds B and [PTR, PTR + S -
1 '1'].
1
1 -- Built-in Function: size_t __chkp_sizeof (const void *PTR)
1 Function code - 'BUILT_IN_CHKP_SIZEOF'. This built-in
1 function returns size of object referenced by PTR. PTR is
1 always 'ADDR_EXPR' of 'VAR_DECL'. This built-in is used by
1 Pointer Bounds Checker when bounds of object cannot be
1 computed statically (e.g. object has incomplete type).
1
1 -- Built-in Function: const void *__chkp_extract_lower
1 (__bounds_type B)
1 Function code - 'BUILT_IN_CHKP_EXTRACT_LOWER'. This built-in
1 function returns lower bound of bounds B.
1
1 -- Built-in Function: const void *__chkp_extract_upper
1 (__bounds_type B)
1 Function code - 'BUILT_IN_CHKP_EXTRACT_UPPER'. This built-in
1 function returns upper bound of bounds B.
1 -- Target Hook: tree TARGET_CHKP_BOUND_TYPE (void)
1 Return type to be used for bounds
1 -- Target Hook: machine_mode TARGET_CHKP_BOUND_MODE (void)
1 Return mode to be used for bounds.
1 -- Target Hook: tree TARGET_CHKP_MAKE_BOUNDS_CONSTANT (HOST_WIDE_INT
1 LB, HOST_WIDE_INT UB)
1 Return constant used to statically initialize constant bounds with
1 specified lower bound LB and upper bounds UB.
1 -- Target Hook: int TARGET_CHKP_INITIALIZE_BOUNDS (tree VAR, tree LB,
1 tree UB, tree *STMTS)
1 Generate a list of statements STMTS to initialize pointer bounds
1 variable VAR with bounds LB and UB. Return the number of generated
1 statements.
1
1 -- Target Hook: tree TARGET_RESOLVE_OVERLOADED_BUILTIN (unsigned int
1 LOC, tree FNDECL, void *ARGLIST)
1 Select a replacement for a machine specific built-in function that
1 was set up by 'TARGET_INIT_BUILTINS'. This is done _before_
1 regular type checking, and so allows the target to implement a
1 crude form of function overloading. FNDECL is the declaration of
1 the built-in function. ARGLIST is the list of arguments passed to
1 the built-in function. The result is a complete expression that
1 implements the operation, usually another 'CALL_EXPR'. ARGLIST
1 really has type 'VEC(tree,gc)*'
1
1 -- Target Hook: tree TARGET_FOLD_BUILTIN (tree FNDECL, int N_ARGS, tree
1 *ARGP, bool IGNORE)
1 Fold a call to a machine specific built-in function that was set up
1 by 'TARGET_INIT_BUILTINS'. FNDECL is the declaration of the
1 built-in function. N_ARGS is the number of arguments passed to the
1 function; the arguments themselves are pointed to by ARGP. The
1 result is another tree, valid for both GIMPLE and GENERIC,
1 containing a simplified expression for the call's result. If
1 IGNORE is true the value will be ignored.
1
1 -- Target Hook: bool TARGET_GIMPLE_FOLD_BUILTIN (gimple_stmt_iterator
1 *GSI)
1 Fold a call to a machine specific built-in function that was set up
1 by 'TARGET_INIT_BUILTINS'. GSI points to the gimple statement
1 holding the function call. Returns true if any change was made to
1 the GIMPLE stream.
1
1 -- Target Hook: int TARGET_COMPARE_VERSION_PRIORITY (tree DECL1, tree
1 DECL2)
1 This hook is used to compare the target attributes in two functions
1 to determine which function's features get higher priority. This
1 is used during function multi-versioning to figure out the order in
1 which two versions must be dispatched. A function version with a
1 higher priority is checked for dispatching earlier. DECL1 and
1 DECL2 are the two function decls that will be compared.
1
1 -- Target Hook: tree TARGET_GET_FUNCTION_VERSIONS_DISPATCHER (void
1 *DECL)
1 This hook is used to get the dispatcher function for a set of
1 function versions. The dispatcher function is called to invoke the
1 right function version at run-time. DECL is one version from a set
1 of semantically identical versions.
1
1 -- Target Hook: tree TARGET_GENERATE_VERSION_DISPATCHER_BODY (void
1 *ARG)
1 This hook is used to generate the dispatcher logic to invoke the
1 right function version at run-time for a given set of function
1 versions. ARG points to the callgraph node of the dispatcher
1 function whose body must be generated.
1
1 -- Target Hook: bool TARGET_CAN_USE_DOLOOP_P (const widest_int
1 &ITERATIONS, const widest_int &ITERATIONS_MAX, unsigned int
1 LOOP_DEPTH, bool ENTERED_AT_TOP)
1 Return true if it is possible to use low-overhead loops
1 ('doloop_end' and 'doloop_begin') for a particular loop.
1 ITERATIONS gives the exact number of iterations, or 0 if not known.
1 ITERATIONS_MAX gives the maximum number of iterations, or 0 if not
1 known. LOOP_DEPTH is the nesting depth of the loop, with 1 for
1 innermost loops, 2 for loops that contain innermost loops, and so
1 on. ENTERED_AT_TOP is true if the loop is only entered from the
1 top.
1
1 This hook is only used if 'doloop_end' is available. The default
1 implementation returns true. You can use
1 'can_use_doloop_if_innermost' if the loop must be the innermost,
1 and if there are no other restrictions.
1
1 -- Target Hook: const char * TARGET_INVALID_WITHIN_DOLOOP (const
1 rtx_insn *INSN)
1
1 Take an instruction in INSN and return NULL if it is valid within a
1 low-overhead loop, otherwise return a string explaining why doloop
1 could not be applied.
1
1 Many targets use special registers for low-overhead looping. For
1 any instruction that clobbers these this function should return a
1 string indicating the reason why the doloop could not be applied.
1 By default, the RTL loop optimizer does not use a present doloop
1 pattern for loops containing function calls or branch on table
1 instructions.
1
1 -- Target Hook: bool TARGET_LEGITIMATE_COMBINED_INSN (rtx_insn *INSN)
1 Take an instruction in INSN and return 'false' if the instruction
1 is not appropriate as a combination of two or more instructions.
1 The default is to accept all instructions.
1
1 -- Target Hook: bool TARGET_CAN_FOLLOW_JUMP (const rtx_insn *FOLLOWER,
1 const rtx_insn *FOLLOWEE)
1 FOLLOWER and FOLLOWEE are JUMP_INSN instructions; return true if
1 FOLLOWER may be modified to follow FOLLOWEE; false, if it can't.
1 For example, on some targets, certain kinds of branches can't be
1 made to follow through a hot/cold partitioning.
1
1 -- Target Hook: bool TARGET_COMMUTATIVE_P (const_rtx X, int OUTER_CODE)
1 This target hook returns 'true' if X is considered to be
1 commutative. Usually, this is just COMMUTATIVE_P (X), but the HP
1 PA doesn't consider PLUS to be commutative inside a MEM.
1 OUTER_CODE is the rtx code of the enclosing rtl, if known,
1 otherwise it is UNKNOWN.
1
1 -- Target Hook: rtx TARGET_ALLOCATE_INITIAL_VALUE (rtx HARD_REG)
1
1 When the initial value of a hard register has been copied in a
1 pseudo register, it is often not necessary to actually allocate
1 another register to this pseudo register, because the original hard
1 register or a stack slot it has been saved into can be used.
1 'TARGET_ALLOCATE_INITIAL_VALUE' is called at the start of register
1 allocation once for each hard register that had its initial value
1 copied by using 'get_func_hard_reg_initial_val' or
1 'get_hard_reg_initial_val'. Possible values are 'NULL_RTX', if you
1 don't want to do any special allocation, a 'REG' rtx--that would
1 typically be the hard register itself, if it is known not to be
1 clobbered--or a 'MEM'. If you are returning a 'MEM', this is only
1 a hint for the allocator; it might decide to use another register
1 anyways. You may use 'current_function_is_leaf' or 'REG_N_SETS' in
1 the hook to determine if the hard register in question will not be
1 clobbered. The default value of this hook is 'NULL', which
1 disables any special allocation.
1
1 -- Target Hook: int TARGET_UNSPEC_MAY_TRAP_P (const_rtx X, unsigned
1 FLAGS)
1 This target hook returns nonzero if X, an 'unspec' or
1 'unspec_volatile' operation, might cause a trap. Targets can use
1 this hook to enhance precision of analysis for 'unspec' and
1 'unspec_volatile' operations. You may call 'may_trap_p_1' to
1 analyze inner elements of X in which case FLAGS should be passed
1 along.
1
1 -- Target Hook: void TARGET_SET_CURRENT_FUNCTION (tree DECL)
1 The compiler invokes this hook whenever it changes its current
1 function context ('cfun'). You can define this function if the
1 back end needs to perform any initialization or reset actions on a
1 per-function basis. For example, it may be used to implement
1 function attributes that affect register usage or code generation
1 patterns. The argument DECL is the declaration for the new
1 function context, and may be null to indicate that the compiler has
1 left a function context and is returning to processing at the top
1 level. The default hook function does nothing.
1
1 GCC sets 'cfun' to a dummy function context during initialization
1 of some parts of the back end. The hook function is not invoked in
1 this situation; you need not worry about the hook being invoked
1 recursively, or when the back end is in a partially-initialized
1 state. 'cfun' might be 'NULL' to indicate processing at top level,
1 outside of any function scope.
1
1 -- Macro: TARGET_OBJECT_SUFFIX
1 Define this macro to be a C string representing the suffix for
1 object files on your target machine. If you do not define this
1 macro, GCC will use '.o' as the suffix for object files.
1
1 -- Macro: TARGET_EXECUTABLE_SUFFIX
1 Define this macro to be a C string representing the suffix to be
1 automatically added to executable files on your target machine. If
1 you do not define this macro, GCC will use the null string as the
1 suffix for executable files.
1
1 -- Macro: COLLECT_EXPORT_LIST
1 If defined, 'collect2' will scan the individual object files
1 specified on its command line and create an export list for the
1 linker. Define this macro for systems like AIX, where the linker
1 discards object files that are not referenced from 'main' and uses
1 export lists.
1
1 -- Macro: MODIFY_JNI_METHOD_CALL (MDECL)
1 Define this macro to a C expression representing a variant of the
1 method call MDECL, if Java Native Interface (JNI) methods must be
1 invoked differently from other methods on your target. For
1 example, on 32-bit Microsoft Windows, JNI methods must be invoked
1 using the 'stdcall' calling convention and this macro is then
1 defined as this expression:
1
1 build_type_attribute_variant (MDECL,
1 build_tree_list
1 (get_identifier ("stdcall"),
1 NULL))
1
1 -- Target Hook: bool TARGET_CANNOT_MODIFY_JUMPS_P (void)
1 This target hook returns 'true' past the point in which new jump
1 instructions could be created. On machines that require a register
1 for every jump such as the SHmedia ISA of SH5, this point would
1 typically be reload, so this target hook should be defined to a
1 function such as:
1
1 static bool
1 cannot_modify_jumps_past_reload_p ()
1 {
1 return (reload_completed || reload_in_progress);
1 }
1
1 -- Target Hook: reg_class_t TARGET_BRANCH_TARGET_REGISTER_CLASS (void)
1 This target hook returns a register class for which branch target
1 register optimizations should be applied. All registers in this
1 class should be usable interchangeably. After reload, registers in
1 this class will be re-allocated and loads will be hoisted out of
1 loops and be subjected to inter-block scheduling.
1
1 -- Target Hook: bool TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED (bool
1 AFTER_PROLOGUE_EPILOGUE_GEN)
1 Branch target register optimization will by default exclude
1 callee-saved registers that are not already live during the current
1 function; if this target hook returns true, they will be included.
1 The target code must than make sure that all target registers in
1 the class returned by 'TARGET_BRANCH_TARGET_REGISTER_CLASS' that
1 might need saving are saved. AFTER_PROLOGUE_EPILOGUE_GEN indicates
1 if prologues and epilogues have already been generated. Note, even
1 if you only return true when AFTER_PROLOGUE_EPILOGUE_GEN is false,
1 you still are likely to have to make special provisions in
1 'INITIAL_ELIMINATION_OFFSET' to reserve space for caller-saved
1 target registers.
1
1 -- Target Hook: bool TARGET_HAVE_CONDITIONAL_EXECUTION (void)
1 This target hook returns true if the target supports conditional
1 execution. This target hook is required only when the target has
1 several different modes and they have different conditional
1 execution capability, such as ARM.
1
1 -- Target Hook: rtx TARGET_GEN_CCMP_FIRST (rtx_insn **PREP_SEQ,
1 rtx_insn **GEN_SEQ, int CODE, tree OP0, tree OP1)
1 This function prepares to emit a comparison insn for the first
1 compare in a sequence of conditional comparisions. It returns an
1 appropriate comparison with 'CC' for passing to 'gen_ccmp_next' or
1 'cbranch_optab'. The insns to prepare the compare are saved in
1 PREP_SEQ and the compare insns are saved in GEN_SEQ. They will be
1 emitted when all the compares in the the conditional comparision
1 are generated without error. CODE is the 'rtx_code' of the compare
1 for OP0 and OP1.
1
1 -- Target Hook: rtx TARGET_GEN_CCMP_NEXT (rtx_insn **PREP_SEQ, rtx_insn
1 **GEN_SEQ, rtx PREV, int CMP_CODE, tree OP0, tree OP1, int
1 BIT_CODE)
1 This function prepares to emit a conditional comparison within a
1 sequence of conditional comparisons. It returns an appropriate
1 comparison with 'CC' for passing to 'gen_ccmp_next' or
1 'cbranch_optab'. The insns to prepare the compare are saved in
1 PREP_SEQ and the compare insns are saved in GEN_SEQ. They will be
1 emitted when all the compares in the conditional comparision are
1 generated without error. The PREV expression is the result of a
1 prior call to 'gen_ccmp_first' or 'gen_ccmp_next'. It may return
1 'NULL' if the combination of PREV and this comparison is not
1 supported, otherwise the result must be appropriate for passing to
1 'gen_ccmp_next' or 'cbranch_optab'. CODE is the 'rtx_code' of the
1 compare for OP0 and OP1. BIT_CODE is 'AND' or 'IOR', which is the
1 op on the compares.
1
1 -- Target Hook: unsigned TARGET_LOOP_UNROLL_ADJUST (unsigned NUNROLL,
1 struct loop *LOOP)
1 This target hook returns a new value for the number of times LOOP
1 should be unrolled. The parameter NUNROLL is the number of times
1 the loop is to be unrolled. The parameter LOOP is a pointer to the
1 loop, which is going to be checked for unrolling. This target hook
1 is required only when the target has special constraints like
1 maximum number of memory accesses.
1
1 -- Macro: POWI_MAX_MULTS
1 If defined, this macro is interpreted as a signed integer C
1 expression that specifies the maximum number of floating point
1 multiplications that should be emitted when expanding
1 exponentiation by an integer constant inline. When this value is
1 defined, exponentiation requiring more than this number of
1 multiplications is implemented by calling the system library's
1 'pow', 'powf' or 'powl' routines. The default value places no
1 upper bound on the multiplication count.
1
1 -- Macro: void TARGET_EXTRA_INCLUDES (const char *SYSROOT, const char
1 *IPREFIX, int STDINC)
1 This target hook should register any extra include files for the
1 target. The parameter STDINC indicates if normal include files are
1 present. The parameter SYSROOT is the system root directory. The
1 parameter IPREFIX is the prefix for the gcc directory.
1
1 -- Macro: void TARGET_EXTRA_PRE_INCLUDES (const char *SYSROOT, const
1 char *IPREFIX, int STDINC)
1 This target hook should register any extra include files for the
1 target before any standard headers. The parameter STDINC indicates
1 if normal include files are present. The parameter SYSROOT is the
1 system root directory. The parameter IPREFIX is the prefix for the
1 gcc directory.
1
1 -- Macro: void TARGET_OPTF (char *PATH)
1 This target hook should register special include paths for the
1 target. The parameter PATH is the include to register. On Darwin
1 systems, this is used for Framework includes, which have semantics
1 that are different from '-I'.
1
1 -- Macro: bool TARGET_USE_LOCAL_THUNK_ALIAS_P (tree FNDECL)
1 This target macro returns 'true' if it is safe to use a local alias
1 for a virtual function FNDECL when constructing thunks, 'false'
1 otherwise. By default, the macro returns 'true' for all functions,
1 if a target supports aliases (i.e. defines 'ASM_OUTPUT_DEF'),
1 'false' otherwise,
1
1 -- Macro: TARGET_FORMAT_TYPES
1 If defined, this macro is the name of a global variable containing
1 target-specific format checking information for the '-Wformat'
1 option. The default is to have no target-specific format checks.
1
1 -- Macro: TARGET_N_FORMAT_TYPES
1 If defined, this macro is the number of entries in
1 'TARGET_FORMAT_TYPES'.
1
1 -- Macro: TARGET_OVERRIDES_FORMAT_ATTRIBUTES
1 If defined, this macro is the name of a global variable containing
1 target-specific format overrides for the '-Wformat' option. The
1 default is to have no target-specific format overrides. If
1 defined, 'TARGET_FORMAT_TYPES' must be defined, too.
1
1 -- Macro: TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT
1 If defined, this macro specifies the number of entries in
1 'TARGET_OVERRIDES_FORMAT_ATTRIBUTES'.
1
1 -- Macro: TARGET_OVERRIDES_FORMAT_INIT
1 If defined, this macro specifies the optional initialization
1 routine for target specific customizations of the system printf and
1 scanf formatter settings.
1
1 -- Target Hook: const char * TARGET_INVALID_ARG_FOR_UNPROTOTYPED_FN
1 (const_tree TYPELIST, const_tree FUNCDECL, const_tree VAL)
1 If defined, this macro returns the diagnostic message when it is
1 illegal to pass argument VAL to function FUNCDECL with prototype
1 TYPELIST.
1
1 -- Target Hook: const char * TARGET_INVALID_CONVERSION (const_tree
1 FROMTYPE, const_tree TOTYPE)
1 If defined, this macro returns the diagnostic message when it is
1 invalid to convert from FROMTYPE to TOTYPE, or 'NULL' if validity
1 should be determined by the front end.
1
1 -- Target Hook: const char * TARGET_INVALID_UNARY_OP (int OP,
1 const_tree TYPE)
1 If defined, this macro returns the diagnostic message when it is
1 invalid to apply operation OP (where unary plus is denoted by
1 'CONVERT_EXPR') to an operand of type TYPE, or 'NULL' if validity
1 should be determined by the front end.
1
1 -- Target Hook: const char * TARGET_INVALID_BINARY_OP (int OP,
1 const_tree TYPE1, const_tree TYPE2)
1 If defined, this macro returns the diagnostic message when it is
1 invalid to apply operation OP to operands of types TYPE1 and TYPE2,
1 or 'NULL' if validity should be determined by the front end.
1
1 -- Target Hook: tree TARGET_PROMOTED_TYPE (const_tree TYPE)
1 If defined, this target hook returns the type to which values of
1 TYPE should be promoted when they appear in expressions, analogous
1 to the integer promotions, or 'NULL_TREE' to use the front end's
1 normal promotion rules. This hook is useful when there are
1 target-specific types with special promotion rules. This is
1 currently used only by the C and C++ front ends.
1
1 -- Target Hook: tree TARGET_CONVERT_TO_TYPE (tree TYPE, tree EXPR)
1 If defined, this hook returns the result of converting EXPR to
1 TYPE. It should return the converted expression, or 'NULL_TREE' to
1 apply the front end's normal conversion rules. This hook is useful
1 when there are target-specific types with special conversion rules.
1 This is currently used only by the C and C++ front ends.
1
1 -- Macro: OBJC_JBLEN
1 This macro determines the size of the objective C jump buffer for
1 the NeXT runtime. By default, OBJC_JBLEN is defined to an
1 innocuous value.
1
1 -- Macro: LIBGCC2_UNWIND_ATTRIBUTE
1 Define this macro if any target-specific attributes need to be
1 attached to the functions in 'libgcc' that provide low-level
1 support for call stack unwinding. It is used in declarations in
1 'unwind-generic.h' and the associated definitions of those
1 functions.
1
1 -- Target Hook: void TARGET_UPDATE_STACK_BOUNDARY (void)
1 Define this macro to update the current function stack boundary if
1 necessary.
1
1 -- Target Hook: rtx TARGET_GET_DRAP_RTX (void)
1 This hook should return an rtx for Dynamic Realign Argument Pointer
1 (DRAP) if a different argument pointer register is needed to access
1 the function's argument list due to stack realignment. Return
1 'NULL' if no DRAP is needed.
1
1 -- Target Hook: bool TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS (void)
1 When optimization is disabled, this hook indicates whether or not
1 arguments should be allocated to stack slots. Normally, GCC
1 allocates stacks slots for arguments when not optimizing in order
1 to make debugging easier. However, when a function is declared
1 with '__attribute__((naked))', there is no stack frame, and the
1 compiler cannot safely move arguments from the registers in which
1 they are passed to the stack. Therefore, this hook should return
1 true in general, but false for naked functions. The default
1 implementation always returns true.
1
1 -- Target Hook: unsigned HOST_WIDE_INT TARGET_CONST_ANCHOR
1 On some architectures it can take multiple instructions to
1 synthesize a constant. If there is another constant already in a
1 register that is close enough in value then it is preferable that
1 the new constant is computed from this register using immediate
1 addition or subtraction. We accomplish this through CSE. Besides
1 the value of the constant we also add a lower and an upper constant
1 anchor to the available expressions. These are then queried when
1 encountering new constants. The anchors are computed by rounding
1 the constant up and down to a multiple of the value of
1 'TARGET_CONST_ANCHOR'. 'TARGET_CONST_ANCHOR' should be the maximum
1 positive value accepted by immediate-add plus one. We currently
1 assume that the value of 'TARGET_CONST_ANCHOR' is a power of 2.
1 For example, on MIPS, where add-immediate takes a 16-bit signed
1 value, 'TARGET_CONST_ANCHOR' is set to '0x8000'. The default value
1 is zero, which disables this optimization.
1
1 -- Target Hook: unsigned HOST_WIDE_INT TARGET_ASAN_SHADOW_OFFSET (void)
1 Return the offset bitwise ored into shifted address to get
1 corresponding Address Sanitizer shadow memory address. NULL if
1 Address Sanitizer is not supported by the target.
1
1 -- Target Hook: unsigned HOST_WIDE_INT TARGET_MEMMODEL_CHECK (unsigned
1 HOST_WIDE_INT VAL)
1 Validate target specific memory model mask bits. When NULL no
1 target specific memory model bits are allowed.
1
1 -- Target Hook: unsigned char TARGET_ATOMIC_TEST_AND_SET_TRUEVAL
1 This value should be set if the result written by
1 'atomic_test_and_set' is not exactly 1, i.e. the 'bool' 'true'.
1
1 -- Target Hook: bool TARGET_HAS_IFUNC_P (void)
1 It returns true if the target supports GNU indirect functions. The
1 support includes the assembler, linker and dynamic linker. The
1 default value of this hook is based on target's libc.
1
1 -- Target Hook: unsigned int TARGET_ATOMIC_ALIGN_FOR_MODE (machine_mode
1 MODE)
1 If defined, this function returns an appropriate alignment in bits
1 for an atomic object of machine_mode MODE. If 0 is returned then
1 the default alignment for the specified mode is used.
1
1 -- Target Hook: void TARGET_ATOMIC_ASSIGN_EXPAND_FENV (tree *HOLD, tree
1 *CLEAR, tree *UPDATE)
1 ISO C11 requires atomic compound assignments that may raise
1 floating-point exceptions to raise exceptions corresponding to the
1 arithmetic operation whose result was successfully stored in a
1 compare-and-exchange sequence. This requires code equivalent to
1 calls to 'feholdexcept', 'feclearexcept' and 'feupdateenv' to be
1 generated at appropriate points in the compare-and-exchange
1 sequence. This hook should set '*HOLD' to an expression equivalent
1 to the call to 'feholdexcept', '*CLEAR' to an expression equivalent
1 to the call to 'feclearexcept' and '*UPDATE' to an expression
1 equivalent to the call to 'feupdateenv'. The three expressions are
1 'NULL_TREE' on entry to the hook and may be left as 'NULL_TREE' if
1 no code is required in a particular place. The default
1 implementation leaves all three expressions as 'NULL_TREE'. The
1 '__atomic_feraiseexcept' function from 'libatomic' may be of use as
1 part of the code generated in '*UPDATE'.
1
1 -- Target Hook: void TARGET_RECORD_OFFLOAD_SYMBOL (tree)
1 Used when offloaded functions are seen in the compilation unit and
1 no named sections are available. It is called once for each symbol
1 that must be recorded in the offload function and variable table.
1
1 -- Target Hook: char * TARGET_OFFLOAD_OPTIONS (void)
1 Used when writing out the list of options into an LTO file. It
1 should translate any relevant target-specific options (such as the
1 ABI in use) into one of the '-foffload' options that exist as a
1 common interface to express such options. It should return a
1 string containing these options, separated by spaces, which the
1 caller will free.
1
1 -- Macro: TARGET_SUPPORTS_WIDE_INT
1
1 On older ports, large integers are stored in 'CONST_DOUBLE' rtl
1 objects. Newer ports define 'TARGET_SUPPORTS_WIDE_INT' to be
1 nonzero to indicate that large integers are stored in
1 'CONST_WIDE_INT' rtl objects. The 'CONST_WIDE_INT' allows very
1 large integer constants to be represented. 'CONST_DOUBLE' is
1 limited to twice the size of the host's 'HOST_WIDE_INT'
1 representation.
1
1 Converting a port mostly requires looking for the places where
1 'CONST_DOUBLE's are used with 'VOIDmode' and replacing that code
1 with code that accesses 'CONST_WIDE_INT's. '"grep -i
1 const_double"' at the port level gets you to 95% of the changes
1 that need to be made. There are a few places that require a deeper
1 look.
1
1 * There is no equivalent to 'hval' and 'lval' for
1 'CONST_WIDE_INT's. This would be difficult to express in the
1 md language since there are a variable number of elements.
1
1 Most ports only check that 'hval' is either 0 or -1 to see if
1 the value is small. As mentioned above, this will no longer
1 be necessary since small constants are always 'CONST_INT'. Of
1 course there are still a few exceptions, the alpha's
1 constraint used by the zap instruction certainly requires
1 careful examination by C code. However, all the current code
1 does is pass the hval and lval to C code, so evolving the c
1 code to look at the 'CONST_WIDE_INT' is not really a large
1 change.
1
1 * Because there is no standard template that ports use to
1 materialize constants, there is likely to be some futzing that
1 is unique to each port in this code.
1
1 * The rtx costs may have to be adjusted to properly account for
1 larger constants that are represented as 'CONST_WIDE_INT'.
1
1 All and all it does not take long to convert ports that the
1 maintainer is familiar with.
1
1 -- Target Hook: void TARGET_RUN_TARGET_SELFTESTS (void)
1 If selftests are enabled, run any selftests for this target.
1