Mercurial > hg > CbC > CbC_gcc
comparison gcc/target.def @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* Target hook definitions. | 1 /* Target hook definitions. |
2 Copyright (C) 2001-2017 Free Software Foundation, Inc. | 2 Copyright (C) 2001-2018 Free Software Foundation, Inc. |
3 | 3 |
4 This program is free software; you can redistribute it and/or modify it | 4 This program is free software; you can redistribute it and/or modify it |
5 under the terms of the GNU General Public License as published by the | 5 under the terms of the GNU General Public License as published by the |
6 Free Software Foundation; either version 3, or (at your option) any | 6 Free Software Foundation; either version 3, or (at your option) any |
7 later version. | 7 later version. |
63 the string should contain a tab, a pseudo-op, and then another tab.", | 63 the string should contain a tab, a pseudo-op, and then another tab.", |
64 const char *, "\t.byte\t") | 64 const char *, "\t.byte\t") |
65 DEFHOOKPOD (aligned_op, "*", struct asm_int_op, TARGET_ASM_ALIGNED_INT_OP) | 65 DEFHOOKPOD (aligned_op, "*", struct asm_int_op, TARGET_ASM_ALIGNED_INT_OP) |
66 DEFHOOKPOD (unaligned_op, "*", struct asm_int_op, TARGET_ASM_UNALIGNED_INT_OP) | 66 DEFHOOKPOD (unaligned_op, "*", struct asm_int_op, TARGET_ASM_UNALIGNED_INT_OP) |
67 | 67 |
68 /* The maximum number of bytes to skip when applying | |
69 LABEL_ALIGN_AFTER_BARRIER. */ | |
70 DEFHOOK | |
71 (label_align_after_barrier_max_skip, | |
72 "The maximum number of bytes to skip before @var{label} when applying\n\ | |
73 @code{LABEL_ALIGN_AFTER_BARRIER}. This works only if\n\ | |
74 @code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.", | |
75 int, (rtx_insn *label), | |
76 default_label_align_after_barrier_max_skip) | |
77 | |
78 /* The maximum number of bytes to skip when applying | |
79 LOOP_ALIGN. */ | |
80 DEFHOOK | |
81 (loop_align_max_skip, | |
82 "The maximum number of bytes to skip when applying @code{LOOP_ALIGN} to\n\ | |
83 @var{label}. This works only if @code{ASM_OUTPUT_MAX_SKIP_ALIGN} is\n\ | |
84 defined.", | |
85 int, (rtx_insn *label), | |
86 default_loop_align_max_skip) | |
87 | |
88 /* The maximum number of bytes to skip when applying | |
89 LABEL_ALIGN. */ | |
90 DEFHOOK | |
91 (label_align_max_skip, | |
92 "The maximum number of bytes to skip when applying @code{LABEL_ALIGN}\n\ | |
93 to @var{label}. This works only if @code{ASM_OUTPUT_MAX_SKIP_ALIGN}\n\ | |
94 is defined.", | |
95 int, (rtx_insn *label), | |
96 default_label_align_max_skip) | |
97 | |
98 /* The maximum number of bytes to skip when applying | |
99 JUMP_ALIGN. */ | |
100 DEFHOOK | |
101 (jump_align_max_skip, | |
102 "The maximum number of bytes to skip before @var{label} when applying\n\ | |
103 @code{JUMP_ALIGN}. This works only if\n\ | |
104 @code{ASM_OUTPUT_MAX_SKIP_ALIGN} is defined.", | |
105 int, (rtx_insn *label), | |
106 default_jump_align_max_skip) | |
107 | |
108 /* Try to output the assembler code for an integer object whose | 68 /* Try to output the assembler code for an integer object whose |
109 value is given by X. SIZE is the size of the object in bytes and | 69 value is given by X. SIZE is the size of the object in bytes and |
110 ALIGNED_P indicates whether it is aligned. Return true if | 70 ALIGNED_P indicates whether it is aligned. Return true if |
111 successful. Only handles cases for which BYTE_OP, ALIGNED_OP | 71 successful. Only handles cases for which BYTE_OP, ALIGNED_OP |
112 and UNALIGNED_OP are NULL. */ | 72 and UNALIGNED_OP are NULL. */ |
505 when the target cannot support (some kinds of) dynamic relocations\n\ | 465 when the target cannot support (some kinds of) dynamic relocations\n\ |
506 in read-only sections even in executables.", | 466 in read-only sections even in executables.", |
507 int, (void), | 467 int, (void), |
508 default_reloc_rw_mask) | 468 default_reloc_rw_mask) |
509 | 469 |
470 /* Return a flag for either generating ADDR_DIF_VEC table | |
471 or ADDR_VEC table for jumps in case of -fPIC/-fPIE. */ | |
472 DEFHOOK | |
473 (generate_pic_addr_diff_vec, | |
474 "Return true to generate ADDR_DIF_VEC table\n\ | |
475 or false to generate ADDR_VEC table for jumps in case of -fPIC.\n\ | |
476 \n\ | |
477 The default version of this function returns true if flag_pic\n\ | |
478 equals true and false otherwise", | |
479 bool, (void), | |
480 default_generate_pic_addr_diff_vec) | |
481 | |
510 /* Return a section for EXP. It may be a DECL or a constant. RELOC | 482 /* Return a section for EXP. It may be a DECL or a constant. RELOC |
511 is nonzero if runtime relocations must be applied; bit 1 will be | 483 is nonzero if runtime relocations must be applied; bit 1 will be |
512 set if the runtime relocations require non-local name resolution. | 484 set if the runtime relocations require non-local name resolution. |
513 ALIGN is the required alignment of the data. */ | 485 ALIGN is the required alignment of the data. */ |
514 DEFHOOK | 486 DEFHOOK |
874 void, (FILE *f), | 846 void, (FILE *f), |
875 NULL) | 847 NULL) |
876 | 848 |
877 DEFHOOK | 849 DEFHOOK |
878 (output_source_filename, | 850 (output_source_filename, |
879 "Output COFF information or DWARF debugging information which indicates\ | 851 "Output DWARF debugging information which indicates that filename\ |
880 that filename @var{name} is the current source file to the stdio\ | 852 @var{name} is the current source file to the stdio stream @var{file}.\n\ |
881 stream @var{file}.\n\ | |
882 \n\ | 853 \n\ |
883 This target hook need not be defined if the standard form of output\ | 854 This target hook need not be defined if the standard form of output\ |
884 for the file format in use is appropriate.", | 855 for the file format in use is appropriate.", |
885 void ,(FILE *file, const char *name), | 856 void ,(FILE *file, const char *name), |
886 default_asm_output_source_filename) | 857 default_asm_output_source_filename) |
1636 the hook implementation for how different fusion types are supported.", | 1607 the hook implementation for how different fusion types are supported.", |
1637 void, (rtx_insn *insn, int max_pri, int *fusion_pri, int *pri), NULL) | 1608 void, (rtx_insn *insn, int max_pri, int *fusion_pri, int *pri), NULL) |
1638 | 1609 |
1639 HOOK_VECTOR_END (sched) | 1610 HOOK_VECTOR_END (sched) |
1640 | 1611 |
1641 /* Functions relating to OpenMP and Cilk Plus SIMD clones. */ | 1612 /* Functions relating to OpenMP SIMD and __attribute__((simd)) clones. */ |
1642 #undef HOOK_PREFIX | 1613 #undef HOOK_PREFIX |
1643 #define HOOK_PREFIX "TARGET_SIMD_CLONE_" | 1614 #define HOOK_PREFIX "TARGET_SIMD_CLONE_" |
1644 HOOK_VECTOR (TARGET_SIMD_CLONE, simd_clone) | 1615 HOOK_VECTOR (TARGET_SIMD_CLONE, simd_clone) |
1645 | 1616 |
1646 DEFHOOK | 1617 DEFHOOK |
1840 (vector_alignment_reachable, | 1811 (vector_alignment_reachable, |
1841 "Return true if vector alignment is reachable (by peeling N iterations) for the given scalar type @var{type}. @var{is_packed} is false if the scalar access using @var{type} is known to be naturally aligned.", | 1812 "Return true if vector alignment is reachable (by peeling N iterations) for the given scalar type @var{type}. @var{is_packed} is false if the scalar access using @var{type} is known to be naturally aligned.", |
1842 bool, (const_tree type, bool is_packed), | 1813 bool, (const_tree type, bool is_packed), |
1843 default_builtin_vector_alignment_reachable) | 1814 default_builtin_vector_alignment_reachable) |
1844 | 1815 |
1845 /* Return true if a vector created for vec_perm_const is valid. | 1816 DEFHOOK |
1846 A NULL indicates that all constants are valid permutations. */ | 1817 (vec_perm_const, |
1847 DEFHOOK | 1818 "This hook is used to test whether the target can permute up to two\n\ |
1848 (vec_perm_const_ok, | 1819 vectors of mode @var{mode} using the permutation vector @code{sel}, and\n\ |
1849 "Return true if a vector created for @code{vec_perm_const} is valid.", | 1820 also to emit such a permutation. In the former case @var{in0}, @var{in1}\n\ |
1850 bool, (machine_mode, vec_perm_indices), | 1821 and @var{out} are all null. In the latter case @var{in0} and @var{in1} are\n\ |
1822 the source vectors and @var{out} is the destination vector; all three are\n\ | |
1823 registers of mode @var{mode}. @var{in1} is the same as @var{in0} if\n\ | |
1824 @var{sel} describes a permutation on one vector instead of two.\n\ | |
1825 \n\ | |
1826 Return true if the operation is possible, emitting instructions for it\n\ | |
1827 if rtxes are provided.\n\ | |
1828 \n\ | |
1829 @cindex @code{vec_perm@var{m}} instruction pattern\n\ | |
1830 If the hook returns false for a mode with multibyte elements, GCC will\n\ | |
1831 try the equivalent byte operation. If that also fails, it will try forcing\n\ | |
1832 the selector into a register and using the @var{vec_perm@var{mode}}\n\ | |
1833 instruction pattern. There is no need for the hook to handle these two\n\ | |
1834 implementation approaches itself.", | |
1835 bool, (machine_mode mode, rtx output, rtx in0, rtx in1, | |
1836 const vec_perm_indices &sel), | |
1851 NULL) | 1837 NULL) |
1852 | 1838 |
1853 /* Return true if the target supports misaligned store/load of a | 1839 /* Return true if the target supports misaligned store/load of a |
1854 specific factor denoted in the third parameter. The last parameter | 1840 specific factor denoted in the third parameter. The last parameter |
1855 is true if the access is defined in a packed struct. */ | 1841 is true if the access is defined in a packed struct. */ |
1874 transformations even in absence of specialized @acronym{SIMD} hardware.", | 1860 transformations even in absence of specialized @acronym{SIMD} hardware.", |
1875 machine_mode, | 1861 machine_mode, |
1876 (scalar_mode mode), | 1862 (scalar_mode mode), |
1877 default_preferred_simd_mode) | 1863 default_preferred_simd_mode) |
1878 | 1864 |
1865 /* Returns the preferred mode for splitting SIMD reductions to. */ | |
1866 DEFHOOK | |
1867 (split_reduction, | |
1868 "This hook should return the preferred mode to split the final reduction\n\ | |
1869 step on @var{mode} to. The reduction is then carried out reducing upper\n\ | |
1870 against lower halves of vectors recursively until the specified mode is\n\ | |
1871 reached. The default is @var{mode} which means no splitting.", | |
1872 machine_mode, | |
1873 (machine_mode), | |
1874 default_split_reduction) | |
1875 | |
1879 /* Returns a mask of vector sizes to iterate over when auto-vectorizing | 1876 /* Returns a mask of vector sizes to iterate over when auto-vectorizing |
1880 after processing the preferred one derived from preferred_simd_mode. */ | 1877 after processing the preferred one derived from preferred_simd_mode. */ |
1881 DEFHOOK | 1878 DEFHOOK |
1882 (autovectorize_vector_sizes, | 1879 (autovectorize_vector_sizes, |
1883 "This hook should return a mask of sizes that should be iterated over\n\ | 1880 "If the mode returned by @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE} is not\n\ |
1884 after trying to autovectorize using the vector size derived from the\n\ | 1881 the only one that is worth considering, this hook should add all suitable\n\ |
1885 mode returned by @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE}.\n\ | 1882 vector sizes to @var{sizes}, in order of decreasing preference. The first\n\ |
1886 The default is zero which means to not iterate over other vector sizes.", | 1883 one should be the size of @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE}.\n\ |
1887 unsigned int, | 1884 \n\ |
1888 (void), | 1885 The hook does not need to do anything if the vector returned by\n\ |
1886 @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE} is the only one relevant\n\ | |
1887 for autovectorization. The default implementation does nothing.", | |
1888 void, | |
1889 (vector_sizes *sizes), | |
1889 default_autovectorize_vector_sizes) | 1890 default_autovectorize_vector_sizes) |
1890 | 1891 |
1891 /* Function to get a target mode for a vector mask. */ | 1892 /* Function to get a target mode for a vector mask. */ |
1892 DEFHOOK | 1893 DEFHOOK |
1893 (get_mask_mode, | 1894 (get_mask_mode, |
1899 \n\ | 1900 \n\ |
1900 The default implementation returns the mode of an integer vector that\n\ | 1901 The default implementation returns the mode of an integer vector that\n\ |
1901 is @var{length} bytes long and that contains @var{nunits} elements,\n\ | 1902 is @var{length} bytes long and that contains @var{nunits} elements,\n\ |
1902 if such a mode exists.", | 1903 if such a mode exists.", |
1903 opt_machine_mode, | 1904 opt_machine_mode, |
1904 (unsigned nunits, unsigned length), | 1905 (poly_uint64 nunits, poly_uint64 length), |
1905 default_get_mask_mode) | 1906 default_get_mask_mode) |
1907 | |
1908 /* Function to say whether a masked operation is expensive when the | |
1909 mask is all zeros. */ | |
1910 DEFHOOK | |
1911 (empty_mask_is_expensive, | |
1912 "This hook returns true if masked internal function @var{ifn} (really of\n\ | |
1913 type @code{internal_fn}) should be considered expensive when the mask is\n\ | |
1914 all zeros. GCC can then try to branch around the instruction instead.", | |
1915 bool, | |
1916 (unsigned ifn), | |
1917 default_empty_mask_is_expensive) | |
1906 | 1918 |
1907 /* Target builtin that implements vector gather operation. */ | 1919 /* Target builtin that implements vector gather operation. */ |
1908 DEFHOOK | 1920 DEFHOOK |
1909 (builtin_gather, | 1921 (builtin_gather, |
1910 "Target builtin that implements vector gather operation. @var{mem_vectype}\n\ | 1922 "Target builtin that implements vector gather operation. @var{mem_vectype}\n\ |
1986 | 1998 |
1987 #undef HOOK_PREFIX | 1999 #undef HOOK_PREFIX |
1988 #define HOOK_PREFIX "TARGET_" | 2000 #define HOOK_PREFIX "TARGET_" |
1989 | 2001 |
1990 DEFHOOK | 2002 DEFHOOK |
2003 (preferred_else_value, | |
2004 "This hook returns the target's preferred final argument for a call\n\ | |
2005 to conditional internal function @var{ifn} (really of type\n\ | |
2006 @code{internal_fn}). @var{type} specifies the return type of the\n\ | |
2007 function and @var{ops} are the operands to the conditional operation,\n\ | |
2008 of which there are @var{nops}.\n\ | |
2009 \n\ | |
2010 For example, if @var{ifn} is @code{IFN_COND_ADD}, the hook returns\n\ | |
2011 a value of type @var{type} that should be used when @samp{@var{ops}[0]}\n\ | |
2012 and @samp{@var{ops}[1]} are conditionally added together.\n\ | |
2013 \n\ | |
2014 This hook is only relevant if the target supports conditional patterns\n\ | |
2015 like @code{cond_add@var{m}}. The default implementation returns a zero\n\ | |
2016 constant of type @var{type}.", | |
2017 tree, | |
2018 (unsigned ifn, tree type, unsigned nops, tree *ops), | |
2019 default_preferred_else_value) | |
2020 | |
2021 DEFHOOK | |
1991 (record_offload_symbol, | 2022 (record_offload_symbol, |
1992 "Used when offloaded functions are seen in the compilation unit and no named\n\ | 2023 "Used when offloaded functions are seen in the compilation unit and no named\n\ |
1993 sections are available. It is called once for each symbol that must be\n\ | 2024 sections are available. It is called once for each symbol that must be\n\ |
1994 recorded in the offload function and variable table.", | 2025 recorded in the offload function and variable table.", |
1995 void, (tree), | 2026 void, (tree), |
2314 ignored. This function should return the result of the call to the\n\ | 2345 ignored. This function should return the result of the call to the\n\ |
2315 built-in function.", | 2346 built-in function.", |
2316 rtx, | 2347 rtx, |
2317 (tree exp, rtx target, rtx subtarget, machine_mode mode, int ignore), | 2348 (tree exp, rtx target, rtx subtarget, machine_mode mode, int ignore), |
2318 default_expand_builtin) | 2349 default_expand_builtin) |
2319 | |
2320 DEFHOOK | |
2321 (builtin_chkp_function, | |
2322 "This hook allows target to redefine built-in functions used by\n\ | |
2323 Pointer Bounds Checker for code instrumentation. Hook should return\n\ | |
2324 fndecl of function implementing generic builtin whose code is\n\ | |
2325 passed in @var{fcode}. Currently following built-in functions are\n\ | |
2326 obtained using this hook:\n\ | |
2327 @deftypefn {Built-in Function} __bounds_type __chkp_bndmk (const void *@var{lb}, size_t @var{size})\n\ | |
2328 Function code - BUILT_IN_CHKP_BNDMK. This built-in function is used\n\ | |
2329 by Pointer Bounds Checker to create bound values. @var{lb} holds low\n\ | |
2330 bound of the resulting bounds. @var{size} holds size of created bounds.\n\ | |
2331 @end deftypefn\n\ | |
2332 \n\ | |
2333 @deftypefn {Built-in Function} void __chkp_bndstx (const void *@var{ptr}, __bounds_type @var{b}, const void **@var{loc})\n\ | |
2334 Function code - @code{BUILT_IN_CHKP_BNDSTX}. This built-in function is used\n\ | |
2335 by Pointer Bounds Checker to store bounds @var{b} for pointer @var{ptr}\n\ | |
2336 when @var{ptr} is stored by address @var{loc}.\n\ | |
2337 @end deftypefn\n\ | |
2338 \n\ | |
2339 @deftypefn {Built-in Function} __bounds_type __chkp_bndldx (const void **@var{loc}, const void *@var{ptr})\n\ | |
2340 Function code - @code{BUILT_IN_CHKP_BNDLDX}. This built-in function is used\n\ | |
2341 by Pointer Bounds Checker to get bounds of pointer @var{ptr} loaded by\n\ | |
2342 address @var{loc}.\n\ | |
2343 @end deftypefn\n\ | |
2344 \n\ | |
2345 @deftypefn {Built-in Function} void __chkp_bndcl (const void *@var{ptr}, __bounds_type @var{b})\n\ | |
2346 Function code - @code{BUILT_IN_CHKP_BNDCL}. This built-in function is used\n\ | |
2347 by Pointer Bounds Checker to perform check for pointer @var{ptr} against\n\ | |
2348 lower bound of bounds @var{b}.\n\ | |
2349 @end deftypefn\n\ | |
2350 \n\ | |
2351 @deftypefn {Built-in Function} void __chkp_bndcu (const void *@var{ptr}, __bounds_type @var{b})\n\ | |
2352 Function code - @code{BUILT_IN_CHKP_BNDCU}. This built-in function is used\n\ | |
2353 by Pointer Bounds Checker to perform check for pointer @var{ptr} against\n\ | |
2354 upper bound of bounds @var{b}.\n\ | |
2355 @end deftypefn\n\ | |
2356 \n\ | |
2357 @deftypefn {Built-in Function} __bounds_type __chkp_bndret (void *@var{ptr})\n\ | |
2358 Function code - @code{BUILT_IN_CHKP_BNDRET}. This built-in function is used\n\ | |
2359 by Pointer Bounds Checker to obtain bounds returned by a call statement.\n\ | |
2360 @var{ptr} passed to built-in is @code{SSA_NAME} returned by the call.\n\ | |
2361 @end deftypefn\n\ | |
2362 \n\ | |
2363 @deftypefn {Built-in Function} __bounds_type __chkp_intersect (__bounds_type @var{b1}, __bounds_type @var{b2})\n\ | |
2364 Function code - @code{BUILT_IN_CHKP_INTERSECT}. This built-in function\n\ | |
2365 returns intersection of bounds @var{b1} and @var{b2}.\n\ | |
2366 @end deftypefn\n\ | |
2367 \n\ | |
2368 @deftypefn {Built-in Function} __bounds_type __chkp_narrow (const void *@var{ptr}, __bounds_type @var{b}, size_t @var{s})\n\ | |
2369 Function code - @code{BUILT_IN_CHKP_NARROW}. This built-in function\n\ | |
2370 returns intersection of bounds @var{b} and\n\ | |
2371 [@var{ptr}, @var{ptr} + @var{s} - @code{1}].\n\ | |
2372 @end deftypefn\n\ | |
2373 \n\ | |
2374 @deftypefn {Built-in Function} size_t __chkp_sizeof (const void *@var{ptr})\n\ | |
2375 Function code - @code{BUILT_IN_CHKP_SIZEOF}. This built-in function\n\ | |
2376 returns size of object referenced by @var{ptr}. @var{ptr} is always\n\ | |
2377 @code{ADDR_EXPR} of @code{VAR_DECL}. This built-in is used by\n\ | |
2378 Pointer Bounds Checker when bounds of object cannot be computed statically\n\ | |
2379 (e.g. object has incomplete type).\n\ | |
2380 @end deftypefn\n\ | |
2381 \n\ | |
2382 @deftypefn {Built-in Function} const void *__chkp_extract_lower (__bounds_type @var{b})\n\ | |
2383 Function code - @code{BUILT_IN_CHKP_EXTRACT_LOWER}. This built-in function\n\ | |
2384 returns lower bound of bounds @var{b}.\n\ | |
2385 @end deftypefn\n\ | |
2386 \n\ | |
2387 @deftypefn {Built-in Function} const void *__chkp_extract_upper (__bounds_type @var{b})\n\ | |
2388 Function code - @code{BUILT_IN_CHKP_EXTRACT_UPPER}. This built-in function\n\ | |
2389 returns upper bound of bounds @var{b}.\n\ | |
2390 @end deftypefn", | |
2391 tree, (unsigned fcode), | |
2392 default_builtin_chkp_function) | |
2393 | |
2394 DEFHOOK | |
2395 (chkp_bound_type, | |
2396 "Return type to be used for bounds", | |
2397 tree, (void), | |
2398 default_chkp_bound_type) | |
2399 | |
2400 DEFHOOK | |
2401 (chkp_bound_mode, | |
2402 "Return mode to be used for bounds.", | |
2403 machine_mode, (void), | |
2404 default_chkp_bound_mode) | |
2405 | |
2406 DEFHOOK | |
2407 (chkp_make_bounds_constant, | |
2408 "Return constant used to statically initialize constant bounds\n\ | |
2409 with specified lower bound @var{lb} and upper bounds @var{ub}.", | |
2410 tree, (HOST_WIDE_INT lb, HOST_WIDE_INT ub), | |
2411 default_chkp_make_bounds_constant) | |
2412 | |
2413 DEFHOOK | |
2414 (chkp_initialize_bounds, | |
2415 "Generate a list of statements @var{stmts} to initialize pointer\n\ | |
2416 bounds variable @var{var} with bounds @var{lb} and @var{ub}. Return\n\ | |
2417 the number of generated statements.", | |
2418 int, (tree var, tree lb, tree ub, tree *stmts), | |
2419 default_chkp_initialize_bounds) | |
2420 | 2350 |
2421 /* Select a replacement for a target-specific builtin. This is done | 2351 /* Select a replacement for a target-specific builtin. This is done |
2422 *before* regular type checking, and so allows the target to | 2352 *before* regular type checking, and so allows the target to |
2423 implement a crude form of function overloading. The result is a | 2353 implement a crude form of function overloading. The result is a |
2424 complete expression that implements the operation. PARAMS really | 2354 complete expression that implements the operation. PARAMS really |
3153 is correct for most machines.\n\ | 3083 is correct for most machines.\n\ |
3154 \n\ | 3084 \n\ |
3155 If @code{TARGET_MODES_TIEABLE_P} returns false for a pair of modes,\n\ | 3085 If @code{TARGET_MODES_TIEABLE_P} returns false for a pair of modes,\n\ |
3156 suboptimal code can result if this hook returns true for the corresponding\n\ | 3086 suboptimal code can result if this hook returns true for the corresponding\n\ |
3157 mode sizes. Making this hook return false in such cases may improve things.", | 3087 mode sizes. Making this hook return false in such cases may improve things.", |
3158 bool, (unsigned int outprec, unsigned int inprec), | 3088 bool, (poly_uint64 outprec, poly_uint64 inprec), |
3159 hook_bool_uint_uint_true) | 3089 hook_bool_puint64_puint64_true) |
3160 | 3090 |
3161 /* If the representation of integral MODE is such that values are | 3091 /* If the representation of integral MODE is such that values are |
3162 always sign-extended to a wider mode MODE_REP then return | 3092 always sign-extended to a wider mode MODE_REP then return |
3163 SIGN_EXTEND. Return UNKNOWN otherwise. */ | 3093 SIGN_EXTEND. Return UNKNOWN otherwise. */ |
3164 /* Note that the return type ought to be RTX_CODE, but that's not | 3094 /* Note that the return type ought to be RTX_CODE, but that's not |
3191 @code{TARGET_TRULY_NOOP_TRUNCATION} should return false when truncating to\n\ | 3121 @code{TARGET_TRULY_NOOP_TRUNCATION} should return false when truncating to\n\ |
3192 @code{mode}.", | 3122 @code{mode}.", |
3193 int, (scalar_int_mode mode, scalar_int_mode rep_mode), | 3123 int, (scalar_int_mode mode, scalar_int_mode rep_mode), |
3194 default_mode_rep_extended) | 3124 default_mode_rep_extended) |
3195 | 3125 |
3126 DEFHOOK | |
3127 (setjmp_preserves_nonvolatile_regs_p, | |
3128 "On some targets, it is assumed that the compiler will spill all pseudos\n\ | |
3129 that are live across a call to @code{setjmp}, while other targets treat\n\ | |
3130 @code{setjmp} calls as normal function calls.\n\ | |
3131 \n\ | |
3132 This hook returns false if @code{setjmp} calls do not preserve all\n\ | |
3133 non-volatile registers so that gcc that must spill all pseudos that are\n\ | |
3134 live across @code{setjmp} calls. Define this to return true if the\n\ | |
3135 target does not need to spill all pseudos live across @code{setjmp} calls.\n\ | |
3136 The default implementation conservatively assumes all pseudos must be\n\ | |
3137 spilled across @code{setjmp} calls.", | |
3138 bool, (void), | |
3139 hook_bool_void_false) | |
3140 | |
3196 /* True if MODE is valid for a pointer in __attribute__((mode("MODE"))). */ | 3141 /* True if MODE is valid for a pointer in __attribute__((mode("MODE"))). */ |
3197 DEFHOOK | 3142 DEFHOOK |
3198 (valid_pointer_mode, | 3143 (valid_pointer_mode, |
3199 "Define this to return nonzero if the port can handle pointers\n\ | 3144 "Define this to return nonzero if the port can handle pointers\n\ |
3200 with machine mode @var{mode}. The default version of this\n\ | 3145 with machine mode @var{mode}. The default version of this\n\ |
3357 constants can be done inline. The function\n\ | 3302 constants can be done inline. The function\n\ |
3358 @code{constant_alignment_word_strings} provides such a definition.", | 3303 @code{constant_alignment_word_strings} provides such a definition.", |
3359 HOST_WIDE_INT, (const_tree constant, HOST_WIDE_INT basic_align), | 3304 HOST_WIDE_INT, (const_tree constant, HOST_WIDE_INT basic_align), |
3360 default_constant_alignment) | 3305 default_constant_alignment) |
3361 | 3306 |
3307 DEFHOOK | |
3308 (translate_mode_attribute, | |
3309 "Define this hook if during mode attribute processing, the port should\n\ | |
3310 translate machine_mode @var{mode} to another mode. For example, rs6000's\n\ | |
3311 @code{KFmode}, when it is the same as @code{TFmode}.\n\ | |
3312 \n\ | |
3313 The default version of the hook returns that mode that was passed in.", | |
3314 machine_mode, (machine_mode mode), | |
3315 default_translate_mode_attribute) | |
3316 | |
3362 /* True if MODE is valid for the target. By "valid", we mean able to | 3317 /* True if MODE is valid for the target. By "valid", we mean able to |
3363 be manipulated in non-trivial ways. In particular, this means all | 3318 be manipulated in non-trivial ways. In particular, this means all |
3364 the arithmetic is supported. */ | 3319 the arithmetic is supported. */ |
3365 DEFHOOK | 3320 DEFHOOK |
3366 (scalar_mode_supported_p, | 3321 (scalar_mode_supported_p, |
3394 require natural alignment for vector types. The alignment returned by\n\ | 3349 require natural alignment for vector types. The alignment returned by\n\ |
3395 this hook must be a power-of-two multiple of the default alignment of\n\ | 3350 this hook must be a power-of-two multiple of the default alignment of\n\ |
3396 the vector element type.", | 3351 the vector element type.", |
3397 HOST_WIDE_INT, (const_tree type), | 3352 HOST_WIDE_INT, (const_tree type), |
3398 default_vector_alignment) | 3353 default_vector_alignment) |
3354 | |
3355 DEFHOOK | |
3356 (array_mode, | |
3357 "Return the mode that GCC should use for an array that has\n\ | |
3358 @var{nelems} elements, with each element having mode @var{mode}.\n\ | |
3359 Return no mode if the target has no special requirements. In the\n\ | |
3360 latter case, GCC looks for an integer mode of the appropriate size\n\ | |
3361 if available and uses BLKmode otherwise. Usually the search for the\n\ | |
3362 integer mode is limited to @code{MAX_FIXED_MODE_SIZE}, but the\n\ | |
3363 @code{TARGET_ARRAY_MODE_SUPPORTED_P} hook allows a larger mode to be\n\ | |
3364 used in specific cases.\n\ | |
3365 \n\ | |
3366 The main use of this hook is to specify that an array of vectors should\n\ | |
3367 also have a vector mode. The default implementation returns no mode.", | |
3368 opt_machine_mode, (machine_mode mode, unsigned HOST_WIDE_INT nelems), | |
3369 hook_optmode_mode_uhwi_none) | |
3399 | 3370 |
3400 /* True if we should try to use a scalar mode to represent an array, | 3371 /* True if we should try to use a scalar mode to represent an array, |
3401 overriding the usual MAX_FIXED_MODE limit. */ | 3372 overriding the usual MAX_FIXED_MODE limit. */ |
3402 DEFHOOK | 3373 DEFHOOK |
3403 (array_mode_supported_p, | 3374 (array_mode_supported_p, |
3457 ISO/IEC TS 18661-3:2015; that is, @var{n} is one of 32, 64, 128, or,\n\ | 3428 ISO/IEC TS 18661-3:2015; that is, @var{n} is one of 32, 64, 128, or,\n\ |
3458 if @var{extended} is false, 16 or greater than 128 and a multiple of 32.", | 3429 if @var{extended} is false, 16 or greater than 128 and a multiple of 32.", |
3459 opt_scalar_float_mode, (int n, bool extended), | 3430 opt_scalar_float_mode, (int n, bool extended), |
3460 default_floatn_mode) | 3431 default_floatn_mode) |
3461 | 3432 |
3433 DEFHOOK | |
3434 (floatn_builtin_p, | |
3435 "Define this to return true if the @code{_Float@var{n}} and\n\ | |
3436 @code{_Float@var{n}x} built-in functions should implicitly enable the\n\ | |
3437 built-in function without the @code{__builtin_} prefix in addition to the\n\ | |
3438 normal built-in function with the @code{__builtin_} prefix. The default is\n\ | |
3439 to only enable built-in functions without the @code{__builtin_} prefix for\n\ | |
3440 the GNU C langauge. In strict ANSI/ISO mode, the built-in function without\n\ | |
3441 the @code{__builtin_} prefix is not enabled. The argument @code{FUNC} is the\n\ | |
3442 @code{enum built_in_function} id of the function to be enabled.", | |
3443 bool, (int func), | |
3444 default_floatn_builtin_p) | |
3445 | |
3462 /* Compute cost of moving data from a register of class FROM to one of | 3446 /* Compute cost of moving data from a register of class FROM to one of |
3463 TO, using MODE. */ | 3447 TO, using MODE. */ |
3464 DEFHOOK | 3448 DEFHOOK |
3465 (register_move_cost, | 3449 (register_move_cost, |
3466 "This target hook should return the cost of moving data of mode @var{mode}\n\ | 3450 "This target hook should return the cost of moving data of mode @var{mode}\n\ |
3769 "This hook returns true if the instruction sequence @code{seq} is a good\n\ | 3753 "This hook returns true if the instruction sequence @code{seq} is a good\n\ |
3770 candidate as a replacement for the if-convertible sequence described in\n\ | 3754 candidate as a replacement for the if-convertible sequence described in\n\ |
3771 @code{if_info}.", | 3755 @code{if_info}.", |
3772 bool, (rtx_insn *seq, struct noce_if_info *if_info), | 3756 bool, (rtx_insn *seq, struct noce_if_info *if_info), |
3773 default_noce_conversion_profitable_p) | 3757 default_noce_conversion_profitable_p) |
3758 | |
3759 DEFHOOK | |
3760 (estimated_poly_value, | |
3761 "Return an estimate of the runtime value of @var{val}, for use in\n\ | |
3762 things like cost calculations or profiling frequencies. The default\n\ | |
3763 implementation returns the lowest possible value of @var{val}.", | |
3764 HOST_WIDE_INT, (poly_int64 val), | |
3765 default_estimated_poly_value) | |
3774 | 3766 |
3775 /* Permit speculative instructions in delay slots during delayed-branch | 3767 /* Permit speculative instructions in delay slots during delayed-branch |
3776 scheduling. */ | 3768 scheduling. */ |
3777 DEFHOOK | 3769 DEFHOOK |
3778 (no_speculation_in_delay_slots_p, | 3770 (no_speculation_in_delay_slots_p, |
4114 to let the backend emit the call frame instructions. @var{label} is\n\ | 4106 to let the backend emit the call frame instructions. @var{label} is\n\ |
4115 the CFI label attached to the insn, @var{pattern} is the pattern of\n\ | 4107 the CFI label attached to the insn, @var{pattern} is the pattern of\n\ |
4116 the insn and @var{index} is @code{UNSPEC_INDEX} or @code{UNSPECV_INDEX}.", | 4108 the insn and @var{index} is @code{UNSPEC_INDEX} or @code{UNSPECV_INDEX}.", |
4117 void, (const char *label, rtx pattern, int index), NULL) | 4109 void, (const char *label, rtx pattern, int index), NULL) |
4118 | 4110 |
4111 DEFHOOK | |
4112 (dwarf_poly_indeterminate_value, | |
4113 "Express the value of @code{poly_int} indeterminate @var{i} as a DWARF\n\ | |
4114 expression, with @var{i} counting from 1. Return the number of a DWARF\n\ | |
4115 register @var{R} and set @samp{*@var{factor}} and @samp{*@var{offset}} such\n\ | |
4116 that the value of the indeterminate is:\n\ | |
4117 @smallexample\n\ | |
4118 value_of(@var{R}) / @var{factor} - @var{offset}\n\ | |
4119 @end smallexample\n\ | |
4120 \n\ | |
4121 A target only needs to define this hook if it sets\n\ | |
4122 @samp{NUM_POLY_INT_COEFFS} to a value greater than 1.", | |
4123 unsigned int, (unsigned int i, unsigned int *factor, int *offset), | |
4124 default_dwarf_poly_indeterminate_value) | |
4125 | |
4119 /* ??? Documenting this hook requires a GFDL license grant. */ | 4126 /* ??? Documenting this hook requires a GFDL license grant. */ |
4120 DEFHOOK_UNDOC | 4127 DEFHOOK_UNDOC |
4121 (stdarg_optimize_hook, | 4128 (stdarg_optimize_hook, |
4122 "Perform architecture specific checking of statements gimplified\ | 4129 "Perform architecture specific checking of statements gimplified\ |
4123 from @code{VA_ARG_EXPR}. @var{stmt} is the statement. Returns true if\ | 4130 from @code{VA_ARG_EXPR}. @var{stmt} is the statement. Returns true if\ |
4160 (stack_protect_runtime_enabled_p, | 4167 (stack_protect_runtime_enabled_p, |
4161 "Returns true if the target wants GCC's default stack protect runtime support,\ | 4168 "Returns true if the target wants GCC's default stack protect runtime support,\ |
4162 otherwise return false. The default implementation always returns true.", | 4169 otherwise return false. The default implementation always returns true.", |
4163 bool, (void), | 4170 bool, (void), |
4164 hook_bool_void_true) | 4171 hook_bool_void_true) |
4172 | |
4173 DEFHOOK | |
4174 (have_speculation_safe_value, | |
4175 "This hook is used to determine the level of target support for\n\ | |
4176 @code{__builtin_speculation_safe_value}. If called with an argument\n\ | |
4177 of false, it returns true if the target has been modified to support\n\ | |
4178 this builtin. If called with an argument of true, it returns true\n\ | |
4179 if the target requires active mitigation execution might be speculative.\n\ | |
4180 \n\ | |
4181 The default implementation returns false if the target does not define\n\ | |
4182 a pattern named @code{speculation_barrier}. Else it returns true\n\ | |
4183 for the first case and whether the pattern is enabled for the current\n\ | |
4184 compilation for the second case.\n\ | |
4185 \n\ | |
4186 For targets that have no processors that can execute instructions\n\ | |
4187 speculatively an alternative implemenation of this hook is available:\n\ | |
4188 simply redefine this hook to @code{speculation_safe_value_not_needed}\n\ | |
4189 along with your other target hooks.", | |
4190 bool, (bool active), default_have_speculation_safe_value) | |
4191 | |
4192 DEFHOOK | |
4193 (speculation_safe_value, | |
4194 "This target hook can be used to generate a target-specific code\n\ | |
4195 sequence that implements the @code{__builtin_speculation_safe_value}\n\ | |
4196 built-in function. The function must always return @var{val} in\n\ | |
4197 @var{result} in mode @var{mode} when the cpu is not executing\n\ | |
4198 speculatively, but must never return that when speculating until it\n\ | |
4199 is known that the speculation will not be unwound. The hook supports\n\ | |
4200 two primary mechanisms for implementing the requirements. The first\n\ | |
4201 is to emit a speculation barrier which forces the processor to wait\n\ | |
4202 until all prior speculative operations have been resolved; the second\n\ | |
4203 is to use a target-specific mechanism that can track the speculation\n\ | |
4204 state and to return @var{failval} if it can determine that\n\ | |
4205 speculation must be unwound at a later time.\n\ | |
4206 \n\ | |
4207 The default implementation simply copies @var{val} to @var{result} and\n\ | |
4208 emits a @code{speculation_barrier} instruction if that is defined.", | |
4209 rtx, (machine_mode mode, rtx result, rtx val, rtx failval), | |
4210 default_speculation_safe_value) | |
4211 | |
4165 | 4212 |
4166 DEFHOOK | 4213 DEFHOOK |
4167 (can_use_doloop_p, | 4214 (can_use_doloop_p, |
4168 "Return true if it is possible to use low-overhead loops (@code{doloop_end}\n\ | 4215 "Return true if it is possible to use low-overhead loops (@code{doloop_end}\n\ |
4169 and @code{doloop_begin}) for a particular loop. @var{iterations} gives the\n\ | 4216 and @code{doloop_begin}) for a particular loop. @var{iterations} gives the\n\ |
4814 aggregate data types, because these are returned in another way. See\n\ | 4861 aggregate data types, because these are returned in another way. See\n\ |
4815 @code{TARGET_STRUCT_VALUE_RTX} and related macros, below.", | 4862 @code{TARGET_STRUCT_VALUE_RTX} and related macros, below.", |
4816 rtx, (const_tree ret_type, const_tree fn_decl_or_type, bool outgoing), | 4863 rtx, (const_tree ret_type, const_tree fn_decl_or_type, bool outgoing), |
4817 default_function_value) | 4864 default_function_value) |
4818 | 4865 |
4819 /* Return the rtx for bounds of returned pointer. */ | |
4820 DEFHOOK | |
4821 (chkp_function_value_bounds, | |
4822 "Define this to return an RTX representing the place where a function\n\ | |
4823 returns bounds for returned pointers. Arguments meaning is similar to\n\ | |
4824 @code{TARGET_FUNCTION_VALUE}.", | |
4825 rtx, (const_tree ret_type, const_tree fn_decl_or_type, bool outgoing), | |
4826 default_chkp_function_value_bounds) | |
4827 | |
4828 /* Return the rtx for the result of a libcall of mode MODE, | 4866 /* Return the rtx for the result of a libcall of mode MODE, |
4829 calling the function FN_NAME. */ | 4867 calling the function FN_NAME. */ |
4830 DEFHOOK | 4868 DEFHOOK |
4831 (libcall_value, | 4869 (libcall_value, |
4832 "Define this hook if the back-end needs to know the name of the libcall\n\ | 4870 "Define this hook if the back-end needs to know the name of the libcall\n\ |
4960 If this hook is not defined, @var{addr} will be used for function calls.", | 4998 If this hook is not defined, @var{addr} will be used for function calls.", |
4961 rtx, (rtx addr), NULL) | 4999 rtx, (rtx addr), NULL) |
4962 | 5000 |
4963 DEFHOOKPOD | 5001 DEFHOOKPOD |
4964 (custom_function_descriptors, | 5002 (custom_function_descriptors, |
4965 "This hook should be defined to a power of 2 if the target will benefit\n\ | 5003 "If the target can use GCC's generic descriptor mechanism for nested\n\ |
4966 from the use of custom descriptors for nested functions instead of the\n\ | 5004 functions, define this hook to a power of 2 representing an unused bit\n\ |
4967 standard trampolines. Such descriptors are created at run time on the\n\ | 5005 in function pointers which can be used to differentiate descriptors at\n\ |
4968 stack and made up of data only, but they are non-standard so the generated\n\ | 5006 run time. This value gives the number of bytes by which descriptor\n\ |
4969 code must be prepared to deal with them. This hook should be defined to 0\n\ | 5007 pointers are misaligned compared to function pointers. For example, on\n\ |
4970 if the target uses function descriptors for its standard calling sequence,\n\ | 5008 targets that require functions to be aligned to a 4-byte boundary, a\n\ |
4971 like for example HP-PA or IA-64. Using descriptors for nested functions\n\ | 5009 value of either 1 or 2 is appropriate unless the architecture already\n\ |
5010 reserves the bit for another purpose, such as on ARM.\n\ | |
5011 \n\ | |
5012 Define this hook to 0 if the target implements ABI support for\n\ | |
5013 function descriptors in its standard calling sequence, like for example\n\ | |
5014 HPPA or IA-64.\n\ | |
5015 \n\ | |
5016 Using descriptors for nested functions\n\ | |
4972 eliminates the need for trampolines that reside on the stack and require\n\ | 5017 eliminates the need for trampolines that reside on the stack and require\n\ |
4973 it to be made executable.\n\ | 5018 it to be made executable.",\ |
4974 \n\ | |
4975 The value of the macro is used to parameterize the run-time identification\n\ | |
4976 scheme implemented to distinguish descriptors from function addresses: it\n\ | |
4977 gives the number of bytes by which their address is misaligned compared\n\ | |
4978 with function addresses. The value of 1 will generally work, unless it is\n\ | |
4979 already reserved by the target for another purpose, like for example on ARM.",\ | |
4980 int, -1) | 5019 int, -1) |
4981 | 5020 |
4982 /* Return the number of bytes of its own arguments that a function | 5021 /* Return the number of bytes of its own arguments that a function |
4983 pops on returning, or 0 if the function pops no arguments and the | 5022 pops on returning, or 0 if the function pops no arguments and the |
4984 caller must therefore pop them all after the function returns. */ | 5023 caller must therefore pop them all after the function returns. */ |
5018 convention is available in which functions that take a fixed number of\n\ | 5057 convention is available in which functions that take a fixed number of\n\ |
5019 arguments pop them but other functions (such as @code{printf}) pop\n\ | 5058 arguments pop them but other functions (such as @code{printf}) pop\n\ |
5020 nothing (the caller pops all). When this convention is in use,\n\ | 5059 nothing (the caller pops all). When this convention is in use,\n\ |
5021 @var{funtype} is examined to determine whether a function takes a fixed\n\ | 5060 @var{funtype} is examined to determine whether a function takes a fixed\n\ |
5022 number of arguments.", | 5061 number of arguments.", |
5023 int, (tree fundecl, tree funtype, int size), | 5062 poly_int64, (tree fundecl, tree funtype, poly_int64 size), |
5024 default_return_pops_args) | 5063 default_return_pops_args) |
5025 | 5064 |
5026 /* Return a mode wide enough to copy any function value that might be | 5065 /* Return a mode wide enough to copy any function value that might be |
5027 returned. */ | 5066 returned. */ |
5028 DEFHOOK | 5067 DEFHOOK |
5029 (get_raw_result_mode, | 5068 (get_raw_result_mode, |
5030 "This target hook returns the mode to be used when accessing raw return\ | 5069 "This target hook returns the mode to be used when accessing raw return\ |
5031 registers in @code{__builtin_return}. Define this macro if the value\ | 5070 registers in @code{__builtin_return}. Define this macro if the value\ |
5032 in @var{reg_raw_mode} is not correct.", | 5071 in @var{reg_raw_mode} is not correct.", |
5033 machine_mode, (int regno), | 5072 fixed_size_mode, (int regno), |
5034 default_get_reg_raw_mode) | 5073 default_get_reg_raw_mode) |
5035 | 5074 |
5036 /* Return a mode wide enough to copy any argument value that might be | 5075 /* Return a mode wide enough to copy any argument value that might be |
5037 passed. */ | 5076 passed. */ |
5038 DEFHOOK | 5077 DEFHOOK |
5039 (get_raw_arg_mode, | 5078 (get_raw_arg_mode, |
5040 "This target hook returns the mode to be used when accessing raw argument\ | 5079 "This target hook returns the mode to be used when accessing raw argument\ |
5041 registers in @code{__builtin_apply_args}. Define this macro if the value\ | 5080 registers in @code{__builtin_apply_args}. Define this macro if the value\ |
5042 in @var{reg_raw_mode} is not correct.", | 5081 in @var{reg_raw_mode} is not correct.", |
5043 machine_mode, (int regno), | 5082 fixed_size_mode, (int regno), |
5044 default_get_reg_raw_mode) | 5083 default_get_reg_raw_mode) |
5084 | |
5085 /* Return true if a type is an empty record. */ | |
5086 DEFHOOK | |
5087 (empty_record_p, | |
5088 "This target hook returns true if the type is an empty record. The default\n\ | |
5089 is to return @code{false}.", | |
5090 bool, (const_tree type), | |
5091 hook_bool_const_tree_false) | |
5092 | |
5093 /* Warn about the change in empty class parameter passing ABI. */ | |
5094 DEFHOOK | |
5095 (warn_parameter_passing_abi, | |
5096 "This target hook warns about the change in empty class parameter passing\n\ | |
5097 ABI.", | |
5098 void, (cumulative_args_t ca, tree type), | |
5099 hook_void_CUMULATIVE_ARGS_tree) | |
5045 | 5100 |
5046 HOOK_VECTOR_END (calls) | 5101 HOOK_VECTOR_END (calls) |
5047 | 5102 |
5048 DEFHOOK | 5103 DEFHOOK |
5049 (use_pseudo_pic_reg, | 5104 (use_pseudo_pic_reg, |
5463 reg_class_t, | 5518 reg_class_t, |
5464 (rtx x, reg_class_t rclass), | 5519 (rtx x, reg_class_t rclass), |
5465 default_preferred_output_reload_class) | 5520 default_preferred_output_reload_class) |
5466 | 5521 |
5467 DEFHOOK | 5522 DEFHOOK |
5523 (select_early_remat_modes, | |
5524 "On some targets, certain modes cannot be held in registers around a\n\ | |
5525 standard ABI call and are relatively expensive to spill to the stack.\n\ | |
5526 The early rematerialization pass can help in such cases by aggressively\n\ | |
5527 recomputing values after calls, so that they don't need to be spilled.\n\ | |
5528 \n\ | |
5529 This hook returns the set of such modes by setting the associated bits\n\ | |
5530 in @var{modes}. The default implementation selects no modes, which has\n\ | |
5531 the effect of disabling the early rematerialization pass.", | |
5532 void, (sbitmap modes), | |
5533 default_select_early_remat_modes) | |
5534 | |
5535 DEFHOOK | |
5468 (class_likely_spilled_p, | 5536 (class_likely_spilled_p, |
5469 "A target hook which returns @code{true} if pseudos that have been assigned\n\ | 5537 "A target hook which returns @code{true} if pseudos that have been assigned\n\ |
5470 to registers of class @var{rclass} would likely be spilled because\n\ | 5538 to registers of class @var{rclass} would likely be spilled because\n\ |
5471 registers of @var{rclass} are needed for spill registers.\n\ | 5539 registers of @var{rclass} are needed for spill registers.\n\ |
5472 \n\ | 5540 \n\ |
5534 | 5602 |
5535 /* This target hook allows the backend to legitimize base plus | 5603 /* This target hook allows the backend to legitimize base plus |
5536 displacement addressing. */ | 5604 displacement addressing. */ |
5537 DEFHOOK | 5605 DEFHOOK |
5538 (legitimize_address_displacement, | 5606 (legitimize_address_displacement, |
5539 "A target hook which returns @code{true} if *@var{disp} is\n\ | 5607 "This hook tries to split address offset @var{orig_offset} into\n\ |
5540 legitimezed to valid address displacement with subtracting *@var{offset}\n\ | 5608 two parts: one that should be added to the base address to create\n\ |
5541 at memory mode @var{mode}.\n\ | 5609 a local anchor point, and an additional offset that can be applied\n\ |
5542 The default version of this target hook returns @code{false}.\n\ | 5610 to the anchor to address a value of mode @var{mode}. The idea is that\n\ |
5543 This hook will benefit machines with limited base plus displacement\n\ | 5611 the local anchor could be shared by other accesses to nearby locations.\n\ |
5544 addressing.", | 5612 \n\ |
5545 bool, (rtx *disp, rtx *offset, machine_mode mode), | 5613 The hook returns true if it succeeds, storing the offset of the\n\ |
5614 anchor from the base in @var{offset1} and the offset of the final address\n\ | |
5615 from the anchor in @var{offset2}. The default implementation returns false.", | |
5616 bool, (rtx *offset1, rtx *offset2, poly_int64 orig_offset, machine_mode mode), | |
5546 default_legitimize_address_displacement) | 5617 default_legitimize_address_displacement) |
5547 | 5618 |
5548 /* This target hook allows the backend to perform additional | 5619 /* This target hook allows the backend to perform additional |
5549 processing while initializing for variable expansion. */ | 5620 processing while initializing for variable expansion. */ |
5550 DEFHOOK | 5621 DEFHOOK |
5796 these registers when the target switches are opposed to them.)", | 5867 these registers when the target switches are opposed to them.)", |
5797 void, (void), | 5868 void, (void), |
5798 hook_void_void) | 5869 hook_void_void) |
5799 | 5870 |
5800 DEFHOOK | 5871 DEFHOOK |
5801 (stack_clash_protection_final_dynamic_probe, | 5872 (stack_clash_protection_alloca_probe_range, |
5802 "Some targets make optimistic assumptions about the state of stack probing when they emit their prologues. On such targets a probe into the end of any dynamically allocated space is likely required for safety against stack clash style attacks. Define this variable to return nonzero if such a probe is required or zero otherwise. You need not define this macro if it would always have the value zero.", | 5873 "Some targets have an ABI defined interval for which no probing needs to be done.\n\ |
5803 bool, (rtx residual), | 5874 When a probe does need to be done this same interval is used as the probe distance \ |
5804 default_stack_clash_protection_final_dynamic_probe) | 5875 up when doing stack clash protection for alloca.\n\ |
5876 On such targets this value can be set to override the default probing up interval.\n\ | |
5877 Define this variable to return nonzero if such a probe range is required or zero otherwise. \ | |
5878 Defining this hook also requires your functions which make use of alloca to have at least 8 byes\ | |
5879 of outgoing arguments. If this is not the case the stack will be corrupted.\n\ | |
5880 You need not define this macro if it would always have the value zero.", | |
5881 HOST_WIDE_INT, (void), | |
5882 default_stack_clash_protection_alloca_probe_range) | |
5805 | 5883 |
5806 | 5884 |
5807 /* Functions specific to the C family of frontends. */ | 5885 /* Functions specific to the C family of frontends. */ |
5808 #undef HOOK_PREFIX | 5886 #undef HOOK_PREFIX |
5809 #define HOOK_PREFIX "TARGET_C_" | 5887 #define HOOK_PREFIX "TARGET_C_" |
6321 A target may return @code{UI_TARGET} if it has ABI specified unwind tables.\n\ | 6399 A target may return @code{UI_TARGET} if it has ABI specified unwind tables.\n\ |
6322 This will suppress generation of the normal debug frame unwind information.", | 6400 This will suppress generation of the normal debug frame unwind information.", |
6323 enum unwind_info_type, (void), | 6401 enum unwind_info_type, (void), |
6324 default_debug_unwind_info) | 6402 default_debug_unwind_info) |
6325 | 6403 |
6404 DEFHOOK | |
6405 (reset_location_view, "\ | |
6406 This hook, if defined, enables -ginternal-reset-location-views, and\n\ | |
6407 uses its result to override cases in which the estimated min insn\n\ | |
6408 length might be nonzero even when a PC advance (i.e., a view reset)\n\ | |
6409 cannot be taken for granted.\n\ | |
6410 \n\ | |
6411 If the hook is defined, it must return a positive value to indicate\n\ | |
6412 the insn definitely advances the PC, and so the view number can be\n\ | |
6413 safely assumed to be reset; a negative value to mean the insn\n\ | |
6414 definitely does not advance the PC, and os the view number must not\n\ | |
6415 be reset; or zero to decide based on the estimated insn length.\n\ | |
6416 \n\ | |
6417 If insn length is to be regarded as reliable, set the hook to\n\ | |
6418 @code{hook_int_rtx_insn_0}.", | |
6419 int, (rtx_insn *), NULL) | |
6420 | |
6326 /* The code parameter should be of type enum rtx_code but this is not | 6421 /* The code parameter should be of type enum rtx_code but this is not |
6327 defined at this time. */ | 6422 defined at this time. */ |
6328 DEFHOOK | 6423 DEFHOOK |
6329 (canonicalize_comparison, | 6424 (canonicalize_comparison, |
6330 "On some machines not all possible comparisons are defined, but you can\n\ | 6425 "On some machines not all possible comparisons are defined, but you can\n\ |