xref: /dflybsd-src/contrib/gcc-4.7/gcc/target.def (revision 0a8dc9fc45f4d0b236341a473fac4a486375f60c)
1e4b17023SJohn Marino/* Target hook definitions.
2e4b17023SJohn Marino   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
3e4b17023SJohn Marino   2011, 2012
4e4b17023SJohn Marino   Free Software Foundation, Inc.
5e4b17023SJohn Marino
6e4b17023SJohn Marino   This program is free software; you can redistribute it and/or modify it
7e4b17023SJohn Marino   under the terms of the GNU General Public License as published by the
8e4b17023SJohn Marino   Free Software Foundation; either version 3, or (at your option) any
9e4b17023SJohn Marino   later version.
10e4b17023SJohn Marino
11e4b17023SJohn Marino   This program is distributed in the hope that it will be useful,
12e4b17023SJohn Marino   but WITHOUT ANY WARRANTY; without even the implied warranty of
13e4b17023SJohn Marino   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14e4b17023SJohn Marino   GNU General Public License for more details.
15e4b17023SJohn Marino
16e4b17023SJohn Marino   You should have received a copy of the GNU General Public License
17e4b17023SJohn Marino   along with this program; see the file COPYING3.  If not see
18e4b17023SJohn Marino   <http://www.gnu.org/licenses/>.
19e4b17023SJohn Marino
20e4b17023SJohn Marino   In other words, you are welcome to use, share and improve this program.
21e4b17023SJohn Marino   You are forbidden to forbid anyone else to use, share and improve
22e4b17023SJohn Marino   what you give them.   Help stamp out software-hoarding!  */
23e4b17023SJohn Marino
24e4b17023SJohn Marino/* See target-hooks-macros.h for details of macros that should be
25e4b17023SJohn Marino   provided by the including file, and how to use them here.  */
26e4b17023SJohn Marino#include "target-hooks-macros.h"
27e4b17023SJohn Marino
28e4b17023SJohn Marino#undef HOOK_TYPE
29e4b17023SJohn Marino#define HOOK_TYPE "Target Hook"
30e4b17023SJohn Marino
31e4b17023SJohn MarinoHOOK_VECTOR (TARGET_INITIALIZER, gcc_target)
32e4b17023SJohn Marino
33e4b17023SJohn Marino/* Functions that output assembler for the target.  */
34e4b17023SJohn Marino#define HOOK_PREFIX "TARGET_ASM_"
35e4b17023SJohn MarinoHOOK_VECTOR (TARGET_ASM_OUT, asm_out)
36e4b17023SJohn Marino
37e4b17023SJohn Marino/* Opening and closing parentheses for asm expression grouping.  */
38e4b17023SJohn MarinoDEFHOOKPOD
39e4b17023SJohn Marino(open_paren,
40e4b17023SJohn Marino "",
41e4b17023SJohn Marino const char *, "(")
42e4b17023SJohn MarinoDEFHOOKPODX (close_paren, const char *, ")")
43e4b17023SJohn Marino
44e4b17023SJohn Marino/* Assembler instructions for creating various kinds of integer object.  */
45e4b17023SJohn MarinoDEFHOOKPOD
46e4b17023SJohn Marino(byte_op,
47e4b17023SJohn Marino "",
48e4b17023SJohn Marino const char *, "\t.byte\t")
49e4b17023SJohn MarinoDEFHOOKPOD (aligned_op, "*", struct asm_int_op, TARGET_ASM_ALIGNED_INT_OP)
50e4b17023SJohn MarinoDEFHOOKPOD (unaligned_op, "*", struct asm_int_op, TARGET_ASM_UNALIGNED_INT_OP)
51e4b17023SJohn Marino
52e4b17023SJohn Marino/* The maximum number of bytes to skip when applying
53e4b17023SJohn Marino   LABEL_ALIGN_AFTER_BARRIER.  */
54e4b17023SJohn MarinoDEFHOOK
55e4b17023SJohn Marino(label_align_after_barrier_max_skip,
56e4b17023SJohn Marino "",
57e4b17023SJohn Marino int, (rtx label),
58e4b17023SJohn Marino default_label_align_after_barrier_max_skip)
59e4b17023SJohn Marino
60e4b17023SJohn Marino/* The maximum number of bytes to skip when applying
61e4b17023SJohn Marino   LOOP_ALIGN.  */
62e4b17023SJohn MarinoDEFHOOK
63e4b17023SJohn Marino(loop_align_max_skip,
64e4b17023SJohn Marino "",
65e4b17023SJohn Marino int, (rtx label),
66e4b17023SJohn Marino default_loop_align_max_skip)
67e4b17023SJohn Marino
68e4b17023SJohn Marino/* The maximum number of bytes to skip when applying
69e4b17023SJohn Marino   LABEL_ALIGN.  */
70e4b17023SJohn MarinoDEFHOOK
71e4b17023SJohn Marino(label_align_max_skip,
72e4b17023SJohn Marino "",
73e4b17023SJohn Marino int, (rtx label),
74e4b17023SJohn Marino default_label_align_max_skip)
75e4b17023SJohn Marino
76e4b17023SJohn Marino/* The maximum number of bytes to skip when applying
77e4b17023SJohn Marino   JUMP_ALIGN.  */
78e4b17023SJohn MarinoDEFHOOK
79e4b17023SJohn Marino(jump_align_max_skip,
80e4b17023SJohn Marino "",
81e4b17023SJohn Marino int, (rtx label),
82e4b17023SJohn Marino default_jump_align_max_skip)
83e4b17023SJohn Marino
84e4b17023SJohn Marino/* Try to output the assembler code for an integer object whose
85e4b17023SJohn Marino   value is given by X.  SIZE is the size of the object in bytes and
86e4b17023SJohn Marino   ALIGNED_P indicates whether it is aligned.  Return true if
87e4b17023SJohn Marino   successful.  Only handles cases for which BYTE_OP, ALIGNED_OP
88e4b17023SJohn Marino   and UNALIGNED_OP are NULL.  */
89e4b17023SJohn MarinoDEFHOOK
90e4b17023SJohn Marino(integer,
91e4b17023SJohn Marino "",
92e4b17023SJohn Marino /* Only handles cases for which BYTE_OP, ALIGNED_OP and UNALIGNED_OP are
93e4b17023SJohn Marino    NULL.  */
94e4b17023SJohn Marino bool, (rtx x, unsigned int size, int aligned_p),
95e4b17023SJohn Marino default_assemble_integer)
96e4b17023SJohn Marino
97e4b17023SJohn Marino/* Output code that will globalize a label.  */
98e4b17023SJohn MarinoDEFHOOK
99e4b17023SJohn Marino(globalize_label,
100e4b17023SJohn Marino "",
101e4b17023SJohn Marino void, (FILE *stream, const char *name),
102e4b17023SJohn Marino default_globalize_label)
103e4b17023SJohn Marino
104e4b17023SJohn Marino/* Output code that will globalize a declaration.  */
105e4b17023SJohn MarinoDEFHOOK
106e4b17023SJohn Marino(globalize_decl_name,
107e4b17023SJohn Marino "",
108e4b17023SJohn Marino void, (FILE *stream, tree decl), default_globalize_decl_name)
109e4b17023SJohn Marino
110e4b17023SJohn Marino/* Output code that will emit a label for unwind info, if this
111e4b17023SJohn Marino   target requires such labels.  Second argument is the decl the
112e4b17023SJohn Marino   unwind info is associated with, third is a boolean: true if
113e4b17023SJohn Marino   this is for exception handling, fourth is a boolean: true if
114e4b17023SJohn Marino   this is only a placeholder for an omitted FDE.  */
115e4b17023SJohn MarinoDEFHOOK
116e4b17023SJohn Marino(emit_unwind_label,
117e4b17023SJohn Marino "",
118e4b17023SJohn Marino void, (FILE *stream, tree decl, int for_eh, int empty),
119e4b17023SJohn Marino default_emit_unwind_label)
120e4b17023SJohn Marino
121e4b17023SJohn Marino/* Output code that will emit a label to divide up the exception table.  */
122e4b17023SJohn MarinoDEFHOOK
123e4b17023SJohn Marino(emit_except_table_label,
124e4b17023SJohn Marino "",
125e4b17023SJohn Marino void, (FILE *stream),
126e4b17023SJohn Marino default_emit_except_table_label)
127e4b17023SJohn Marino
128e4b17023SJohn Marino/* Emit a directive for setting the personality for the function.  */
129e4b17023SJohn MarinoDEFHOOK
130e4b17023SJohn Marino(emit_except_personality,
131e4b17023SJohn Marino "If the target implements @code{TARGET_ASM_UNWIND_EMIT}, this hook may be\
132e4b17023SJohn Marino used to emit a directive to install a personality hook into the unwind\
133e4b17023SJohn Marino info.  This hook should not be used if dwarf2 unwind info is used.",
134e4b17023SJohn Marino void, (rtx personality),
135e4b17023SJohn Marino NULL)
136e4b17023SJohn Marino
137e4b17023SJohn Marino/* Emit any directives required to unwind this instruction.  */
138e4b17023SJohn MarinoDEFHOOK
139e4b17023SJohn Marino(unwind_emit,
140e4b17023SJohn Marino "",
141e4b17023SJohn Marino void, (FILE *stream, rtx insn),
142e4b17023SJohn Marino NULL)
143e4b17023SJohn Marino
144e4b17023SJohn MarinoDEFHOOKPOD
145e4b17023SJohn Marino(unwind_emit_before_insn,
146e4b17023SJohn Marino "True if the @code{TARGET_ASM_UNWIND_EMIT} hook should be called before\
147e4b17023SJohn Marino the assembly for @var{insn} has been emitted, false if the hook should\
148e4b17023SJohn Marino be called afterward.",
149e4b17023SJohn Marino bool, true)
150e4b17023SJohn Marino
151e4b17023SJohn Marino/* Generate an internal label.
152e4b17023SJohn Marino   For now this is just a wrapper for ASM_GENERATE_INTERNAL_LABEL.  */
153e4b17023SJohn MarinoDEFHOOK_UNDOC
154e4b17023SJohn Marino(generate_internal_label,
155e4b17023SJohn Marino "",
156e4b17023SJohn Marino void, (char *buf, const char *prefix, unsigned long labelno),
157e4b17023SJohn Marino default_generate_internal_label)
158e4b17023SJohn Marino
159e4b17023SJohn Marino/* Output an internal label.  */
160e4b17023SJohn MarinoDEFHOOK
161e4b17023SJohn Marino(internal_label,
162e4b17023SJohn Marino "",
163e4b17023SJohn Marino void, (FILE *stream, const char *prefix, unsigned long labelno),
164e4b17023SJohn Marino default_internal_label)
165e4b17023SJohn Marino
166e4b17023SJohn Marino/* Output label for the constant.  */
167e4b17023SJohn MarinoDEFHOOK
168e4b17023SJohn Marino(declare_constant_name,
169e4b17023SJohn Marino "",
170e4b17023SJohn Marino void, (FILE *file, const char *name, const_tree expr, HOST_WIDE_INT size),
171e4b17023SJohn Marino default_asm_declare_constant_name)
172e4b17023SJohn Marino
173e4b17023SJohn Marino/* Emit a ttype table reference to a typeinfo object.  */
174e4b17023SJohn MarinoDEFHOOK
175e4b17023SJohn Marino(ttype,
176e4b17023SJohn Marino "",
177e4b17023SJohn Marino bool, (rtx sym),
178e4b17023SJohn Marino hook_bool_rtx_false)
179e4b17023SJohn Marino
180e4b17023SJohn Marino/* Emit an assembler directive to set visibility for the symbol
181e4b17023SJohn Marino   associated with the tree decl.  */
182e4b17023SJohn MarinoDEFHOOK
183e4b17023SJohn Marino(assemble_visibility,
184e4b17023SJohn Marino "",
185e4b17023SJohn Marino void, (tree decl, int visibility),
186e4b17023SJohn Marino default_assemble_visibility)
187e4b17023SJohn Marino
188e4b17023SJohn Marino/* Output the assembler code for entry to a function.  */
189e4b17023SJohn MarinoDEFHOOK
190e4b17023SJohn Marino(function_prologue,
191e4b17023SJohn Marino "",
192e4b17023SJohn Marino void, (FILE *file, HOST_WIDE_INT size),
193e4b17023SJohn Marino default_function_pro_epilogue)
194e4b17023SJohn Marino
195e4b17023SJohn Marino/* Output the assembler code for end of prologue.  */
196e4b17023SJohn MarinoDEFHOOK
197e4b17023SJohn Marino(function_end_prologue,
198e4b17023SJohn Marino "",
199e4b17023SJohn Marino void, (FILE *file),
200e4b17023SJohn Marino no_asm_to_stream)
201e4b17023SJohn Marino
202e4b17023SJohn Marino/* Output the assembler code for start of epilogue.  */
203e4b17023SJohn MarinoDEFHOOK
204e4b17023SJohn Marino(function_begin_epilogue,
205e4b17023SJohn Marino "",
206e4b17023SJohn Marino void, (FILE *file),
207e4b17023SJohn Marino no_asm_to_stream)
208e4b17023SJohn Marino
209e4b17023SJohn Marino/* Output the assembler code for function exit.  */
210e4b17023SJohn MarinoDEFHOOK
211e4b17023SJohn Marino(function_epilogue,
212e4b17023SJohn Marino "",
213e4b17023SJohn Marino void, (FILE *file, HOST_WIDE_INT size),
214e4b17023SJohn Marino default_function_pro_epilogue)
215e4b17023SJohn Marino
216e4b17023SJohn Marino/* Initialize target-specific sections.  */
217e4b17023SJohn MarinoDEFHOOK
218e4b17023SJohn Marino(init_sections,
219e4b17023SJohn Marino "",
220e4b17023SJohn Marino void, (void),
221e4b17023SJohn Marino hook_void_void)
222e4b17023SJohn Marino
223e4b17023SJohn Marino/* Tell assembler to change to section NAME with attributes FLAGS.
224e4b17023SJohn Marino   If DECL is non-NULL, it is the VAR_DECL or FUNCTION_DECL with
225e4b17023SJohn Marino   which this section is associated.  */
226e4b17023SJohn MarinoDEFHOOK
227e4b17023SJohn Marino(named_section,
228e4b17023SJohn Marino "",
229e4b17023SJohn Marino void, (const char *name, unsigned int flags, tree decl),
230e4b17023SJohn Marino default_no_named_section)
231e4b17023SJohn Marino
232e4b17023SJohn Marino/* Return preferred text (sub)section for function DECL.
233e4b17023SJohn Marino   Main purpose of this function is to separate cold, normal and hot
234e4b17023SJohn Marino   functions. STARTUP is true when function is known to be used only
235e4b17023SJohn Marino   at startup (from static constructors or it is main()).
236e4b17023SJohn Marino   EXIT is true when function is known to be used only at exit
237e4b17023SJohn Marino   (from static destructors).
238e4b17023SJohn Marino   Return NULL if function should go to default text section.  */
239e4b17023SJohn MarinoDEFHOOK
240e4b17023SJohn Marino(function_section,
241e4b17023SJohn Marino "",
242e4b17023SJohn Marino section *, (tree decl, enum node_frequency freq, bool startup, bool exit),
243e4b17023SJohn Marino default_function_section)
244e4b17023SJohn Marino
245e4b17023SJohn Marino/* Output the assembler code for function exit.  */
246e4b17023SJohn MarinoDEFHOOK
247e4b17023SJohn Marino(function_switched_text_sections,
248e4b17023SJohn Marino "Used by the target to emit any assembler directives or additional\
249e4b17023SJohn Marino  labels needed when a function is partitioned between different\
250e4b17023SJohn Marino  sections.  Output should be written to @var{file}.  The function\
251e4b17023SJohn Marino  decl is available as @var{decl} and the new section is `cold' if\
252e4b17023SJohn Marino  @var{new_is_cold} is @code{true}.",
253e4b17023SJohn Marino void, (FILE *file, tree decl, bool new_is_cold),
254e4b17023SJohn Marino default_function_switched_text_sections)
255e4b17023SJohn Marino
256e4b17023SJohn Marino/* Return a mask describing how relocations should be treated when
257e4b17023SJohn Marino   selecting sections.  Bit 1 should be set if global relocations
258e4b17023SJohn Marino   should be placed in a read-write section; bit 0 should be set if
259e4b17023SJohn Marino   local relocations should be placed in a read-write section.  */
260e4b17023SJohn MarinoDEFHOOK
261e4b17023SJohn Marino(reloc_rw_mask,
262e4b17023SJohn Marino "",
263e4b17023SJohn Marino int, (void),
264e4b17023SJohn Marino default_reloc_rw_mask)
265e4b17023SJohn Marino
266e4b17023SJohn Marino /* Return a section for EXP.  It may be a DECL or a constant.  RELOC
267e4b17023SJohn Marino    is nonzero if runtime relocations must be applied; bit 1 will be
268e4b17023SJohn Marino    set if the runtime relocations require non-local name resolution.
269e4b17023SJohn Marino    ALIGN is the required alignment of the data.  */
270e4b17023SJohn MarinoDEFHOOK
271e4b17023SJohn Marino(select_section,
272e4b17023SJohn Marino "",
273e4b17023SJohn Marino section *, (tree exp, int reloc, unsigned HOST_WIDE_INT align),
274e4b17023SJohn Marino default_select_section)
275e4b17023SJohn Marino
276e4b17023SJohn Marino/* Return a section for X.  MODE is X's mode and ALIGN is its
277e4b17023SJohn Marino   alignment in bits.  */
278e4b17023SJohn MarinoDEFHOOK
279e4b17023SJohn Marino(select_rtx_section,
280e4b17023SJohn Marino "",
281e4b17023SJohn Marino section *, (enum machine_mode mode, rtx x, unsigned HOST_WIDE_INT align),
282e4b17023SJohn Marino default_select_rtx_section)
283e4b17023SJohn Marino
284e4b17023SJohn Marino/* Select a unique section name for DECL.  RELOC is the same as
285e4b17023SJohn Marino   for SELECT_SECTION.  */
286e4b17023SJohn MarinoDEFHOOK
287e4b17023SJohn Marino(unique_section,
288e4b17023SJohn Marino "",
289e4b17023SJohn Marino void, (tree decl, int reloc),
290e4b17023SJohn Marino default_unique_section)
291e4b17023SJohn Marino
292e4b17023SJohn Marino/* Return the readonly data section associated with function DECL.  */
293e4b17023SJohn MarinoDEFHOOK
294e4b17023SJohn Marino(function_rodata_section,
295e4b17023SJohn Marino "",
296e4b17023SJohn Marino section *, (tree decl),
297e4b17023SJohn Marino default_function_rodata_section)
298e4b17023SJohn Marino
299e4b17023SJohn Marino/* Nonnull if the target wants to override the default ".rodata" prefix
300e4b17023SJohn Marino   for mergeable data sections.  */
301e4b17023SJohn MarinoDEFHOOKPOD
302e4b17023SJohn Marino(mergeable_rodata_prefix,
303e4b17023SJohn Marino "Usually, the compiler uses the prefix @code{\".rodata\"} to construct\n\
304e4b17023SJohn Marinosection names for mergeable constant data.  Define this macro to override\n\
305e4b17023SJohn Marinothe string if a different section name should be used.",
306e4b17023SJohn Marino const char *, ".rodata")
307e4b17023SJohn Marino
308e4b17023SJohn Marino/* Return the section to be used for transactional memory clone tables.  */
309e4b17023SJohn MarinoDEFHOOK
310e4b17023SJohn Marino(tm_clone_table_section,
311e4b17023SJohn Marino "Return the section that should be used for transactional memory clone\
312e4b17023SJohn Marino  tables.",
313e4b17023SJohn Marino section *, (void), default_clone_table_section)
314e4b17023SJohn Marino
315e4b17023SJohn Marino/* Output a constructor for a symbol with a given priority.  */
316e4b17023SJohn MarinoDEFHOOK
317e4b17023SJohn Marino(constructor,
318e4b17023SJohn Marino "",
319e4b17023SJohn Marino void, (rtx symbol, int priority), NULL)
320e4b17023SJohn Marino
321e4b17023SJohn Marino/* Output a destructor for a symbol with a given priority.  */
322e4b17023SJohn MarinoDEFHOOK
323e4b17023SJohn Marino(destructor,
324e4b17023SJohn Marino "",
325e4b17023SJohn Marino void, (rtx symbol, int priority), NULL)
326e4b17023SJohn Marino
327e4b17023SJohn Marino/* Output the assembler code for a thunk function.  THUNK_DECL is the
328e4b17023SJohn Marino   declaration for the thunk function itself, FUNCTION is the decl for
329e4b17023SJohn Marino   the target function.  DELTA is an immediate constant offset to be
330e4b17023SJohn Marino   added to THIS.  If VCALL_OFFSET is nonzero, the word at
331e4b17023SJohn Marino   *(*this + vcall_offset) should be added to THIS.  */
332e4b17023SJohn MarinoDEFHOOK
333e4b17023SJohn Marino(output_mi_thunk,
334e4b17023SJohn Marino "",
335e4b17023SJohn Marino void, (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,
336e4b17023SJohn Marino	HOST_WIDE_INT vcall_offset, tree function),
337e4b17023SJohn Marino NULL)
338e4b17023SJohn Marino
339e4b17023SJohn Marino/* Determine whether output_mi_thunk would succeed.  */
340e4b17023SJohn Marino/* ??? Ideally, this hook would not exist, and success or failure
341e4b17023SJohn Marino   would be returned from output_mi_thunk directly.  But there's
342e4b17023SJohn Marino   too much undo-able setup involved in invoking output_mi_thunk.
343e4b17023SJohn Marino   Could be fixed by making output_mi_thunk emit rtl instead of
344e4b17023SJohn Marino   text to the output file.  */
345e4b17023SJohn MarinoDEFHOOK
346e4b17023SJohn Marino(can_output_mi_thunk,
347e4b17023SJohn Marino "",
348e4b17023SJohn Marino bool, (const_tree thunk_fndecl, HOST_WIDE_INT delta,
349e4b17023SJohn Marino	HOST_WIDE_INT vcall_offset, const_tree function),
350e4b17023SJohn Marino hook_bool_const_tree_hwi_hwi_const_tree_false)
351e4b17023SJohn Marino
352e4b17023SJohn Marino/* Output any boilerplate text needed at the beginning of a
353e4b17023SJohn Marino   translation unit.  */
354e4b17023SJohn MarinoDEFHOOK
355e4b17023SJohn Marino(file_start,
356e4b17023SJohn Marino "",
357e4b17023SJohn Marino void, (void),
358e4b17023SJohn Marino default_file_start)
359e4b17023SJohn Marino
360e4b17023SJohn Marino/* Output any boilerplate text needed at the end of a translation unit.  */
361e4b17023SJohn MarinoDEFHOOK
362e4b17023SJohn Marino(file_end,
363e4b17023SJohn Marino "",
364e4b17023SJohn Marino void, (void),
365e4b17023SJohn Marino hook_void_void)
366e4b17023SJohn Marino
367e4b17023SJohn Marino/* Output any boilerplate text needed at the beginning of an
368e4b17023SJohn Marino   LTO output stream.  */
369e4b17023SJohn MarinoDEFHOOK
370e4b17023SJohn Marino(lto_start,
371e4b17023SJohn Marino "",
372e4b17023SJohn Marino void, (void),
373e4b17023SJohn Marino hook_void_void)
374e4b17023SJohn Marino
375e4b17023SJohn Marino/* Output any boilerplate text needed at the end of an
376e4b17023SJohn Marino   LTO output stream.  */
377e4b17023SJohn MarinoDEFHOOK
378e4b17023SJohn Marino(lto_end,
379e4b17023SJohn Marino "",
380e4b17023SJohn Marino void, (void),
381e4b17023SJohn Marino hook_void_void)
382e4b17023SJohn Marino
383e4b17023SJohn Marino/* Output any boilerplace text needed at the end of a
384e4b17023SJohn Marino   translation unit before debug and unwind info is emitted.  */
385e4b17023SJohn MarinoDEFHOOK
386e4b17023SJohn Marino(code_end,
387e4b17023SJohn Marino "",
388e4b17023SJohn Marino void, (void),
389e4b17023SJohn Marino hook_void_void)
390e4b17023SJohn Marino
391e4b17023SJohn Marino/* Output an assembler pseudo-op to declare a library function name
392e4b17023SJohn Marino   external.  */
393e4b17023SJohn MarinoDEFHOOK
394e4b17023SJohn Marino(external_libcall,
395e4b17023SJohn Marino "",
396e4b17023SJohn Marino void, (rtx symref),
397e4b17023SJohn Marino default_external_libcall)
398e4b17023SJohn Marino
399e4b17023SJohn Marino/* Output an assembler directive to mark decl live. This instructs
400e4b17023SJohn Marino   linker to not dead code strip this symbol.  */
401e4b17023SJohn MarinoDEFHOOK
402e4b17023SJohn Marino(mark_decl_preserved,
403e4b17023SJohn Marino "",
404e4b17023SJohn Marino void, (const char *symbol),
405e4b17023SJohn Marino hook_void_constcharptr)
406e4b17023SJohn Marino
407e4b17023SJohn Marino/* Output a record of the command line switches that have been passed.  */
408e4b17023SJohn MarinoDEFHOOK
409e4b17023SJohn Marino(record_gcc_switches,
410e4b17023SJohn Marino "",
411e4b17023SJohn Marino int, (print_switch_type type, const char *text),
412e4b17023SJohn Marino NULL)
413e4b17023SJohn Marino
414e4b17023SJohn Marino/* The name of the section that the example ELF implementation of
415e4b17023SJohn Marino   record_gcc_switches will use to store the information.  Target
416e4b17023SJohn Marino   specific versions of record_gcc_switches may or may not use
417e4b17023SJohn Marino   this information.  */
418e4b17023SJohn MarinoDEFHOOKPOD
419e4b17023SJohn Marino(record_gcc_switches_section,
420e4b17023SJohn Marino "",
421e4b17023SJohn Marino const char *, ".GCC.command.line")
422e4b17023SJohn Marino
423e4b17023SJohn Marino/* Output the definition of a section anchor.  */
424e4b17023SJohn MarinoDEFHOOK
425e4b17023SJohn Marino(output_anchor,
426e4b17023SJohn Marino "",
427e4b17023SJohn Marino void, (rtx x),
428e4b17023SJohn Marino default_asm_output_anchor)
429e4b17023SJohn Marino
430e4b17023SJohn Marino/* Output a DTP-relative reference to a TLS symbol.  */
431e4b17023SJohn MarinoDEFHOOK
432e4b17023SJohn Marino(output_dwarf_dtprel,
433e4b17023SJohn Marino "",
434e4b17023SJohn Marino void, (FILE *file, int size, rtx x),
435e4b17023SJohn Marino NULL)
436e4b17023SJohn Marino
437e4b17023SJohn Marino/* Some target machines need to postscan each insn after it is output.  */
438e4b17023SJohn MarinoDEFHOOK
439e4b17023SJohn Marino(final_postscan_insn,
440e4b17023SJohn Marino "",
441e4b17023SJohn Marino void, (FILE *file, rtx insn, rtx *opvec, int noperands),
442e4b17023SJohn Marino NULL)
443e4b17023SJohn Marino
444e4b17023SJohn Marino/* Emit the trampoline template.  This hook may be NULL.  */
445e4b17023SJohn MarinoDEFHOOK
446e4b17023SJohn Marino(trampoline_template,
447e4b17023SJohn Marino "",
448e4b17023SJohn Marino void, (FILE *f),
449e4b17023SJohn Marino NULL)
450e4b17023SJohn Marino
451e4b17023SJohn MarinoDEFHOOK
452e4b17023SJohn Marino(output_source_filename,
453e4b17023SJohn Marino "Output COFF information or DWARF debugging information which indicates\
454e4b17023SJohn Marino that filename @var{name} is the current source file to the stdio\
455e4b17023SJohn Marino stream @var{file}.\n\
456e4b17023SJohn Marino \n\
457e4b17023SJohn Marino This target hook need not be defined if the standard form of output\
458e4b17023SJohn Marino for the file format in use is appropriate.",
459e4b17023SJohn Marino void ,(FILE *file, const char *name),
460e4b17023SJohn Marino default_asm_output_source_filename)
461e4b17023SJohn Marino
462e4b17023SJohn MarinoDEFHOOK
463e4b17023SJohn Marino(output_addr_const_extra,
464e4b17023SJohn Marino "",
465e4b17023SJohn Marino bool, (FILE *file, rtx x),
466e4b17023SJohn Marino hook_bool_FILEptr_rtx_false)
467e4b17023SJohn Marino
468e4b17023SJohn Marino/* ??? The TARGET_PRINT_OPERAND* hooks are part of the asm_out struct,
469e4b17023SJohn Marino   even though that is not reflected in the macro name to override their
470e4b17023SJohn Marino   initializers.  */
471e4b17023SJohn Marino#undef HOOK_PREFIX
472e4b17023SJohn Marino#define HOOK_PREFIX "TARGET_"
473e4b17023SJohn Marino
474e4b17023SJohn Marino/* Emit a machine-specific insn operand.  */
475e4b17023SJohn Marino/* ??? tm.texi only documents the old macro PRINT_OPERAND,
476e4b17023SJohn Marino   not this  hook, and uses a different name for the argument FILE.  */
477e4b17023SJohn MarinoDEFHOOK_UNDOC
478e4b17023SJohn Marino(print_operand,
479e4b17023SJohn Marino "",
480e4b17023SJohn Marino void, (FILE *file, rtx x, int code),
481e4b17023SJohn Marino default_print_operand)
482e4b17023SJohn Marino
483e4b17023SJohn Marino/* Emit a machine-specific memory address.  */
484e4b17023SJohn Marino/* ??? tm.texi only documents the old macro PRINT_OPERAND_ADDRESS,
485e4b17023SJohn Marino   not this  hook, and uses different argument names.  */
486e4b17023SJohn MarinoDEFHOOK_UNDOC
487e4b17023SJohn Marino(print_operand_address,
488e4b17023SJohn Marino "",
489e4b17023SJohn Marino void, (FILE *file, rtx addr),
490e4b17023SJohn Marino default_print_operand_address)
491e4b17023SJohn Marino
492e4b17023SJohn Marino/* Determine whether CODE is a valid punctuation character for the
493e4b17023SJohn Marino   `print_operand' hook.  */
494e4b17023SJohn Marino/* ??? tm.texi only documents the old macro PRINT_OPERAND_PUNCT_VALID_P,
495e4b17023SJohn Marino   not this  hook.  */
496e4b17023SJohn MarinoDEFHOOK_UNDOC
497e4b17023SJohn Marino(print_operand_punct_valid_p,
498e4b17023SJohn Marino "",
499e4b17023SJohn Marino bool ,(unsigned char code),
500e4b17023SJohn Marino default_print_operand_punct_valid_p)
501e4b17023SJohn Marino
502e4b17023SJohn Marino/* Given a symbol name, perform same mangling as assemble_name and
503e4b17023SJohn Marino   ASM_OUTPUT_LABELREF, returning result as an IDENTIFIER_NODE.  */
504e4b17023SJohn MarinoDEFHOOK
505e4b17023SJohn Marino(mangle_assembler_name,
506e4b17023SJohn Marino "Given a symbol @var{name}, perform same mangling as @code{varasm.c}'s\
507e4b17023SJohn Marino @code{assemble_name}, but in memory rather than to a file stream, returning\
508e4b17023SJohn Marino result as an @code{IDENTIFIER_NODE}.  Required for correct LTO symtabs.  The\
509e4b17023SJohn Marino default implementation calls the @code{TARGET_STRIP_NAME_ENCODING} hook and\
510e4b17023SJohn Marino then prepends the @code{USER_LABEL_PREFIX}, if any.",
511e4b17023SJohn Marino tree, (const char *name),
512e4b17023SJohn Marino default_mangle_assembler_name)
513e4b17023SJohn Marino
514e4b17023SJohn MarinoHOOK_VECTOR_END (asm_out)
515e4b17023SJohn Marino
516e4b17023SJohn Marino/* Functions relating to instruction scheduling.  All of these
517e4b17023SJohn Marino   default to null pointers, which haifa-sched.c looks for and handles.  */
518e4b17023SJohn Marino#undef HOOK_PREFIX
519e4b17023SJohn Marino#define HOOK_PREFIX "TARGET_SCHED_"
520e4b17023SJohn MarinoHOOK_VECTOR (TARGET_SCHED, sched)
521e4b17023SJohn Marino
522e4b17023SJohn Marino/* Given the current cost, COST, of an insn, INSN, calculate and
523e4b17023SJohn Marino   return a new cost based on its relationship to DEP_INSN through
524e4b17023SJohn Marino   the dependence LINK.  The default is to make no adjustment.  */
525e4b17023SJohn MarinoDEFHOOK
526e4b17023SJohn Marino(adjust_cost,
527e4b17023SJohn Marino "",
528e4b17023SJohn Marino int, (rtx insn, rtx link, rtx dep_insn, int cost), NULL)
529e4b17023SJohn Marino
530e4b17023SJohn Marino/* Adjust the priority of an insn as you see fit.  Returns the new priority.  */
531e4b17023SJohn MarinoDEFHOOK
532e4b17023SJohn Marino(adjust_priority,
533e4b17023SJohn Marino "",
534e4b17023SJohn Marino int, (rtx insn, int priority), NULL)
535e4b17023SJohn Marino
536e4b17023SJohn Marino/* Function which returns the maximum number of insns that can be
537e4b17023SJohn Marino   scheduled in the same machine cycle.  This must be constant
538e4b17023SJohn Marino   over an entire compilation.  The default is 1.  */
539e4b17023SJohn MarinoDEFHOOK
540e4b17023SJohn Marino(issue_rate,
541e4b17023SJohn Marino "",
542e4b17023SJohn Marino int, (void), NULL)
543e4b17023SJohn Marino
544e4b17023SJohn Marino/* Calculate how much this insn affects how many more insns we
545e4b17023SJohn Marino   can emit this cycle.  Default is they all cost the same.  */
546e4b17023SJohn MarinoDEFHOOK
547e4b17023SJohn Marino(variable_issue,
548e4b17023SJohn Marino "",
549e4b17023SJohn Marino int, (FILE *file, int verbose, rtx insn, int more), NULL)
550e4b17023SJohn Marino
551e4b17023SJohn Marino/* Initialize machine-dependent scheduling code.  */
552e4b17023SJohn MarinoDEFHOOK
553e4b17023SJohn Marino(init,
554e4b17023SJohn Marino "",
555e4b17023SJohn Marino void, (FILE *file, int verbose, int max_ready), NULL)
556e4b17023SJohn Marino
557e4b17023SJohn Marino/* Finalize machine-dependent scheduling code.  */
558e4b17023SJohn MarinoDEFHOOK
559e4b17023SJohn Marino(finish,
560e4b17023SJohn Marino "",
561e4b17023SJohn Marino void, (FILE *file, int verbose), NULL)
562e4b17023SJohn Marino
563e4b17023SJohn Marino /* Initialize machine-dependent function wide scheduling code.  */
564e4b17023SJohn MarinoDEFHOOK
565e4b17023SJohn Marino(init_global,
566e4b17023SJohn Marino "",
567e4b17023SJohn Marino void, (FILE *file, int verbose, int old_max_uid), NULL)
568e4b17023SJohn Marino
569e4b17023SJohn Marino/* Finalize machine-dependent function wide scheduling code.  */
570e4b17023SJohn MarinoDEFHOOK
571e4b17023SJohn Marino(finish_global,
572e4b17023SJohn Marino "",
573e4b17023SJohn Marino void, (FILE *file, int verbose), NULL)
574e4b17023SJohn Marino
575e4b17023SJohn Marino/* Reorder insns in a machine-dependent fashion, in two different
576e4b17023SJohn Marino       places.  Default does nothing.  */
577e4b17023SJohn MarinoDEFHOOK
578e4b17023SJohn Marino(reorder,
579e4b17023SJohn Marino "",
580e4b17023SJohn Marino int, (FILE *file, int verbose, rtx *ready, int *n_readyp, int clock), NULL)
581e4b17023SJohn Marino
582e4b17023SJohn MarinoDEFHOOK
583e4b17023SJohn Marino(reorder2,
584e4b17023SJohn Marino "",
585e4b17023SJohn Marino int, (FILE *file, int verbose, rtx *ready, int *n_readyp, int clock), NULL)
586e4b17023SJohn Marino
587e4b17023SJohn Marino/* The following member value is a pointer to a function called
588e4b17023SJohn Marino   after evaluation forward dependencies of insns in chain given
589e4b17023SJohn Marino   by two parameter values (head and tail correspondingly).  */
590e4b17023SJohn MarinoDEFHOOK
591e4b17023SJohn Marino(dependencies_evaluation_hook,
592e4b17023SJohn Marino "",
593e4b17023SJohn Marino void, (rtx head, rtx tail), NULL)
594e4b17023SJohn Marino
595e4b17023SJohn Marino/* The values of the following four members are pointers to functions
596e4b17023SJohn Marino   used to simplify the automaton descriptions.  dfa_pre_cycle_insn and
597e4b17023SJohn Marino   dfa_post_cycle_insn give functions returning insns which are used to
598e4b17023SJohn Marino   change the pipeline hazard recognizer state when the new simulated
599e4b17023SJohn Marino   processor cycle correspondingly starts and finishes.  The function
600e4b17023SJohn Marino   defined by init_dfa_pre_cycle_insn and init_dfa_post_cycle_insn are
601e4b17023SJohn Marino   used to initialize the corresponding insns.  The default values of
602e4b17023SJohn Marino   the members result in not changing the automaton state when the
603e4b17023SJohn Marino   new simulated processor cycle correspondingly starts and finishes.  */
604e4b17023SJohn Marino
605e4b17023SJohn MarinoDEFHOOK
606e4b17023SJohn Marino(init_dfa_pre_cycle_insn,
607e4b17023SJohn Marino "",
608e4b17023SJohn Marino void, (void), NULL)
609e4b17023SJohn Marino
610e4b17023SJohn MarinoDEFHOOK
611e4b17023SJohn Marino(dfa_pre_cycle_insn,
612e4b17023SJohn Marino "",
613e4b17023SJohn Marino rtx, (void), NULL)
614e4b17023SJohn Marino
615e4b17023SJohn MarinoDEFHOOK
616e4b17023SJohn Marino(init_dfa_post_cycle_insn,
617e4b17023SJohn Marino "",
618e4b17023SJohn Marino void, (void), NULL)
619e4b17023SJohn Marino
620e4b17023SJohn MarinoDEFHOOK
621e4b17023SJohn Marino(dfa_post_cycle_insn,
622e4b17023SJohn Marino "",
623e4b17023SJohn Marino rtx, (void), NULL)
624e4b17023SJohn Marino
625e4b17023SJohn Marino/* The values of the following two members are pointers to
626e4b17023SJohn Marino   functions used to simplify the automaton descriptions.
627e4b17023SJohn Marino   dfa_pre_advance_cycle and dfa_post_advance_cycle are getting called
628e4b17023SJohn Marino   immediately before and after cycle is advanced.  */
629e4b17023SJohn Marino
630e4b17023SJohn MarinoDEFHOOK
631e4b17023SJohn Marino(dfa_pre_advance_cycle,
632e4b17023SJohn Marino "",
633e4b17023SJohn Marino void, (void), NULL)
634e4b17023SJohn Marino
635e4b17023SJohn MarinoDEFHOOK
636e4b17023SJohn Marino(dfa_post_advance_cycle,
637e4b17023SJohn Marino "",
638e4b17023SJohn Marino void, (void), NULL)
639e4b17023SJohn Marino
640e4b17023SJohn Marino/* The following member value is a pointer to a function returning value
641e4b17023SJohn Marino   which defines how many insns in queue `ready' will we try for
642e4b17023SJohn Marino   multi-pass scheduling.  If the member value is nonzero and the
643e4b17023SJohn Marino   function returns positive value, the DFA based scheduler will make
644e4b17023SJohn Marino   multi-pass scheduling for the first cycle.  In other words, we will
645e4b17023SJohn Marino   try to choose ready insn which permits to start maximum number of
646e4b17023SJohn Marino   insns on the same cycle.  */
647e4b17023SJohn MarinoDEFHOOK
648e4b17023SJohn Marino(first_cycle_multipass_dfa_lookahead,
649e4b17023SJohn Marino "",
650e4b17023SJohn Marino int, (void), NULL)
651e4b17023SJohn Marino
652e4b17023SJohn Marino/* The following member value is pointer to a function controlling
653e4b17023SJohn Marino   what insns from the ready insn queue will be considered for the
654e4b17023SJohn Marino   multipass insn scheduling.  If the hook returns zero for insn
655e4b17023SJohn Marino   passed as the parameter, the insn will be not chosen to be issued.  */
656e4b17023SJohn MarinoDEFHOOK
657e4b17023SJohn Marino(first_cycle_multipass_dfa_lookahead_guard,
658e4b17023SJohn Marino "",
659e4b17023SJohn Marino int, (rtx insn), NULL)
660e4b17023SJohn Marino
661e4b17023SJohn Marino/* This hook prepares the target for a new round of multipass
662e4b17023SJohn Marino   scheduling.
663e4b17023SJohn Marino   DATA is a pointer to target-specific data used for multipass scheduling.
664e4b17023SJohn Marino   READY_TRY and N_READY represent the current state of search in the
665e4b17023SJohn Marino   optimization space.  The target can filter out instructions that
666e4b17023SJohn Marino   should not be tried during current round by setting corresponding
667e4b17023SJohn Marino   elements in READY_TRY to non-zero.
668e4b17023SJohn Marino   FIRST_CYCLE_INSN_P is true if this is the first round of multipass
669e4b17023SJohn Marino   scheduling on current cycle.  */
670e4b17023SJohn MarinoDEFHOOK
671e4b17023SJohn Marino(first_cycle_multipass_begin,
672e4b17023SJohn Marino "",
673e4b17023SJohn Marino void, (void *data, char *ready_try, int n_ready, bool first_cycle_insn_p),
674e4b17023SJohn Marino NULL)
675e4b17023SJohn Marino
676e4b17023SJohn Marino/* This hook is called when multipass scheduling evaluates instruction INSN.
677e4b17023SJohn Marino   DATA is a pointer to target-specific data that can be used to record effects
678e4b17023SJohn Marino   of INSN on CPU that are not described in DFA.
679e4b17023SJohn Marino   READY_TRY and N_READY represent the current state of search in the
680e4b17023SJohn Marino   optimization space.  The target can filter out instructions that
681e4b17023SJohn Marino   should not be tried after issueing INSN by setting corresponding
682e4b17023SJohn Marino   elements in READY_TRY to non-zero.
683e4b17023SJohn Marino   INSN is the instruction being evaluated.
684e4b17023SJohn Marino   PREV_DATA is a pointer to target-specific data corresponding
685e4b17023SJohn Marino   to a state before issueing INSN.  */
686e4b17023SJohn MarinoDEFHOOK
687e4b17023SJohn Marino(first_cycle_multipass_issue,
688e4b17023SJohn Marino "",
689e4b17023SJohn Marino void, (void *data, char *ready_try, int n_ready, rtx insn,
690e4b17023SJohn Marino	const void *prev_data), NULL)
691e4b17023SJohn Marino
692e4b17023SJohn Marino/* This hook is called when multipass scheduling backtracks from evaluation of
693e4b17023SJohn Marino   instruction corresponding to DATA.
694e4b17023SJohn Marino   DATA is a pointer to target-specific data that stores the effects
695e4b17023SJohn Marino   of instruction from which the algorithm backtracks on CPU that are not
696e4b17023SJohn Marino   described in DFA.
697e4b17023SJohn Marino   READY_TRY and N_READY represent the current state of search in the
698e4b17023SJohn Marino   optimization space.  The target can filter out instructions that
699e4b17023SJohn Marino   should not be tried after issueing INSN by setting corresponding
700e4b17023SJohn Marino   elements in READY_TRY to non-zero.  */
701e4b17023SJohn MarinoDEFHOOK
702e4b17023SJohn Marino(first_cycle_multipass_backtrack,
703e4b17023SJohn Marino "",
704e4b17023SJohn Marino void, (const void *data, char *ready_try, int n_ready), NULL)
705e4b17023SJohn Marino
706e4b17023SJohn Marino/* This hook notifies the target about the result of the concluded current
707e4b17023SJohn Marino   round of multipass scheduling.
708e4b17023SJohn Marino   DATA is a pointer.
709e4b17023SJohn Marino   If DATA is non-NULL it points to target-specific data used for multipass
710e4b17023SJohn Marino   scheduling which corresponds to instruction at the start of the chain of
711e4b17023SJohn Marino   the winning solution.  DATA is NULL when multipass scheduling cannot find
712e4b17023SJohn Marino   a good enough solution on current cycle and decides to retry later,
713e4b17023SJohn Marino   usually after advancing the cycle count.  */
714e4b17023SJohn MarinoDEFHOOK
715e4b17023SJohn Marino(first_cycle_multipass_end,
716e4b17023SJohn Marino "",
717e4b17023SJohn Marino void, (const void *data), NULL)
718e4b17023SJohn Marino
719e4b17023SJohn Marino/* This hook is called to initialize target-specific data for multipass
720e4b17023SJohn Marino   scheduling after it has been allocated.
721e4b17023SJohn Marino   DATA is a pointer to target-specific data that stores the effects
722e4b17023SJohn Marino   of instruction from which the algorithm backtracks on CPU that are not
723e4b17023SJohn Marino   described in DFA.  */
724e4b17023SJohn MarinoDEFHOOK
725e4b17023SJohn Marino(first_cycle_multipass_init,
726e4b17023SJohn Marino "",
727e4b17023SJohn Marino void, (void *data), NULL)
728e4b17023SJohn Marino
729e4b17023SJohn Marino/* This hook is called to finalize target-specific data for multipass
730e4b17023SJohn Marino   scheduling before it is deallocated.
731e4b17023SJohn Marino   DATA is a pointer to target-specific data that stores the effects
732e4b17023SJohn Marino   of instruction from which the algorithm backtracks on CPU that are not
733e4b17023SJohn Marino   described in DFA.  */
734e4b17023SJohn MarinoDEFHOOK
735e4b17023SJohn Marino(first_cycle_multipass_fini,
736e4b17023SJohn Marino "",
737e4b17023SJohn Marino void, (void *data), NULL)
738e4b17023SJohn Marino
739e4b17023SJohn Marino/* The following member value is pointer to a function called by
740e4b17023SJohn Marino   the insn scheduler before issuing insn passed as the third
741e4b17023SJohn Marino   parameter on given cycle.  If the hook returns nonzero, the
742e4b17023SJohn Marino   insn is not issued on given processors cycle.  Instead of that,
743e4b17023SJohn Marino   the processor cycle is advanced.  If the value passed through
744e4b17023SJohn Marino   the last parameter is zero, the insn ready queue is not sorted
745e4b17023SJohn Marino   on the new cycle start as usually.  The first parameter passes
746e4b17023SJohn Marino   file for debugging output.  The second one passes the scheduler
747e4b17023SJohn Marino   verbose level of the debugging output.  The forth and the fifth
748e4b17023SJohn Marino   parameter values are correspondingly processor cycle on which
749e4b17023SJohn Marino   the previous insn has been issued and the current processor cycle.  */
750e4b17023SJohn MarinoDEFHOOK
751e4b17023SJohn Marino(dfa_new_cycle,
752e4b17023SJohn Marino "",
753e4b17023SJohn Marino int, (FILE *dump, int verbose, rtx insn, int last_clock,
754e4b17023SJohn Marino       int clock, int *sort_p),
755e4b17023SJohn Marino NULL)
756e4b17023SJohn Marino
757e4b17023SJohn Marino/* The following member value is a pointer to a function called by the
758e4b17023SJohn Marino   insn scheduler.  It should return true if there exists a dependence
759e4b17023SJohn Marino   which is considered costly by the target, between the insn
760e4b17023SJohn Marino   DEP_PRO (&_DEP), and the insn DEP_CON (&_DEP).  The first parameter is
761e4b17023SJohn Marino   the dep that represents the dependence between the two insns.  The
762e4b17023SJohn Marino   second argument is the cost of the dependence as estimated by
763e4b17023SJohn Marino   the scheduler.  The last argument is the distance in cycles
764e4b17023SJohn Marino   between the already scheduled insn (first parameter) and the
765e4b17023SJohn Marino   second insn (second parameter).  */
766e4b17023SJohn MarinoDEFHOOK
767e4b17023SJohn Marino(is_costly_dependence,
768e4b17023SJohn Marino "",
769e4b17023SJohn Marino bool, (struct _dep *_dep, int cost, int distance), NULL)
770e4b17023SJohn Marino
771e4b17023SJohn MarinoDEFHOOK_UNDOC
772e4b17023SJohn Marino(adjust_cost_2,
773e4b17023SJohn Marino "Given the current cost, @var{cost}, of an insn, @var{insn}, calculate and\
774e4b17023SJohn Marino return a new cost based on its relationship to @var{dep_insn} through the\
775e4b17023SJohn Marino dependence of weakness @var{dw}.  The default is to make no adjustment.",
776e4b17023SJohn Marino int, (rtx insn, int dep_type1, rtx dep_insn, int cost, int dw), NULL)
777e4b17023SJohn Marino
778e4b17023SJohn Marino/* The following member value is a pointer to a function called
779e4b17023SJohn Marino   by the insn scheduler. This hook is called to notify the backend
780e4b17023SJohn Marino   that new instructions were emitted.  */
781e4b17023SJohn MarinoDEFHOOK
782e4b17023SJohn Marino(h_i_d_extended,
783e4b17023SJohn Marino "",
784e4b17023SJohn Marino void, (void), NULL)
785e4b17023SJohn Marino
786e4b17023SJohn Marino/* Next 5 functions are for multi-point scheduling.  */
787e4b17023SJohn Marino
788e4b17023SJohn Marino/* Allocate memory for scheduler context.  */
789e4b17023SJohn MarinoDEFHOOK
790e4b17023SJohn Marino(alloc_sched_context,
791e4b17023SJohn Marino "",
792e4b17023SJohn Marino void *, (void), NULL)
793e4b17023SJohn Marino
794e4b17023SJohn Marino/* Fills the context from the local machine scheduler context.  */
795e4b17023SJohn MarinoDEFHOOK
796e4b17023SJohn Marino(init_sched_context,
797e4b17023SJohn Marino "",
798e4b17023SJohn Marino void, (void *tc, bool clean_p), NULL)
799e4b17023SJohn Marino
800e4b17023SJohn Marino/* Sets local machine scheduler context to a saved value.  */
801e4b17023SJohn MarinoDEFHOOK
802e4b17023SJohn Marino(set_sched_context,
803e4b17023SJohn Marino "",
804e4b17023SJohn Marino void, (void *tc), NULL)
805e4b17023SJohn Marino
806e4b17023SJohn Marino/* Clears a scheduler context so it becomes like after init.  */
807e4b17023SJohn MarinoDEFHOOK
808e4b17023SJohn Marino(clear_sched_context,
809e4b17023SJohn Marino "",
810e4b17023SJohn Marino void, (void *tc), NULL)
811e4b17023SJohn Marino
812e4b17023SJohn Marino/* Frees the scheduler context.  */
813e4b17023SJohn MarinoDEFHOOK
814e4b17023SJohn Marino(free_sched_context,
815e4b17023SJohn Marino "",
816e4b17023SJohn Marino void, (void *tc), NULL)
817e4b17023SJohn Marino
818e4b17023SJohn Marino/* The following member value is a pointer to a function called
819e4b17023SJohn Marino   by the insn scheduler.
820e4b17023SJohn Marino   The first parameter is an instruction, the second parameter is the type
821e4b17023SJohn Marino   of the requested speculation, and the third parameter is a pointer to the
822e4b17023SJohn Marino   speculative pattern of the corresponding type (set if return value == 1).
823e4b17023SJohn Marino   It should return
824e4b17023SJohn Marino   -1, if there is no pattern, that will satisfy the requested speculation type,
825e4b17023SJohn Marino   0, if current pattern satisfies the requested speculation type,
826e4b17023SJohn Marino   1, if pattern of the instruction should be changed to the newly
827e4b17023SJohn Marino   generated one.  */
828e4b17023SJohn MarinoDEFHOOK
829e4b17023SJohn Marino(speculate_insn,
830e4b17023SJohn Marino "",
831e4b17023SJohn Marino int, (rtx insn, int request, rtx *new_pat), NULL)
832e4b17023SJohn Marino
833e4b17023SJohn Marino/* The following member value is a pointer to a function called
834e4b17023SJohn Marino   by the insn scheduler.  It should return true if the check instruction
835e4b17023SJohn Marino   passed as the parameter needs a recovery block.  */
836e4b17023SJohn MarinoDEFHOOK
837e4b17023SJohn Marino(needs_block_p,
838e4b17023SJohn Marino "",
839e4b17023SJohn Marino bool, (int dep_status), NULL)
840e4b17023SJohn Marino
841e4b17023SJohn Marino/* The following member value is a pointer to a function called
842e4b17023SJohn Marino   by the insn scheduler.  It should return a pattern for the check
843e4b17023SJohn Marino   instruction.
844e4b17023SJohn Marino   The first parameter is a speculative instruction, the second parameter
845e4b17023SJohn Marino   is the label of the corresponding recovery block (or null, if it is a
846e4b17023SJohn Marino   simple check).  If the mutation of the check is requested (e.g. from
847e4b17023SJohn Marino   ld.c to chk.a), the third parameter is true - in this case the first
848e4b17023SJohn Marino   parameter is the previous check.  */
849e4b17023SJohn MarinoDEFHOOK
850e4b17023SJohn Marino(gen_spec_check,
851e4b17023SJohn Marino "",
852e4b17023SJohn Marino rtx, (rtx insn, rtx label, int mutate_p), NULL)
853e4b17023SJohn Marino
854e4b17023SJohn Marino/* The following member value is a pointer to a function controlling
855e4b17023SJohn Marino   what insns from the ready insn queue will be considered for the
856e4b17023SJohn Marino   multipass insn scheduling.  If the hook returns zero for the insn
857e4b17023SJohn Marino   passed as the parameter, the insn will not be chosen to be
858e4b17023SJohn Marino   issued.  This hook is used to discard speculative instructions,
859e4b17023SJohn Marino   that stand at the first position of the ready list.  */
860e4b17023SJohn MarinoDEFHOOK
861e4b17023SJohn Marino(first_cycle_multipass_dfa_lookahead_guard_spec,
862e4b17023SJohn Marino "",
863e4b17023SJohn Marino bool, (const_rtx insn), NULL)
864e4b17023SJohn Marino
865e4b17023SJohn Marino/* The following member value is a pointer to a function that provides
866e4b17023SJohn Marino   information about the speculation capabilities of the target.
867e4b17023SJohn Marino   The parameter is a pointer to spec_info variable.  */
868e4b17023SJohn MarinoDEFHOOK
869e4b17023SJohn Marino(set_sched_flags,
870e4b17023SJohn Marino "",
871e4b17023SJohn Marino void, (struct spec_info_def *spec_info), NULL)
872e4b17023SJohn Marino
873e4b17023SJohn MarinoDEFHOOK_UNDOC
874e4b17023SJohn Marino(get_insn_spec_ds,
875e4b17023SJohn Marino "Return speculation types of instruction @var{insn}.",
876e4b17023SJohn Marino int, (rtx insn), NULL)
877e4b17023SJohn Marino
878e4b17023SJohn MarinoDEFHOOK_UNDOC
879e4b17023SJohn Marino(get_insn_checked_ds,
880e4b17023SJohn Marino "Return speculation types that are checked for instruction @var{insn}",
881e4b17023SJohn Marino int, (rtx insn), NULL)
882e4b17023SJohn Marino
883e4b17023SJohn MarinoDEFHOOK_UNDOC
884e4b17023SJohn Marino(skip_rtx_p,
885e4b17023SJohn Marino "Return bool if rtx scanning should just skip current layer and\
886e4b17023SJohn Marino advance to the inner rtxes.",
887e4b17023SJohn Marino bool, (const_rtx x), NULL)
888e4b17023SJohn Marino
889e4b17023SJohn Marino/* The following member value is a pointer to a function that provides
890e4b17023SJohn Marino   information about the target resource-based lower bound which is
891e4b17023SJohn Marino   used by the swing modulo scheduler.  The parameter is a pointer
892e4b17023SJohn Marino   to ddg variable.  */
893e4b17023SJohn MarinoDEFHOOK
894e4b17023SJohn Marino(sms_res_mii,
895e4b17023SJohn Marino "",
896e4b17023SJohn Marino int, (struct ddg *g), NULL)
897e4b17023SJohn Marino
898e4b17023SJohn Marino/* The following member value is a function that initializes dispatch
899e4b17023SJohn Marino   schedling and adds instructions to dispatch window according to its
900e4b17023SJohn Marino   parameters.  */
901e4b17023SJohn MarinoDEFHOOK
902e4b17023SJohn Marino(dispatch_do,
903e4b17023SJohn Marino"",
904e4b17023SJohn Marinovoid, (rtx insn, int x),
905e4b17023SJohn Marinohook_void_rtx_int)
906e4b17023SJohn Marino
907e4b17023SJohn Marino/* The following member value is a a function that returns true is
908e4b17023SJohn Marino   dispatch schedling is supported in hardware and condition passed
909e4b17023SJohn Marino   as the second parameter is true.  */
910e4b17023SJohn MarinoDEFHOOK
911e4b17023SJohn Marino(dispatch,
912e4b17023SJohn Marino"",
913e4b17023SJohn Marinobool, (rtx insn, int x),
914e4b17023SJohn Marinohook_bool_rtx_int_false)
915e4b17023SJohn Marino
916e4b17023SJohn MarinoDEFHOOKPOD
917e4b17023SJohn Marino(exposed_pipeline,
918e4b17023SJohn Marino"True if the processor has an exposed pipeline, which means that not just\n\
919e4b17023SJohn Marinothe order of instructions is important for correctness when scheduling, but\n\
920e4b17023SJohn Marinoalso the latencies of operations.",
921e4b17023SJohn Marinobool, false)
922e4b17023SJohn Marino
923e4b17023SJohn Marino/* The following member value is a function that returns number
924e4b17023SJohn Marino   of operations reassociator should try to put in parallel for
925e4b17023SJohn Marino   statements of the given type.  By default 1 is used.  */
926e4b17023SJohn MarinoDEFHOOK
927e4b17023SJohn Marino(reassociation_width,
928e4b17023SJohn Marino"This hook is called by tree reassociator to determine a level of\n\
929e4b17023SJohn Marinoparallelism required in output calculations chain.",
930e4b17023SJohn Marinoint, (unsigned int opc, enum machine_mode mode),
931e4b17023SJohn Marinohook_int_uint_mode_1)
932e4b17023SJohn Marino
933e4b17023SJohn MarinoHOOK_VECTOR_END (sched)
934e4b17023SJohn Marino
935e4b17023SJohn Marino/* Functions relating to vectorization.  */
936e4b17023SJohn Marino#undef HOOK_PREFIX
937e4b17023SJohn Marino#define HOOK_PREFIX "TARGET_VECTORIZE_"
938e4b17023SJohn MarinoHOOK_VECTOR (TARGET_VECTORIZE, vectorize)
939e4b17023SJohn Marino
940e4b17023SJohn Marino/* The following member value is a pointer to a function called
941e4b17023SJohn Marino   by the vectorizer, and return the decl of the target builtin
942e4b17023SJohn Marino   function.  */
943e4b17023SJohn MarinoDEFHOOK
944e4b17023SJohn Marino(builtin_mask_for_load,
945e4b17023SJohn Marino "",
946e4b17023SJohn Marino tree, (void), NULL)
947e4b17023SJohn Marino
948e4b17023SJohn Marino/* Returns a code for builtin that realizes vectorized version of
949e4b17023SJohn Marino   function, or NULL_TREE if not available.  */
950e4b17023SJohn MarinoDEFHOOK
951e4b17023SJohn Marino(builtin_vectorized_function,
952e4b17023SJohn Marino "",
953e4b17023SJohn Marino tree, (tree fndecl, tree vec_type_out, tree vec_type_in),
954e4b17023SJohn Marino default_builtin_vectorized_function)
955e4b17023SJohn Marino
956e4b17023SJohn Marino/* Returns a function declaration for a builtin that realizes the
957e4b17023SJohn Marino   vector conversion, or NULL_TREE if not available.  */
958e4b17023SJohn MarinoDEFHOOK
959e4b17023SJohn Marino(builtin_conversion,
960e4b17023SJohn Marino "",
961e4b17023SJohn Marino tree, (unsigned code, tree dest_type, tree src_type),
962e4b17023SJohn Marino default_builtin_vectorized_conversion)
963e4b17023SJohn Marino
964e4b17023SJohn Marino/* Target builtin that implements vector widening multiplication.
965e4b17023SJohn Marino   builtin_mul_widen_eve computes the element-by-element products
966e4b17023SJohn Marino   for the even elements, and builtin_mul_widen_odd computes the
967e4b17023SJohn Marino   element-by-element products for the odd elements.  */
968e4b17023SJohn MarinoDEFHOOK
969e4b17023SJohn Marino(builtin_mul_widen_even,
970e4b17023SJohn Marino "",
971e4b17023SJohn Marino tree, (tree x), NULL)
972e4b17023SJohn Marino
973e4b17023SJohn MarinoDEFHOOK
974e4b17023SJohn Marino(builtin_mul_widen_odd,
975e4b17023SJohn Marino "",
976e4b17023SJohn Marino tree, (tree x), NULL)
977e4b17023SJohn Marino
978e4b17023SJohn Marino/* Cost of different vector/scalar statements in vectorization cost
979e4b17023SJohn Marino   model. In case of misaligned vector loads and stores the cost depends
980e4b17023SJohn Marino   on the data type and misalignment value.  */
981e4b17023SJohn MarinoDEFHOOK
982e4b17023SJohn Marino(builtin_vectorization_cost,
983e4b17023SJohn Marino "",
984e4b17023SJohn Marino int, (enum vect_cost_for_stmt type_of_cost, tree vectype, int misalign),
985e4b17023SJohn Marino default_builtin_vectorization_cost)
986e4b17023SJohn Marino
987e4b17023SJohn Marino/* Return true if vector alignment is reachable (by peeling N
988e4b17023SJohn Marino   iterations) for the given type.  */
989e4b17023SJohn MarinoDEFHOOK
990e4b17023SJohn Marino(vector_alignment_reachable,
991e4b17023SJohn Marino "",
992e4b17023SJohn Marino bool, (const_tree type, bool is_packed),
993e4b17023SJohn Marino default_builtin_vector_alignment_reachable)
994e4b17023SJohn Marino
995e4b17023SJohn Marino/* Return true if a vector created for vec_perm_const is valid.
996e4b17023SJohn Marino   A NULL indicates that all constants are valid permutations.  */
997e4b17023SJohn MarinoDEFHOOK
998e4b17023SJohn Marino(vec_perm_const_ok,
999e4b17023SJohn Marino "",
1000e4b17023SJohn Marino bool, (enum machine_mode, const unsigned char *sel),
1001e4b17023SJohn Marino NULL)
1002e4b17023SJohn Marino
1003e4b17023SJohn Marino/* Return true if the target supports misaligned store/load of a
1004e4b17023SJohn Marino   specific factor denoted in the third parameter.  The last parameter
1005e4b17023SJohn Marino   is true if the access is defined in a packed struct.  */
1006e4b17023SJohn MarinoDEFHOOK
1007e4b17023SJohn Marino(support_vector_misalignment,
1008e4b17023SJohn Marino "",
1009e4b17023SJohn Marino bool,
1010e4b17023SJohn Marino (enum machine_mode mode, const_tree type, int misalignment, bool is_packed),
1011e4b17023SJohn Marino default_builtin_support_vector_misalignment)
1012e4b17023SJohn Marino
1013e4b17023SJohn Marino/* Return the builtin decl needed to load a vector of TYPE.  */
1014e4b17023SJohn MarinoDEFHOOK
1015e4b17023SJohn Marino(builtin_tm_load,
1016e4b17023SJohn Marino "This hook should return the built-in decl needed to load a vector of the "
1017e4b17023SJohn Marino "given type within a transaction.",
1018e4b17023SJohn Marino tree,
1019e4b17023SJohn Marino (tree),
1020e4b17023SJohn Marino default_builtin_tm_load_store)
1021e4b17023SJohn Marino
1022e4b17023SJohn Marino/* Return the builtin decl needed to store a vector of TYPE.  */
1023e4b17023SJohn MarinoDEFHOOK
1024e4b17023SJohn Marino(builtin_tm_store,
1025e4b17023SJohn Marino "This hook should return the built-in decl needed to store a vector of the "
1026e4b17023SJohn Marino "given type within a transaction.",
1027e4b17023SJohn Marino tree,
1028e4b17023SJohn Marino (tree),
1029e4b17023SJohn Marino default_builtin_tm_load_store)
1030e4b17023SJohn Marino
1031e4b17023SJohn Marino/* Returns the preferred mode for SIMD operations for the specified
1032e4b17023SJohn Marino   scalar mode.  */
1033e4b17023SJohn MarinoDEFHOOK
1034e4b17023SJohn Marino(preferred_simd_mode,
1035e4b17023SJohn Marino "",
1036e4b17023SJohn Marino enum machine_mode,
1037e4b17023SJohn Marino (enum machine_mode mode),
1038e4b17023SJohn Marino default_preferred_simd_mode)
1039e4b17023SJohn Marino
1040e4b17023SJohn Marino/* Returns a mask of vector sizes to iterate over when auto-vectorizing
1041e4b17023SJohn Marino   after processing the preferred one derived from preferred_simd_mode.  */
1042e4b17023SJohn MarinoDEFHOOK
1043e4b17023SJohn Marino(autovectorize_vector_sizes,
1044e4b17023SJohn Marino "",
1045e4b17023SJohn Marino unsigned int,
1046e4b17023SJohn Marino (void),
1047e4b17023SJohn Marino default_autovectorize_vector_sizes)
1048e4b17023SJohn Marino
1049e4b17023SJohn Marino/* Target builtin that implements vector gather operation.  */
1050e4b17023SJohn MarinoDEFHOOK
1051e4b17023SJohn Marino(builtin_gather,
1052e4b17023SJohn Marino "",
1053e4b17023SJohn Marino tree,
1054e4b17023SJohn Marino (const_tree mem_vectype, const_tree index_type, int scale),
1055e4b17023SJohn Marino NULL)
1056e4b17023SJohn Marino
1057e4b17023SJohn MarinoHOOK_VECTOR_END (vectorize)
1058e4b17023SJohn Marino
1059e4b17023SJohn Marino#undef HOOK_PREFIX
1060e4b17023SJohn Marino#define HOOK_PREFIX "TARGET_"
1061e4b17023SJohn Marino
1062e4b17023SJohn Marino/* Allow target specific overriding of option settings after options have
1063e4b17023SJohn Marino  been changed by an attribute or pragma or when it is reset at the
1064e4b17023SJohn Marino  end of the code affected by an attribute or pragma.  */
1065e4b17023SJohn MarinoDEFHOOK
1066e4b17023SJohn Marino(override_options_after_change,
1067e4b17023SJohn Marino "",
1068e4b17023SJohn Marino void, (void),
1069e4b17023SJohn Marino hook_void_void)
1070e4b17023SJohn Marino
1071e4b17023SJohn MarinoDEFHOOK_UNDOC
1072e4b17023SJohn Marino(eh_return_filter_mode,
1073e4b17023SJohn Marino "Return machine mode for filter value.",
1074e4b17023SJohn Marino enum machine_mode, (void),
1075e4b17023SJohn Marino default_eh_return_filter_mode)
1076e4b17023SJohn Marino
1077e4b17023SJohn Marino/* Return machine mode for libgcc expanded cmp instructions.  */
1078e4b17023SJohn MarinoDEFHOOK
1079e4b17023SJohn Marino(libgcc_cmp_return_mode,
1080e4b17023SJohn Marino "",
1081e4b17023SJohn Marino enum machine_mode, (void),
1082e4b17023SJohn Marino default_libgcc_cmp_return_mode)
1083e4b17023SJohn Marino
1084e4b17023SJohn Marino/* Return machine mode for libgcc expanded shift instructions.  */
1085e4b17023SJohn MarinoDEFHOOK
1086e4b17023SJohn Marino(libgcc_shift_count_mode,
1087e4b17023SJohn Marino "",
1088e4b17023SJohn Marino enum machine_mode, (void),
1089e4b17023SJohn Marino default_libgcc_shift_count_mode)
1090e4b17023SJohn Marino
1091e4b17023SJohn Marino/* Return machine mode to be used for _Unwind_Word type.  */
1092e4b17023SJohn MarinoDEFHOOK
1093e4b17023SJohn Marino(unwind_word_mode,
1094e4b17023SJohn Marino "",
1095e4b17023SJohn Marino enum machine_mode, (void),
1096e4b17023SJohn Marino default_unwind_word_mode)
1097e4b17023SJohn Marino
1098e4b17023SJohn Marino/* Given two decls, merge their attributes and return the result.  */
1099e4b17023SJohn MarinoDEFHOOK
1100e4b17023SJohn Marino(merge_decl_attributes,
1101e4b17023SJohn Marino "",
1102e4b17023SJohn Marino tree, (tree olddecl, tree newdecl),
1103e4b17023SJohn Marino merge_decl_attributes)
1104e4b17023SJohn Marino
1105e4b17023SJohn Marino/* Given two types, merge their attributes and return the result.  */
1106e4b17023SJohn MarinoDEFHOOK
1107e4b17023SJohn Marino(merge_type_attributes,
1108e4b17023SJohn Marino "",
1109e4b17023SJohn Marino tree, (tree type1, tree type2),
1110e4b17023SJohn Marino merge_type_attributes)
1111e4b17023SJohn Marino
1112e4b17023SJohn Marino/* Table of machine attributes and functions to handle them.
1113e4b17023SJohn Marino   Ignored if NULL.  */
1114e4b17023SJohn MarinoDEFHOOKPOD
1115e4b17023SJohn Marino(attribute_table,
1116e4b17023SJohn Marino "",
1117e4b17023SJohn Marino const struct attribute_spec *, NULL)
1118e4b17023SJohn Marino
1119e4b17023SJohn Marino/* Return true iff attribute NAME expects a plain identifier as its first
1120e4b17023SJohn Marino   argument.  */
1121e4b17023SJohn MarinoDEFHOOK
1122e4b17023SJohn Marino(attribute_takes_identifier_p,
1123e4b17023SJohn Marino "",
1124e4b17023SJohn Marino bool, (const_tree name),
1125e4b17023SJohn Marino hook_bool_const_tree_false)
1126e4b17023SJohn Marino
1127e4b17023SJohn Marino/* Return zero if the attributes on TYPE1 and TYPE2 are incompatible,
1128e4b17023SJohn Marino   one if they are compatible and two if they are nearly compatible
1129e4b17023SJohn Marino   (which causes a warning to be generated).  */
1130e4b17023SJohn MarinoDEFHOOK
1131e4b17023SJohn Marino(comp_type_attributes,
1132e4b17023SJohn Marino "",
1133e4b17023SJohn Marino int, (const_tree type1, const_tree type2),
1134e4b17023SJohn Marino hook_int_const_tree_const_tree_1)
1135e4b17023SJohn Marino
1136e4b17023SJohn Marino/* Assign default attributes to the newly defined TYPE.  */
1137e4b17023SJohn MarinoDEFHOOK
1138e4b17023SJohn Marino(set_default_type_attributes,
1139e4b17023SJohn Marino "",
1140e4b17023SJohn Marino void, (tree type),
1141e4b17023SJohn Marino hook_void_tree)
1142e4b17023SJohn Marino
1143e4b17023SJohn Marino/* Insert attributes on the newly created DECL.  */
1144e4b17023SJohn MarinoDEFHOOK
1145e4b17023SJohn Marino(insert_attributes,
1146e4b17023SJohn Marino "",
1147e4b17023SJohn Marino void, (tree node, tree *attr_ptr),
1148e4b17023SJohn Marino hook_void_tree_treeptr)
1149e4b17023SJohn Marino
1150e4b17023SJohn Marino/* Return true if FNDECL (which has at least one machine attribute)
1151e4b17023SJohn Marino   can be inlined despite its machine attributes, false otherwise.  */
1152e4b17023SJohn MarinoDEFHOOK
1153e4b17023SJohn Marino(function_attribute_inlinable_p,
1154e4b17023SJohn Marino "",
1155e4b17023SJohn Marino bool, (const_tree fndecl),
1156e4b17023SJohn Marino hook_bool_const_tree_false)
1157e4b17023SJohn Marino
1158e4b17023SJohn Marino/* Return true if bitfields in RECORD_TYPE should follow the
1159e4b17023SJohn Marino   Microsoft Visual C++ bitfield layout rules.  */
1160e4b17023SJohn MarinoDEFHOOK
1161e4b17023SJohn Marino(ms_bitfield_layout_p,
1162e4b17023SJohn Marino "",
1163e4b17023SJohn Marino bool, (const_tree record_type),
1164e4b17023SJohn Marino hook_bool_const_tree_false)
1165e4b17023SJohn Marino
1166e4b17023SJohn Marino/* For now this is only an interface to WORDS_BIG_ENDIAN for
1167e4b17023SJohn Marino   target-independent code like the front ends, need performance testing
1168e4b17023SJohn Marino   before switching completely to the target hook.  */
1169e4b17023SJohn MarinoDEFHOOK_UNDOC
1170e4b17023SJohn Marino(words_big_endian,
1171e4b17023SJohn Marino "",
1172e4b17023SJohn Marino bool, (void),
1173e4b17023SJohn Marino targhook_words_big_endian)
1174e4b17023SJohn Marino
1175e4b17023SJohn Marino/* Likewise for FLOAT_WORDS_BIG_ENDIAN.  */
1176e4b17023SJohn MarinoDEFHOOK_UNDOC
1177e4b17023SJohn Marino(float_words_big_endian,
1178e4b17023SJohn Marino "",
1179e4b17023SJohn Marino bool, (void),
1180e4b17023SJohn Marino targhook_float_words_big_endian)
1181e4b17023SJohn Marino
1182e4b17023SJohn Marino/* True if the target supports decimal floating point.  */
1183e4b17023SJohn MarinoDEFHOOK
1184e4b17023SJohn Marino(decimal_float_supported_p,
1185e4b17023SJohn Marino "",
1186e4b17023SJohn Marino bool, (void),
1187e4b17023SJohn Marino default_decimal_float_supported_p)
1188e4b17023SJohn Marino
1189e4b17023SJohn Marino/* True if the target supports fixed-point.  */
1190e4b17023SJohn MarinoDEFHOOK
1191e4b17023SJohn Marino(fixed_point_supported_p,
1192e4b17023SJohn Marino "",
1193e4b17023SJohn Marino bool, (void),
1194e4b17023SJohn Marino default_fixed_point_supported_p)
1195e4b17023SJohn Marino
1196e4b17023SJohn Marino/* Return true if anonymous bitfields affect structure alignment.  */
1197e4b17023SJohn MarinoDEFHOOK
1198e4b17023SJohn Marino(align_anon_bitfield,
1199e4b17023SJohn Marino "",
1200e4b17023SJohn Marino bool, (void),
1201e4b17023SJohn Marino hook_bool_void_false)
1202e4b17023SJohn Marino
1203e4b17023SJohn Marino/* Return true if volatile bitfields should use the narrowest type possible.
1204e4b17023SJohn Marino   Return false if they should use the container type.  */
1205e4b17023SJohn MarinoDEFHOOK
1206e4b17023SJohn Marino(narrow_volatile_bitfield,
1207e4b17023SJohn Marino "",
1208e4b17023SJohn Marino bool, (void),
1209e4b17023SJohn Marino hook_bool_void_false)
1210e4b17023SJohn Marino
1211e4b17023SJohn Marino/* Set up target-specific built-in functions.  */
1212e4b17023SJohn MarinoDEFHOOK
1213e4b17023SJohn Marino(init_builtins,
1214e4b17023SJohn Marino "",
1215e4b17023SJohn Marino void, (void),
1216e4b17023SJohn Marino hook_void_void)
1217e4b17023SJohn Marino
1218e4b17023SJohn Marino/* Initialize (if INITIALIZE_P is true) and return the target-specific
1219e4b17023SJohn Marino   built-in function decl for CODE.
1220e4b17023SJohn Marino   Return NULL if that is not possible.  Return error_mark_node if CODE
1221e4b17023SJohn Marino   is outside of the range of valid target builtin function codes.  */
1222e4b17023SJohn MarinoDEFHOOK
1223e4b17023SJohn Marino(builtin_decl,
1224e4b17023SJohn Marino "",
1225e4b17023SJohn Marino tree, (unsigned code, bool initialize_p), NULL)
1226e4b17023SJohn Marino
1227e4b17023SJohn Marino/* Expand a target-specific builtin.  */
1228e4b17023SJohn MarinoDEFHOOK
1229e4b17023SJohn Marino(expand_builtin,
1230e4b17023SJohn Marino "",
1231e4b17023SJohn Marino rtx,
1232e4b17023SJohn Marino (tree exp, rtx target, rtx subtarget, enum machine_mode mode, int ignore),
1233e4b17023SJohn Marino default_expand_builtin)
1234e4b17023SJohn Marino
1235e4b17023SJohn Marino/* Select a replacement for a target-specific builtin.  This is done
1236e4b17023SJohn Marino   *before* regular type checking, and so allows the target to
1237e4b17023SJohn Marino   implement a crude form of function overloading.  The result is a
1238e4b17023SJohn Marino   complete expression that implements the operation.  PARAMS really
1239e4b17023SJohn Marino   has type VEC(tree,gc)*, but we don't want to include tree.h here.  */
1240e4b17023SJohn MarinoDEFHOOK
1241e4b17023SJohn Marino(resolve_overloaded_builtin,
1242e4b17023SJohn Marino "",
1243e4b17023SJohn Marino tree, (unsigned int /*location_t*/ loc, tree fndecl, void *arglist), NULL)
1244e4b17023SJohn Marino
1245e4b17023SJohn Marino/* Fold a target-specific builtin.  */
1246e4b17023SJohn MarinoDEFHOOK
1247e4b17023SJohn Marino(fold_builtin,
1248e4b17023SJohn Marino "",
1249e4b17023SJohn Marino tree, (tree fndecl, int n_args, tree *argp, bool ignore),
1250e4b17023SJohn Marino hook_tree_tree_int_treep_bool_null)
1251e4b17023SJohn Marino
1252e4b17023SJohn Marino/* Returns a code for a target-specific builtin that implements
1253e4b17023SJohn Marino   reciprocal of the function, or NULL_TREE if not available.  */
1254e4b17023SJohn MarinoDEFHOOK
1255e4b17023SJohn Marino(builtin_reciprocal,
1256e4b17023SJohn Marino "",
1257e4b17023SJohn Marino tree, (unsigned fn, bool md_fn, bool sqrt),
1258e4b17023SJohn Marino default_builtin_reciprocal)
1259e4b17023SJohn Marino
1260e4b17023SJohn Marino/* For a vendor-specific TYPE, return a pointer to a statically-allocated
1261e4b17023SJohn Marino   string containing the C++ mangling for TYPE.  In all other cases, return
1262e4b17023SJohn Marino   NULL.  */
1263e4b17023SJohn MarinoDEFHOOK
1264e4b17023SJohn Marino(mangle_type,
1265e4b17023SJohn Marino "",
1266e4b17023SJohn Marino const char *, (const_tree type),
1267e4b17023SJohn Marino hook_constcharptr_const_tree_null)
1268e4b17023SJohn Marino
1269e4b17023SJohn Marino/* Make any adjustments to libfunc names needed for this target.  */
1270e4b17023SJohn MarinoDEFHOOK
1271e4b17023SJohn Marino(init_libfuncs,
1272e4b17023SJohn Marino "",
1273e4b17023SJohn Marino void, (void),
1274e4b17023SJohn Marino hook_void_void)
1275e4b17023SJohn Marino
1276e4b17023SJohn Marino /* Add a __gnu_ prefix to library functions rather than just __.  */
1277e4b17023SJohn MarinoDEFHOOKPOD
1278e4b17023SJohn Marino(libfunc_gnu_prefix,
1279e4b17023SJohn Marino "If false (the default), internal library routines start with two\n\
1280e4b17023SJohn Marinounderscores.  If set to true, these routines start with @code{__gnu_}\n\
1281e4b17023SJohn Marinoinstead.  E.g., @code{__muldi3} changes to @code{__gnu_muldi3}.  This\n\
1282e4b17023SJohn Marinocurrently only affects functions defined in @file{libgcc2.c}.  If this\n\
1283e4b17023SJohn Marinois set to true, the @file{tm.h} file must also\n\
1284e4b17023SJohn Marino@code{#define LIBGCC2_GNU_PREFIX}.",
1285e4b17023SJohn Marino  bool, false)
1286e4b17023SJohn Marino
1287e4b17023SJohn Marino/* Given a decl, a section name, and whether the decl initializer
1288e4b17023SJohn Marino   has relocs, choose attributes for the section.  */
1289e4b17023SJohn Marino/* ??? Should be merged with SELECT_SECTION and UNIQUE_SECTION.  */
1290e4b17023SJohn MarinoDEFHOOK
1291e4b17023SJohn Marino(section_type_flags,
1292e4b17023SJohn Marino "",
1293e4b17023SJohn Marino unsigned int, (tree decl, const char *name, int reloc),
1294e4b17023SJohn Marino default_section_type_flags)
1295e4b17023SJohn Marino
1296e4b17023SJohn Marino/* True if new jumps cannot be created, to replace existing ones or
1297e4b17023SJohn Marino   not, at the current point in the compilation.  */
1298e4b17023SJohn MarinoDEFHOOK
1299e4b17023SJohn Marino(cannot_modify_jumps_p,
1300e4b17023SJohn Marino "",
1301e4b17023SJohn Marino bool, (void),
1302e4b17023SJohn Marino hook_bool_void_false)
1303e4b17023SJohn Marino
1304e4b17023SJohn Marino/* Return a register class for which branch target register
1305e4b17023SJohn Marino   optimizations should be applied.  */
1306e4b17023SJohn MarinoDEFHOOK
1307e4b17023SJohn Marino(branch_target_register_class,
1308e4b17023SJohn Marino "",
1309e4b17023SJohn Marino reg_class_t, (void),
1310e4b17023SJohn Marino default_branch_target_register_class)
1311e4b17023SJohn Marino
1312e4b17023SJohn Marino/* Return true if branch target register optimizations should include
1313e4b17023SJohn Marino   callee-saved registers that are not already live during the current
1314e4b17023SJohn Marino   function.  AFTER_PE_GEN is true if prologues and epilogues have
1315e4b17023SJohn Marino   already been generated.  */
1316e4b17023SJohn MarinoDEFHOOK
1317e4b17023SJohn Marino(branch_target_register_callee_saved,
1318e4b17023SJohn Marino "",
1319e4b17023SJohn Marino bool, (bool after_prologue_epilogue_gen),
1320e4b17023SJohn Marino hook_bool_bool_false)
1321e4b17023SJohn Marino
1322e4b17023SJohn Marino/* Return true if the target supports conditional execution.  */
1323e4b17023SJohn MarinoDEFHOOK
1324e4b17023SJohn Marino(have_conditional_execution,
1325e4b17023SJohn Marino "",
1326e4b17023SJohn Marino bool, (void),
1327e4b17023SJohn Marino default_have_conditional_execution)
1328e4b17023SJohn Marino
1329e4b17023SJohn Marino/* Return a new value for loop unroll size.  */
1330e4b17023SJohn MarinoDEFHOOK
1331e4b17023SJohn Marino(loop_unroll_adjust,
1332e4b17023SJohn Marino "",
1333e4b17023SJohn Marino unsigned, (unsigned nunroll, struct loop *loop),
1334e4b17023SJohn Marino NULL)
1335e4b17023SJohn Marino
1336e4b17023SJohn Marino/* True if X is a legitimate MODE-mode immediate operand.  */
1337e4b17023SJohn MarinoDEFHOOK
1338e4b17023SJohn Marino(legitimate_constant_p,
1339e4b17023SJohn Marino "",
1340e4b17023SJohn Marino bool, (enum machine_mode mode, rtx x),
1341e4b17023SJohn Marino hook_bool_mode_rtx_true)
1342e4b17023SJohn Marino
1343e4b17023SJohn Marino/* True if the constant X cannot be placed in the constant pool.  */
1344e4b17023SJohn MarinoDEFHOOK
1345e4b17023SJohn Marino(cannot_force_const_mem,
1346e4b17023SJohn Marino "",
1347e4b17023SJohn Marino bool, (enum machine_mode mode, rtx x),
1348e4b17023SJohn Marino hook_bool_mode_rtx_false)
1349e4b17023SJohn Marino
1350e4b17023SJohn MarinoDEFHOOK_UNDOC
1351e4b17023SJohn Marino(cannot_copy_insn_p,
1352e4b17023SJohn Marino "True if the insn @var{x} cannot be duplicated.",
1353e4b17023SJohn Marino bool, (rtx), NULL)
1354e4b17023SJohn Marino
1355e4b17023SJohn Marino/* True if X is considered to be commutative.  */
1356e4b17023SJohn MarinoDEFHOOK
1357e4b17023SJohn Marino(commutative_p,
1358e4b17023SJohn Marino "",
1359e4b17023SJohn Marino bool, (const_rtx x, int outer_code),
1360e4b17023SJohn Marino hook_bool_const_rtx_commutative_p)
1361e4b17023SJohn Marino
1362e4b17023SJohn Marino/* True if ADDR is an address-expression whose effect depends
1363e4b17023SJohn Marino   on the mode of the memory reference it is used in.  */
1364e4b17023SJohn MarinoDEFHOOK
1365e4b17023SJohn Marino(mode_dependent_address_p,
1366e4b17023SJohn Marino "",
1367e4b17023SJohn Marino bool, (const_rtx addr),
1368e4b17023SJohn Marino default_mode_dependent_address_p)
1369e4b17023SJohn Marino
1370e4b17023SJohn Marino/* Given an invalid address X for a given machine mode, try machine-specific
1371e4b17023SJohn Marino   ways to make it legitimate.  Return X or an invalid address on failure.  */
1372e4b17023SJohn MarinoDEFHOOK
1373e4b17023SJohn Marino(legitimize_address,
1374e4b17023SJohn Marino "",
1375e4b17023SJohn Marino rtx, (rtx x, rtx oldx, enum machine_mode mode),
1376e4b17023SJohn Marino default_legitimize_address)
1377e4b17023SJohn Marino
1378e4b17023SJohn Marino/* Given an address RTX, undo the effects of LEGITIMIZE_ADDRESS.  */
1379e4b17023SJohn MarinoDEFHOOK
1380e4b17023SJohn Marino(delegitimize_address,
1381e4b17023SJohn Marino "",
1382e4b17023SJohn Marino rtx, (rtx x),
1383e4b17023SJohn Marino delegitimize_mem_from_attrs)
1384e4b17023SJohn Marino
1385e4b17023SJohn Marino/* Given an RTX, return true if it is not ok to emit it into debug info
1386e4b17023SJohn Marino   section.  */
1387e4b17023SJohn MarinoDEFHOOK
1388e4b17023SJohn Marino(const_not_ok_for_debug_p,
1389e4b17023SJohn Marino "",
1390e4b17023SJohn Marino bool, (rtx x),
1391e4b17023SJohn Marino hook_bool_rtx_false)
1392e4b17023SJohn Marino
1393e4b17023SJohn Marino/* Given an address RTX, say whether it is valid.  */
1394e4b17023SJohn MarinoDEFHOOK
1395e4b17023SJohn Marino(legitimate_address_p,
1396e4b17023SJohn Marino "",
1397e4b17023SJohn Marino bool, (enum machine_mode mode, rtx x, bool strict),
1398e4b17023SJohn Marino default_legitimate_address_p)
1399e4b17023SJohn Marino
1400e4b17023SJohn Marino/* True if the given constant can be put into an object_block.  */
1401e4b17023SJohn MarinoDEFHOOK
1402e4b17023SJohn Marino(use_blocks_for_constant_p,
1403e4b17023SJohn Marino "",
1404e4b17023SJohn Marino bool, (enum machine_mode mode, const_rtx x),
1405e4b17023SJohn Marino hook_bool_mode_const_rtx_false)
1406e4b17023SJohn Marino
1407e4b17023SJohn Marino/* The minimum and maximum byte offsets for anchored addresses.  */
1408e4b17023SJohn MarinoDEFHOOKPOD
1409e4b17023SJohn Marino(min_anchor_offset,
1410e4b17023SJohn Marino "",
1411e4b17023SJohn Marino HOST_WIDE_INT, 0)
1412e4b17023SJohn Marino
1413e4b17023SJohn MarinoDEFHOOKPOD
1414e4b17023SJohn Marino(max_anchor_offset,
1415e4b17023SJohn Marino "",
1416e4b17023SJohn Marino HOST_WIDE_INT, 0)
1417e4b17023SJohn Marino
1418e4b17023SJohn Marino/* True if section anchors can be used to access the given symbol.  */
1419e4b17023SJohn MarinoDEFHOOK
1420e4b17023SJohn Marino(use_anchors_for_symbol_p,
1421e4b17023SJohn Marino "",
1422e4b17023SJohn Marino bool, (const_rtx x),
1423e4b17023SJohn Marino default_use_anchors_for_symbol_p)
1424e4b17023SJohn Marino
1425e4b17023SJohn Marino/* True if it is OK to do sibling call optimization for the specified
1426e4b17023SJohn Marino   call expression EXP.  DECL will be the called function, or NULL if
1427e4b17023SJohn Marino   this is an indirect call.  */
1428e4b17023SJohn MarinoDEFHOOK
1429e4b17023SJohn Marino(function_ok_for_sibcall,
1430e4b17023SJohn Marino "",
1431e4b17023SJohn Marino bool, (tree decl, tree exp),
1432e4b17023SJohn Marino hook_bool_tree_tree_false)
1433e4b17023SJohn Marino
1434e4b17023SJohn Marino/* Establish appropriate back-end context for processing the function
1435e4b17023SJohn Marino   FNDECL.  The argument might be NULL to indicate processing at top
1436e4b17023SJohn Marino   level, outside of any function scope.  */
1437e4b17023SJohn MarinoDEFHOOK
1438e4b17023SJohn Marino(set_current_function,
1439e4b17023SJohn Marino "",
1440e4b17023SJohn Marino void, (tree decl), hook_void_tree)
1441e4b17023SJohn Marino
1442e4b17023SJohn Marino/* True if EXP should be placed in a "small data" section.  */
1443e4b17023SJohn MarinoDEFHOOK
1444e4b17023SJohn Marino(in_small_data_p,
1445e4b17023SJohn Marino "",
1446e4b17023SJohn Marino bool, (const_tree exp),
1447e4b17023SJohn Marino hook_bool_const_tree_false)
1448e4b17023SJohn Marino
1449e4b17023SJohn Marino/* True if EXP names an object for which name resolution must resolve
1450e4b17023SJohn Marino   to the current executable or shared library.  */
1451e4b17023SJohn MarinoDEFHOOK
1452e4b17023SJohn Marino(binds_local_p,
1453e4b17023SJohn Marino "",
1454e4b17023SJohn Marino bool, (const_tree exp),
1455e4b17023SJohn Marino default_binds_local_p)
1456e4b17023SJohn Marino
1457e4b17023SJohn Marino/* Check if profiling code is before or after prologue.  */
1458e4b17023SJohn MarinoDEFHOOK
1459e4b17023SJohn Marino(profile_before_prologue,
1460e4b17023SJohn Marino "It returns true if target wants profile code emitted before prologue.\n\n\
1461e4b17023SJohn MarinoThe default version of this hook use the target macro\n\
1462e4b17023SJohn Marino@code{PROFILE_BEFORE_PROLOGUE}.",
1463e4b17023SJohn Marino bool, (void),
1464e4b17023SJohn Marino default_profile_before_prologue)
1465e4b17023SJohn Marino
1466e4b17023SJohn Marino/* Modify and return the identifier of a DECL's external name,
1467e4b17023SJohn Marino   originally identified by ID, as required by the target,
1468e4b17023SJohn Marino   (eg, append @nn to windows32 stdcall function names).
1469e4b17023SJohn Marino   The default is to return ID without modification. */
1470e4b17023SJohn MarinoDEFHOOK
1471e4b17023SJohn Marino(mangle_decl_assembler_name,
1472e4b17023SJohn Marino "",
1473e4b17023SJohn Marino tree, (tree decl, tree  id),
1474e4b17023SJohn Marino default_mangle_decl_assembler_name)
1475e4b17023SJohn Marino
1476e4b17023SJohn Marino/* Do something target-specific to record properties of the DECL into
1477e4b17023SJohn Marino   the associated SYMBOL_REF.  */
1478e4b17023SJohn MarinoDEFHOOK
1479e4b17023SJohn Marino(encode_section_info,
1480e4b17023SJohn Marino "",
1481e4b17023SJohn Marino void, (tree decl, rtx rtl, int new_decl_p),
1482e4b17023SJohn Marino default_encode_section_info)
1483e4b17023SJohn Marino
1484e4b17023SJohn Marino/* Undo the effects of encode_section_info on the symbol string.  */
1485e4b17023SJohn MarinoDEFHOOK
1486e4b17023SJohn Marino(strip_name_encoding,
1487e4b17023SJohn Marino "",
1488e4b17023SJohn Marino const char *, (const char *name),
1489e4b17023SJohn Marino default_strip_name_encoding)
1490e4b17023SJohn Marino
1491e4b17023SJohn Marino/* If shift optabs for MODE are known to always truncate the shift count,
1492e4b17023SJohn Marino   return the mask that they apply.  Return 0 otherwise.  */
1493e4b17023SJohn MarinoDEFHOOK
1494e4b17023SJohn Marino(shift_truncation_mask,
1495e4b17023SJohn Marino "",
1496e4b17023SJohn Marino unsigned HOST_WIDE_INT, (enum machine_mode mode),
1497e4b17023SJohn Marino default_shift_truncation_mask)
1498e4b17023SJohn Marino
1499e4b17023SJohn Marino/* Return the number of divisions in the given MODE that should be present,
1500e4b17023SJohn Marino   so that it is profitable to turn the division into a multiplication by
1501e4b17023SJohn Marino   the reciprocal.  */
1502e4b17023SJohn MarinoDEFHOOK
1503e4b17023SJohn Marino(min_divisions_for_recip_mul,
1504e4b17023SJohn Marino "",
1505e4b17023SJohn Marino unsigned int, (enum machine_mode mode),
1506e4b17023SJohn Marino default_min_divisions_for_recip_mul)
1507e4b17023SJohn Marino
1508e4b17023SJohn Marino/* If the representation of integral MODE is such that values are
1509e4b17023SJohn Marino   always sign-extended to a wider mode MODE_REP then return
1510e4b17023SJohn Marino   SIGN_EXTEND.  Return UNKNOWN otherwise.  */
1511e4b17023SJohn Marino/* Note that the return type ought to be RTX_CODE, but that's not
1512e4b17023SJohn Marino   necessarily defined at this point.  */
1513e4b17023SJohn MarinoDEFHOOK
1514e4b17023SJohn Marino(mode_rep_extended,
1515e4b17023SJohn Marino "",
1516e4b17023SJohn Marino int, (enum machine_mode mode, enum machine_mode rep_mode),
1517e4b17023SJohn Marino default_mode_rep_extended)
1518e4b17023SJohn Marino
1519e4b17023SJohn Marino/* True if MODE is valid for a pointer in __attribute__((mode("MODE"))).  */
1520e4b17023SJohn MarinoDEFHOOK
1521e4b17023SJohn Marino(valid_pointer_mode,
1522e4b17023SJohn Marino "",
1523e4b17023SJohn Marino bool, (enum machine_mode mode),
1524e4b17023SJohn Marino default_valid_pointer_mode)
1525e4b17023SJohn Marino
1526e4b17023SJohn Marino/* Disambiguate with errno.  */
1527e4b17023SJohn MarinoDEFHOOK
1528e4b17023SJohn Marino(ref_may_alias_errno,
1529e4b17023SJohn Marino "Define this to return nonzero if the memory reference @var{ref}\
1530e4b17023SJohn Marino  may alias with the system C library errno location.  The default\
1531e4b17023SJohn Marino  version of this hook assumes the system C library errno location\
1532e4b17023SJohn Marino  is either a declaration of type int or accessed by dereferencing\
1533e4b17023SJohn Marino  a pointer to int.",
1534e4b17023SJohn Marino bool, (struct ao_ref_s *ref),
1535e4b17023SJohn Marino default_ref_may_alias_errno)
1536e4b17023SJohn Marino
1537e4b17023SJohn Marino/* Support for named address spaces.  */
1538e4b17023SJohn Marino#undef HOOK_PREFIX
1539e4b17023SJohn Marino#define HOOK_PREFIX "TARGET_ADDR_SPACE_"
1540e4b17023SJohn MarinoHOOK_VECTOR (TARGET_ADDR_SPACE_HOOKS, addr_space)
1541e4b17023SJohn Marino
1542e4b17023SJohn Marino/* MODE to use for a pointer into another address space.  */
1543e4b17023SJohn MarinoDEFHOOK
1544e4b17023SJohn Marino(pointer_mode,
1545e4b17023SJohn Marino "",
1546e4b17023SJohn Marino enum machine_mode, (addr_space_t address_space),
1547e4b17023SJohn Marino default_addr_space_pointer_mode)
1548e4b17023SJohn Marino
1549e4b17023SJohn Marino/* MODE to use for an address in another address space.  */
1550e4b17023SJohn MarinoDEFHOOK
1551e4b17023SJohn Marino(address_mode,
1552e4b17023SJohn Marino "",
1553e4b17023SJohn Marino enum machine_mode, (addr_space_t address_space),
1554e4b17023SJohn Marino default_addr_space_address_mode)
1555e4b17023SJohn Marino
1556e4b17023SJohn Marino/* True if MODE is valid for a pointer in __attribute__((mode("MODE")))
1557e4b17023SJohn Marino   in another address space.  */
1558e4b17023SJohn MarinoDEFHOOK
1559e4b17023SJohn Marino(valid_pointer_mode,
1560e4b17023SJohn Marino "",
1561e4b17023SJohn Marino bool, (enum machine_mode mode, addr_space_t as),
1562e4b17023SJohn Marino default_addr_space_valid_pointer_mode)
1563e4b17023SJohn Marino
1564e4b17023SJohn Marino/* True if an address is a valid memory address to a given named address
1565e4b17023SJohn Marino   space for a given mode.  */
1566e4b17023SJohn MarinoDEFHOOK
1567e4b17023SJohn Marino(legitimate_address_p,
1568e4b17023SJohn Marino "",
1569e4b17023SJohn Marino bool, (enum machine_mode mode, rtx exp, bool strict, addr_space_t as),
1570e4b17023SJohn Marino default_addr_space_legitimate_address_p)
1571e4b17023SJohn Marino
1572e4b17023SJohn Marino/* Return an updated address to convert an invalid pointer to a named
1573e4b17023SJohn Marino   address space to a valid one.  If NULL_RTX is returned use machine
1574e4b17023SJohn Marino   independent methods to make the address valid.  */
1575e4b17023SJohn MarinoDEFHOOK
1576e4b17023SJohn Marino(legitimize_address,
1577e4b17023SJohn Marino "",
1578e4b17023SJohn Marino rtx, (rtx x, rtx oldx, enum machine_mode mode, addr_space_t as),
1579e4b17023SJohn Marino default_addr_space_legitimize_address)
1580e4b17023SJohn Marino
1581e4b17023SJohn Marino/* True if one named address space is a subset of another named address. */
1582e4b17023SJohn MarinoDEFHOOK
1583e4b17023SJohn Marino(subset_p,
1584e4b17023SJohn Marino "",
1585e4b17023SJohn Marino bool, (addr_space_t subset, addr_space_t superset),
1586e4b17023SJohn Marino default_addr_space_subset_p)
1587e4b17023SJohn Marino
1588e4b17023SJohn Marino/* Function to convert an rtl expression from one address space to another.  */
1589e4b17023SJohn MarinoDEFHOOK
1590e4b17023SJohn Marino(convert,
1591e4b17023SJohn Marino "",
1592e4b17023SJohn Marino rtx, (rtx op, tree from_type, tree to_type),
1593e4b17023SJohn Marino default_addr_space_convert)
1594e4b17023SJohn Marino
1595e4b17023SJohn MarinoHOOK_VECTOR_END (addr_space)
1596e4b17023SJohn Marino
1597e4b17023SJohn Marino#undef HOOK_PREFIX
1598e4b17023SJohn Marino#define HOOK_PREFIX "TARGET_"
1599e4b17023SJohn Marino
1600e4b17023SJohn Marino/* True if MODE is valid for the target.  By "valid", we mean able to
1601e4b17023SJohn Marino   be manipulated in non-trivial ways.  In particular, this means all
1602e4b17023SJohn Marino   the arithmetic is supported.  */
1603e4b17023SJohn MarinoDEFHOOK
1604e4b17023SJohn Marino(scalar_mode_supported_p,
1605e4b17023SJohn Marino "",
1606e4b17023SJohn Marino bool, (enum machine_mode mode),
1607e4b17023SJohn Marino default_scalar_mode_supported_p)
1608e4b17023SJohn Marino
1609e4b17023SJohn Marino/* Similarly for vector modes.  "Supported" here is less strict.  At
1610e4b17023SJohn Marino   least some operations are supported; need to check optabs or builtins
1611e4b17023SJohn Marino   for further details.  */
1612e4b17023SJohn MarinoDEFHOOK
1613e4b17023SJohn Marino(vector_mode_supported_p,
1614e4b17023SJohn Marino "",
1615e4b17023SJohn Marino bool, (enum machine_mode mode),
1616e4b17023SJohn Marino hook_bool_mode_false)
1617e4b17023SJohn Marino
1618e4b17023SJohn MarinoDEFHOOK
1619e4b17023SJohn Marino(vector_alignment,
1620e4b17023SJohn Marino "This hook can be used to define the alignment for a vector of type\n\
1621e4b17023SJohn Marino@var{type}, in order to comply with a platform ABI.  The default is to\n\
1622e4b17023SJohn Marinorequire natural alignment for vector types.  The alignment returned by\n\
1623e4b17023SJohn Marinothis hook must be a power-of-two multiple of the default alignment of\n\
1624e4b17023SJohn Marinothe vector element type.",
1625e4b17023SJohn Marino HOST_WIDE_INT, (const_tree type),
1626e4b17023SJohn Marino default_vector_alignment)
1627e4b17023SJohn Marino
1628e4b17023SJohn Marino/* True if we should try to use a scalar mode to represent an array,
1629e4b17023SJohn Marino   overriding the usual MAX_FIXED_MODE limit.  */
1630e4b17023SJohn MarinoDEFHOOK
1631e4b17023SJohn Marino(array_mode_supported_p,
1632e4b17023SJohn Marino "Return true if GCC should try to use a scalar mode to store an array\n\
1633e4b17023SJohn Marinoof @var{nelems} elements, given that each element has mode @var{mode}.\n\
1634e4b17023SJohn MarinoReturning true here overrides the usual @code{MAX_FIXED_MODE} limit\n\
1635e4b17023SJohn Marinoand allows GCC to use any defined integer mode.\n\
1636e4b17023SJohn Marino\n\
1637e4b17023SJohn MarinoOne use of this hook is to support vector load and store operations\n\
1638e4b17023SJohn Marinothat operate on several homogeneous vectors.  For example, ARM NEON\n\
1639e4b17023SJohn Marinohas operations like:\n\
1640e4b17023SJohn Marino\n\
1641e4b17023SJohn Marino@smallexample\n\
1642e4b17023SJohn Marinoint8x8x3_t vld3_s8 (const int8_t *)\n\
1643e4b17023SJohn Marino@end smallexample\n\
1644e4b17023SJohn Marino\n\
1645e4b17023SJohn Marinowhere the return type is defined as:\n\
1646e4b17023SJohn Marino\n\
1647e4b17023SJohn Marino@smallexample\n\
1648e4b17023SJohn Marinotypedef struct int8x8x3_t\n\
1649e4b17023SJohn Marino@{\n\
1650e4b17023SJohn Marino  int8x8_t val[3];\n\
1651e4b17023SJohn Marino@} int8x8x3_t;\n\
1652e4b17023SJohn Marino@end smallexample\n\
1653e4b17023SJohn Marino\n\
1654e4b17023SJohn MarinoIf this hook allows @code{val} to have a scalar mode, then\n\
1655e4b17023SJohn Marino@code{int8x8x3_t} can have the same mode.  GCC can then store\n\
1656e4b17023SJohn Marino@code{int8x8x3_t}s in registers rather than forcing them onto the stack.",
1657e4b17023SJohn Marino bool, (enum machine_mode mode, unsigned HOST_WIDE_INT nelems),
1658e4b17023SJohn Marino hook_bool_mode_uhwi_false)
1659e4b17023SJohn Marino
1660e4b17023SJohn Marino/* Compute cost of moving data from a register of class FROM to one of
1661e4b17023SJohn Marino   TO, using MODE.  */
1662e4b17023SJohn MarinoDEFHOOK
1663e4b17023SJohn Marino(register_move_cost,
1664e4b17023SJohn Marino "",
1665e4b17023SJohn Marino int, (enum machine_mode mode, reg_class_t from, reg_class_t to),
1666e4b17023SJohn Marino default_register_move_cost)
1667e4b17023SJohn Marino
1668e4b17023SJohn Marino/* Compute cost of moving registers to/from memory.  */
1669e4b17023SJohn Marino/* ??? Documenting the argument types for this hook requires a GFDL
1670e4b17023SJohn Marino   license grant.  Also, the documentation uses a different name for RCLASS.  */
1671e4b17023SJohn MarinoDEFHOOK
1672e4b17023SJohn Marino(memory_move_cost,
1673e4b17023SJohn Marino "",
1674e4b17023SJohn Marino int, (enum machine_mode mode, reg_class_t rclass, bool in),
1675e4b17023SJohn Marino default_memory_move_cost)
1676e4b17023SJohn Marino
1677e4b17023SJohn Marino/* True for MODE if the target expects that registers in this mode will
1678e4b17023SJohn Marino   be allocated to registers in a small register class.  The compiler is
1679e4b17023SJohn Marino   allowed to use registers explicitly used in the rtl as spill registers
1680e4b17023SJohn Marino   but it should prevent extending the lifetime of these registers.  */
1681e4b17023SJohn MarinoDEFHOOK
1682e4b17023SJohn Marino(small_register_classes_for_mode_p,
1683e4b17023SJohn Marino "",
1684e4b17023SJohn Marino bool, (enum machine_mode mode),
1685e4b17023SJohn Marino hook_bool_mode_false)
1686e4b17023SJohn Marino
1687e4b17023SJohn Marino/* Register number for a flags register.  Only needs to be defined if the
1688e4b17023SJohn Marino   target is constrainted to use post-reload comparison elimination.  */
1689e4b17023SJohn MarinoDEFHOOKPOD
1690e4b17023SJohn Marino(flags_regnum,
1691e4b17023SJohn Marino "If the target has a dedicated flags register, and it needs to use the\
1692e4b17023SJohn Marino post-reload comparison elimination pass, then this value should be set\
1693e4b17023SJohn Marino appropriately.",
1694e4b17023SJohn Marino unsigned int, INVALID_REGNUM)
1695e4b17023SJohn Marino
1696e4b17023SJohn Marino/* Compute a (partial) cost for rtx X.  Return true if the complete
1697e4b17023SJohn Marino   cost has been computed, and false if subexpressions should be
1698e4b17023SJohn Marino   scanned.  In either case, *TOTAL contains the cost result.  */
1699e4b17023SJohn Marino/* Note that CODE and OUTER_CODE ought to be RTX_CODE, but that's
1700e4b17023SJohn Marino   not necessarily defined at this point.  */
1701e4b17023SJohn MarinoDEFHOOK
1702e4b17023SJohn Marino(rtx_costs,
1703e4b17023SJohn Marino "",
1704e4b17023SJohn Marino bool, (rtx x, int code, int outer_code, int opno, int *total, bool speed),
1705e4b17023SJohn Marino hook_bool_rtx_int_int_int_intp_bool_false)
1706e4b17023SJohn Marino
1707e4b17023SJohn Marino/* Compute the cost of X, used as an address.  Never called with
1708e4b17023SJohn Marino   invalid addresses.  */
1709e4b17023SJohn MarinoDEFHOOK
1710e4b17023SJohn Marino(address_cost,
1711e4b17023SJohn Marino "",
1712e4b17023SJohn Marino int, (rtx address, bool speed),
1713e4b17023SJohn Marino default_address_cost)
1714e4b17023SJohn Marino
1715e4b17023SJohn Marino/* Return where to allocate pseudo for a given hard register initial value.  */
1716e4b17023SJohn MarinoDEFHOOK
1717e4b17023SJohn Marino(allocate_initial_value,
1718e4b17023SJohn Marino "",
1719e4b17023SJohn Marino rtx, (rtx hard_reg), NULL)
1720e4b17023SJohn Marino
1721e4b17023SJohn Marino/* Return nonzero if evaluating UNSPEC[_VOLATILE] X might cause a trap.
1722e4b17023SJohn Marino   FLAGS has the same meaning as in rtlanal.c: may_trap_p_1.  */
1723e4b17023SJohn MarinoDEFHOOK
1724e4b17023SJohn Marino(unspec_may_trap_p,
1725e4b17023SJohn Marino "",
1726e4b17023SJohn Marino int, (const_rtx x, unsigned flags),
1727e4b17023SJohn Marino default_unspec_may_trap_p)
1728e4b17023SJohn Marino
1729e4b17023SJohn Marino/* Given a register, this hook should return a parallel of registers
1730e4b17023SJohn Marino   to represent where to find the register pieces.  Define this hook
1731e4b17023SJohn Marino   if the register and its mode are represented in Dwarf in
1732e4b17023SJohn Marino   non-contiguous locations, or if the register should be
1733e4b17023SJohn Marino   represented in more than one register in Dwarf.  Otherwise, this
1734e4b17023SJohn Marino   hook should return NULL_RTX.  */
1735e4b17023SJohn MarinoDEFHOOK
1736e4b17023SJohn Marino(dwarf_register_span,
1737e4b17023SJohn Marino "",
1738e4b17023SJohn Marino rtx, (rtx reg),
1739e4b17023SJohn Marino hook_rtx_rtx_null)
1740e4b17023SJohn Marino
1741e4b17023SJohn Marino/* If expand_builtin_init_dwarf_reg_sizes needs to fill in table
1742e4b17023SJohn Marino   entries not corresponding directly to registers below
1743e4b17023SJohn Marino   FIRST_PSEUDO_REGISTER, this hook should generate the necessary
1744e4b17023SJohn Marino   code, given the address of the table.  */
1745e4b17023SJohn MarinoDEFHOOK
1746e4b17023SJohn Marino(init_dwarf_reg_sizes_extra,
1747e4b17023SJohn Marino "",
1748e4b17023SJohn Marino void, (tree address),
1749e4b17023SJohn Marino hook_void_tree)
1750e4b17023SJohn Marino
1751e4b17023SJohn Marino/* Fetch the fixed register(s) which hold condition codes, for
1752e4b17023SJohn Marino   targets where it makes sense to look for duplicate assignments to
1753e4b17023SJohn Marino   the condition codes.  This should return true if there is such a
1754e4b17023SJohn Marino   register, false otherwise.  The arguments should be set to the
1755e4b17023SJohn Marino   fixed register numbers.  Up to two condition code registers are
1756e4b17023SJohn Marino   supported.  If there is only one for this target, the int pointed
1757e4b17023SJohn Marino   at by the second argument should be set to -1.  */
1758e4b17023SJohn MarinoDEFHOOK
1759e4b17023SJohn Marino(fixed_condition_code_regs,
1760e4b17023SJohn Marino "",
1761e4b17023SJohn Marino bool, (unsigned int *p1, unsigned int *p2),
1762e4b17023SJohn Marino hook_bool_uintp_uintp_false)
1763e4b17023SJohn Marino
1764e4b17023SJohn Marino/* If two condition code modes are compatible, return a condition
1765e4b17023SJohn Marino     code mode which is compatible with both, such that a comparison
1766e4b17023SJohn Marino     done in the returned mode will work for both of the original
1767e4b17023SJohn Marino     modes.  If the condition code modes are not compatible, return
1768e4b17023SJohn Marino     VOIDmode.  */
1769e4b17023SJohn MarinoDEFHOOK
1770e4b17023SJohn Marino(cc_modes_compatible,
1771e4b17023SJohn Marino "",
1772e4b17023SJohn Marino enum machine_mode, (enum machine_mode m1, enum machine_mode m2),
1773e4b17023SJohn Marino default_cc_modes_compatible)
1774e4b17023SJohn Marino
1775e4b17023SJohn Marino/* Do machine-dependent code transformations.  Called just before
1776e4b17023SJohn Marino     delayed-branch scheduling.  */
1777e4b17023SJohn MarinoDEFHOOK
1778e4b17023SJohn Marino(machine_dependent_reorg,
1779e4b17023SJohn Marino "",
1780e4b17023SJohn Marino void, (void), NULL)
1781e4b17023SJohn Marino
1782e4b17023SJohn Marino/* Create the __builtin_va_list type.  */
1783e4b17023SJohn MarinoDEFHOOK
1784e4b17023SJohn Marino(build_builtin_va_list,
1785e4b17023SJohn Marino "",
1786e4b17023SJohn Marino tree, (void),
1787e4b17023SJohn Marino std_build_builtin_va_list)
1788e4b17023SJohn Marino
1789e4b17023SJohn Marino/* Enumerate the va list variants.  */
1790e4b17023SJohn MarinoDEFHOOK
1791e4b17023SJohn Marino(enum_va_list_p,
1792e4b17023SJohn Marino "",
1793e4b17023SJohn Marino int, (int idx, const char **pname, tree *ptree),
1794e4b17023SJohn Marino NULL)
1795e4b17023SJohn Marino
1796e4b17023SJohn Marino/* Get the cfun/fndecl calling abi __builtin_va_list type.  */
1797e4b17023SJohn MarinoDEFHOOK
1798e4b17023SJohn Marino(fn_abi_va_list,
1799e4b17023SJohn Marino "",
1800e4b17023SJohn Marino tree, (tree fndecl),
1801e4b17023SJohn Marino std_fn_abi_va_list)
1802e4b17023SJohn Marino
1803e4b17023SJohn Marino/* Get the __builtin_va_list type dependent on input type.  */
1804e4b17023SJohn MarinoDEFHOOK
1805e4b17023SJohn Marino(canonical_va_list_type,
1806e4b17023SJohn Marino "",
1807e4b17023SJohn Marino tree, (tree type),
1808e4b17023SJohn Marino std_canonical_va_list_type)
1809e4b17023SJohn Marino
1810e4b17023SJohn Marino/* ??? Documenting this hook requires a GFDL license grant.  */
1811e4b17023SJohn MarinoDEFHOOK_UNDOC
1812e4b17023SJohn Marino(expand_builtin_va_start,
1813e4b17023SJohn Marino"Expand the @code{__builtin_va_start} builtin.",
1814e4b17023SJohn Marino void, (tree valist, rtx nextarg), NULL)
1815e4b17023SJohn Marino
1816e4b17023SJohn Marino/* Gimplifies a VA_ARG_EXPR.  */
1817e4b17023SJohn MarinoDEFHOOK
1818e4b17023SJohn Marino(gimplify_va_arg_expr,
1819e4b17023SJohn Marino "",
1820e4b17023SJohn Marino tree, (tree valist, tree type, gimple_seq *pre_p, gimple_seq *post_p),
1821e4b17023SJohn Marino std_gimplify_va_arg_expr)
1822e4b17023SJohn Marino
1823e4b17023SJohn Marino/* Validity-checking routines for PCH files, target-specific.
1824e4b17023SJohn Marino   get_pch_validity returns a pointer to the data to be stored,
1825e4b17023SJohn Marino   and stores the size in its argument.  pch_valid_p gets the same
1826e4b17023SJohn Marino   information back and returns NULL if the PCH is valid,
1827e4b17023SJohn Marino   or an error message if not.  */
1828e4b17023SJohn MarinoDEFHOOK
1829e4b17023SJohn Marino(get_pch_validity,
1830e4b17023SJohn Marino "",
1831e4b17023SJohn Marino void *, (size_t *sz),
1832e4b17023SJohn Marino default_get_pch_validity)
1833e4b17023SJohn Marino
1834e4b17023SJohn MarinoDEFHOOK
1835e4b17023SJohn Marino(pch_valid_p,
1836e4b17023SJohn Marino "",
1837e4b17023SJohn Marino const char *, (const void *data, size_t sz),
1838e4b17023SJohn Marino default_pch_valid_p)
1839e4b17023SJohn Marino
1840e4b17023SJohn MarinoDEFHOOK
1841e4b17023SJohn Marino(prepare_pch_save,
1842e4b17023SJohn Marino "Called before writing out a PCH file.  If the target has some\n\
1843e4b17023SJohn Marinogarbage-collected data that needs to be in a particular state on PCH loads,\n\
1844e4b17023SJohn Marinoit can use this hook to enforce that state.  Very few targets need\n\
1845e4b17023SJohn Marinoto do anything here.",
1846e4b17023SJohn Marino void, (void),
1847e4b17023SJohn Marino hook_void_void)
1848e4b17023SJohn Marino
1849e4b17023SJohn Marino/* If nonnull, this function checks whether a PCH file with the
1850e4b17023SJohn Marino   given set of target flags can be used.  It returns NULL if so,
1851e4b17023SJohn Marino   otherwise it returns an error message.  */
1852e4b17023SJohn MarinoDEFHOOK
1853e4b17023SJohn Marino(check_pch_target_flags,
1854e4b17023SJohn Marino "",
1855e4b17023SJohn Marino const char *, (int pch_flags), NULL)
1856e4b17023SJohn Marino
1857e4b17023SJohn Marino/* True if the compiler should give an enum type only as many
1858e4b17023SJohn Marino   bytes as it takes to represent the range of possible values of
1859e4b17023SJohn Marino   that type.  */
1860e4b17023SJohn MarinoDEFHOOK
1861e4b17023SJohn Marino(default_short_enums,
1862e4b17023SJohn Marino "",
1863e4b17023SJohn Marino bool, (void),
1864e4b17023SJohn Marino hook_bool_void_false)
1865e4b17023SJohn Marino
1866e4b17023SJohn Marino/* This target hook returns an rtx that is used to store the address
1867e4b17023SJohn Marino   of the current frame into the built-in setjmp buffer.  */
1868e4b17023SJohn MarinoDEFHOOK
1869e4b17023SJohn Marino(builtin_setjmp_frame_value,
1870e4b17023SJohn Marino "",
1871e4b17023SJohn Marino rtx, (void),
1872e4b17023SJohn Marino default_builtin_setjmp_frame_value)
1873e4b17023SJohn Marino
1874e4b17023SJohn Marino/* This target hook should add STRING_CST trees for any hard regs
1875e4b17023SJohn Marino   the port wishes to automatically clobber for an asm.  */
1876e4b17023SJohn MarinoDEFHOOK
1877e4b17023SJohn Marino(md_asm_clobbers,
1878e4b17023SJohn Marino "",
1879e4b17023SJohn Marino tree, (tree outputs, tree inputs, tree clobbers),
1880e4b17023SJohn Marino hook_tree_tree_tree_tree_3rd_identity)
1881e4b17023SJohn Marino
1882e4b17023SJohn Marino/* This target hook allows the backend to specify a calling convention
1883e4b17023SJohn Marino   in the debug information.  This function actually returns an
1884e4b17023SJohn Marino   enum dwarf_calling_convention, but because of forward declarations
1885e4b17023SJohn Marino   and not wanting to include dwarf2.h everywhere target.h is included
1886e4b17023SJohn Marino   the function is being declared as an int.  */
1887e4b17023SJohn MarinoDEFHOOK
1888e4b17023SJohn Marino(dwarf_calling_convention,
1889e4b17023SJohn Marino "",
1890e4b17023SJohn Marino int, (const_tree function),
1891e4b17023SJohn Marino hook_int_const_tree_0)
1892e4b17023SJohn Marino
1893e4b17023SJohn Marino/* This target hook allows the backend to emit frame-related insns that
1894e4b17023SJohn Marino   contain UNSPECs or UNSPEC_VOLATILEs.  The call frame debugging info
1895e4b17023SJohn Marino   engine will invoke it on insns of the form
1896e4b17023SJohn Marino     (set (reg) (unspec [...] UNSPEC_INDEX))
1897e4b17023SJohn Marino   and
1898e4b17023SJohn Marino     (set (reg) (unspec_volatile [...] UNSPECV_INDEX))
1899e4b17023SJohn Marino   to let the backend emit the call frame instructions.  */
1900e4b17023SJohn MarinoDEFHOOK
1901e4b17023SJohn Marino(dwarf_handle_frame_unspec,
1902e4b17023SJohn Marino "",
1903e4b17023SJohn Marino void, (const char *label, rtx pattern, int index), NULL)
1904e4b17023SJohn Marino
1905e4b17023SJohn Marino/* ??? Documenting this hook requires a GFDL license grant.  */
1906e4b17023SJohn MarinoDEFHOOK_UNDOC
1907e4b17023SJohn Marino(stdarg_optimize_hook,
1908e4b17023SJohn Marino"Perform architecture specific checking of statements gimplified\
1909e4b17023SJohn Marino from @code{VA_ARG_EXPR}.  @var{stmt} is the statement.  Returns true if\
1910e4b17023SJohn Marino the statement doesn't need to be checked for @code{va_list} references.",
1911e4b17023SJohn Marino bool, (struct stdarg_info *ai, const_gimple stmt), NULL)
1912e4b17023SJohn Marino
1913e4b17023SJohn Marino/* This target hook allows the operating system to override the DECL
1914e4b17023SJohn Marino   that represents the external variable that contains the stack
1915e4b17023SJohn Marino   protection guard variable.  The type of this DECL is ptr_type_node.  */
1916e4b17023SJohn MarinoDEFHOOK
1917e4b17023SJohn Marino(stack_protect_guard,
1918e4b17023SJohn Marino "",
1919e4b17023SJohn Marino tree, (void),
1920e4b17023SJohn Marino default_stack_protect_guard)
1921e4b17023SJohn Marino
1922e4b17023SJohn Marino/* This target hook allows the operating system to override the CALL_EXPR
1923e4b17023SJohn Marino   that is invoked when a check vs the guard variable fails.  */
1924e4b17023SJohn MarinoDEFHOOK
1925e4b17023SJohn Marino(stack_protect_fail,
1926e4b17023SJohn Marino "",
1927e4b17023SJohn Marino tree, (void),
1928e4b17023SJohn Marino default_external_stack_protect_fail)
1929e4b17023SJohn Marino
1930e4b17023SJohn Marino/* Returns NULL if target supports the insn within a doloop block,
1931e4b17023SJohn Marino   otherwise it returns an error message.  */
1932e4b17023SJohn MarinoDEFHOOK
1933e4b17023SJohn Marino(invalid_within_doloop,
1934e4b17023SJohn Marino "",
1935e4b17023SJohn Marino const char *, (const_rtx insn),
1936e4b17023SJohn Marino default_invalid_within_doloop)
1937e4b17023SJohn Marino
1938e4b17023SJohn MarinoDEFHOOK
1939e4b17023SJohn Marino(valid_dllimport_attribute_p,
1940e4b17023SJohn Marino"@var{decl} is a variable or function with @code{__attribute__((dllimport))}\
1941e4b17023SJohn Marino specified.  Use this hook if the target needs to add extra validation\
1942e4b17023SJohn Marino checks to @code{handle_dll_attribute}.",
1943e4b17023SJohn Marino bool, (const_tree decl),
1944e4b17023SJohn Marino hook_bool_const_tree_true)
1945e4b17023SJohn Marino
1946e4b17023SJohn Marino/* If non-zero, align constant anchors in CSE to a multiple of this
1947e4b17023SJohn Marino   value.  */
1948e4b17023SJohn MarinoDEFHOOKPOD
1949e4b17023SJohn Marino(const_anchor,
1950e4b17023SJohn Marino "",
1951e4b17023SJohn Marino unsigned HOST_WIDE_INT, 0)
1952e4b17023SJohn Marino
1953e4b17023SJohn Marino/* Functions relating to calls - argument passing, returns, etc.  */
1954e4b17023SJohn Marino/* Members of struct call have no special macro prefix.  */
1955e4b17023SJohn MarinoHOOK_VECTOR (TARGET_CALLS, calls)
1956e4b17023SJohn Marino
1957e4b17023SJohn MarinoDEFHOOK
1958e4b17023SJohn Marino(promote_function_mode,
1959e4b17023SJohn Marino "",
1960e4b17023SJohn Marino enum machine_mode, (const_tree type, enum machine_mode mode, int *punsignedp,
1961e4b17023SJohn Marino		     const_tree funtype, int for_return),
1962e4b17023SJohn Marino default_promote_function_mode)
1963e4b17023SJohn Marino
1964e4b17023SJohn MarinoDEFHOOK
1965e4b17023SJohn Marino(promote_prototypes,
1966e4b17023SJohn Marino "",
1967e4b17023SJohn Marino bool, (const_tree fntype),
1968e4b17023SJohn Marino hook_bool_const_tree_false)
1969e4b17023SJohn Marino
1970e4b17023SJohn MarinoDEFHOOK
1971e4b17023SJohn Marino(struct_value_rtx,
1972e4b17023SJohn Marino "",
1973e4b17023SJohn Marino rtx, (tree fndecl, int incoming),
1974e4b17023SJohn Marino hook_rtx_tree_int_null)
1975e4b17023SJohn MarinoDEFHOOK
1976e4b17023SJohn Marino(return_in_memory,
1977e4b17023SJohn Marino "",
1978e4b17023SJohn Marino bool, (const_tree type, const_tree fntype),
1979e4b17023SJohn Marino default_return_in_memory)
1980e4b17023SJohn Marino
1981e4b17023SJohn MarinoDEFHOOK
1982e4b17023SJohn Marino(return_in_msb,
1983e4b17023SJohn Marino "",
1984e4b17023SJohn Marino bool, (const_tree type),
1985e4b17023SJohn Marino hook_bool_const_tree_false)
1986e4b17023SJohn Marino
1987e4b17023SJohn Marino/* Return true if a parameter must be passed by reference.  TYPE may
1988e4b17023SJohn Marino   be null if this is a libcall.  CA may be null if this query is
1989e4b17023SJohn Marino   from __builtin_va_arg.  */
1990e4b17023SJohn MarinoDEFHOOK
1991e4b17023SJohn Marino(pass_by_reference,
1992e4b17023SJohn Marino "",
1993e4b17023SJohn Marino bool,
1994e4b17023SJohn Marino (cumulative_args_t cum, enum machine_mode mode, const_tree type, bool named),
1995e4b17023SJohn Marino hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false)
1996e4b17023SJohn Marino
1997e4b17023SJohn MarinoDEFHOOK
1998e4b17023SJohn Marino(expand_builtin_saveregs,
1999e4b17023SJohn Marino "",
2000e4b17023SJohn Marino rtx, (void),
2001e4b17023SJohn Marino default_expand_builtin_saveregs)
2002e4b17023SJohn Marino
2003e4b17023SJohn Marino/* Returns pretend_argument_size.  */
2004e4b17023SJohn MarinoDEFHOOK
2005e4b17023SJohn Marino(setup_incoming_varargs,
2006e4b17023SJohn Marino "",
2007e4b17023SJohn Marino void, (cumulative_args_t args_so_far, enum machine_mode mode, tree type,
2008e4b17023SJohn Marino	int *pretend_args_size, int second_time),
2009e4b17023SJohn Marino default_setup_incoming_varargs)
2010e4b17023SJohn Marino
2011e4b17023SJohn MarinoDEFHOOK
2012e4b17023SJohn Marino(strict_argument_naming,
2013e4b17023SJohn Marino "",
2014e4b17023SJohn Marino bool, (cumulative_args_t ca),
2015e4b17023SJohn Marino hook_bool_CUMULATIVE_ARGS_false)
2016e4b17023SJohn Marino
2017e4b17023SJohn Marino/* Returns true if we should use
2018e4b17023SJohn Marino   targetm.calls.setup_incoming_varargs() and/or
2019e4b17023SJohn Marino   targetm.calls.strict_argument_naming().  */
2020e4b17023SJohn MarinoDEFHOOK
2021e4b17023SJohn Marino(pretend_outgoing_varargs_named,
2022e4b17023SJohn Marino "",
2023e4b17023SJohn Marino bool, (cumulative_args_t ca),
2024e4b17023SJohn Marino default_pretend_outgoing_varargs_named)
2025e4b17023SJohn Marino
2026e4b17023SJohn Marino/* Given a complex type T, return true if a parameter of type T
2027e4b17023SJohn Marino   should be passed as two scalars.  */
2028e4b17023SJohn MarinoDEFHOOK
2029e4b17023SJohn Marino(split_complex_arg,
2030e4b17023SJohn Marino "",
2031e4b17023SJohn Marino bool, (const_tree type), NULL)
2032e4b17023SJohn Marino
2033e4b17023SJohn Marino/* Return true if type T, mode MODE, may not be passed in registers,
2034e4b17023SJohn Marino   but must be passed on the stack.  */
2035e4b17023SJohn Marino/* ??? This predicate should be applied strictly after pass-by-reference.
2036e4b17023SJohn Marino   Need audit to verify that this is the case.  */
2037e4b17023SJohn MarinoDEFHOOK
2038e4b17023SJohn Marino(must_pass_in_stack,
2039e4b17023SJohn Marino "",
2040e4b17023SJohn Marino bool, (enum machine_mode mode, const_tree type),
2041e4b17023SJohn Marino must_pass_in_stack_var_size_or_pad)
2042e4b17023SJohn Marino
2043e4b17023SJohn Marino/* Return true if type TYPE, mode MODE, which is passed by reference,
2044e4b17023SJohn Marino   should have the object copy generated by the callee rather than
2045e4b17023SJohn Marino   the caller.  It is never called for TYPE requiring constructors.  */
2046e4b17023SJohn MarinoDEFHOOK
2047e4b17023SJohn Marino(callee_copies,
2048e4b17023SJohn Marino "",
2049e4b17023SJohn Marino bool,
2050e4b17023SJohn Marino (cumulative_args_t cum, enum machine_mode mode, const_tree type, bool named),
2051e4b17023SJohn Marino hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false)
2052e4b17023SJohn Marino
2053e4b17023SJohn Marino/* Return zero for arguments passed entirely on the stack or entirely
2054e4b17023SJohn Marino   in registers.  If passed in both, return the number of bytes passed
2055e4b17023SJohn Marino   in registers; the balance is therefore passed on the stack.  */
2056e4b17023SJohn MarinoDEFHOOK
2057e4b17023SJohn Marino(arg_partial_bytes,
2058e4b17023SJohn Marino "",
2059e4b17023SJohn Marino int, (cumulative_args_t cum, enum machine_mode mode, tree type, bool named),
2060e4b17023SJohn Marino hook_int_CUMULATIVE_ARGS_mode_tree_bool_0)
2061e4b17023SJohn Marino
2062e4b17023SJohn Marino/* Update the state in CA to advance past an argument in the
2063e4b17023SJohn Marino   argument list.  The values MODE, TYPE, and NAMED describe that
2064e4b17023SJohn Marino   argument.  */
2065e4b17023SJohn MarinoDEFHOOK
2066e4b17023SJohn Marino(function_arg_advance,
2067e4b17023SJohn Marino "",
2068e4b17023SJohn Marino void,
2069e4b17023SJohn Marino (cumulative_args_t ca, enum machine_mode mode, const_tree type, bool named),
2070e4b17023SJohn Marino default_function_arg_advance)
2071e4b17023SJohn Marino
2072e4b17023SJohn Marino/* Return zero if the argument described by the state of CA should
2073e4b17023SJohn Marino   be placed on a stack, or a hard register in which to store the
2074e4b17023SJohn Marino   argument.  The values MODE, TYPE, and NAMED describe that
2075e4b17023SJohn Marino   argument.  */
2076e4b17023SJohn MarinoDEFHOOK
2077e4b17023SJohn Marino(function_arg,
2078e4b17023SJohn Marino "",
2079e4b17023SJohn Marino rtx, (cumulative_args_t ca, enum machine_mode mode, const_tree type,
2080e4b17023SJohn Marino       bool named),
2081e4b17023SJohn Marino default_function_arg)
2082e4b17023SJohn Marino
2083e4b17023SJohn Marino/* Likewise, but for machines with register windows.  Return the
2084e4b17023SJohn Marino   location where the argument will appear to the callee.  */
2085e4b17023SJohn MarinoDEFHOOK
2086e4b17023SJohn Marino(function_incoming_arg,
2087e4b17023SJohn Marino "",
2088e4b17023SJohn Marino rtx, (cumulative_args_t ca, enum machine_mode mode, const_tree type,
2089e4b17023SJohn Marino       bool named),
2090e4b17023SJohn Marino default_function_incoming_arg)
2091e4b17023SJohn Marino
2092e4b17023SJohn MarinoDEFHOOK
2093e4b17023SJohn Marino(function_arg_boundary,
2094e4b17023SJohn Marino "",
2095e4b17023SJohn Marino unsigned int, (enum machine_mode mode, const_tree type),
2096e4b17023SJohn Marino default_function_arg_boundary)
2097e4b17023SJohn Marino
2098e4b17023SJohn MarinoDEFHOOK
2099e4b17023SJohn Marino(function_arg_round_boundary,
2100e4b17023SJohn Marino "Normally, the size of an argument is rounded up to @code{PARM_BOUNDARY},\n\
2101e4b17023SJohn Marinowhich is the default value for this hook.  You can define this hook to\n\
2102e4b17023SJohn Marinoreturn a different value if an argument size must be rounded to a larger\n\
2103e4b17023SJohn Marinovalue.",
2104e4b17023SJohn Marino unsigned int, (enum machine_mode mode, const_tree type),
2105e4b17023SJohn Marino default_function_arg_round_boundary)
2106e4b17023SJohn Marino
2107e4b17023SJohn Marino/* Return the diagnostic message string if function without a prototype
2108e4b17023SJohn Marino   is not allowed for this 'val' argument; NULL otherwise. */
2109e4b17023SJohn MarinoDEFHOOK
2110e4b17023SJohn Marino(invalid_arg_for_unprototyped_fn,
2111e4b17023SJohn Marino "",
2112e4b17023SJohn Marino const char *, (const_tree typelist, const_tree funcdecl, const_tree val),
2113e4b17023SJohn Marino hook_invalid_arg_for_unprototyped_fn)
2114e4b17023SJohn Marino
2115e4b17023SJohn Marino/* Return an rtx for the return value location of the function
2116e4b17023SJohn Marino   specified by FN_DECL_OR_TYPE with a return type of RET_TYPE.  */
2117e4b17023SJohn MarinoDEFHOOK
2118e4b17023SJohn Marino(function_value,
2119e4b17023SJohn Marino "",
2120e4b17023SJohn Marino rtx, (const_tree ret_type, const_tree fn_decl_or_type, bool outgoing),
2121e4b17023SJohn Marino default_function_value)
2122e4b17023SJohn Marino
2123e4b17023SJohn Marino/* Return the rtx for the result of a libcall of mode MODE,
2124e4b17023SJohn Marino   calling the function FN_NAME.  */
2125e4b17023SJohn MarinoDEFHOOK
2126e4b17023SJohn Marino(libcall_value,
2127e4b17023SJohn Marino "",
2128e4b17023SJohn Marino rtx, (enum machine_mode mode, const_rtx fun),
2129e4b17023SJohn Marino default_libcall_value)
2130e4b17023SJohn Marino
2131e4b17023SJohn Marino/* Return true if REGNO is a possible register number for
2132e4b17023SJohn Marino   a function value as seen by the caller.  */
2133e4b17023SJohn MarinoDEFHOOK
2134e4b17023SJohn Marino(function_value_regno_p,
2135e4b17023SJohn Marino "",
2136e4b17023SJohn Marino bool, (const unsigned int regno),
2137e4b17023SJohn Marino default_function_value_regno_p)
2138e4b17023SJohn Marino
2139e4b17023SJohn Marino/* ??? Documenting this hook requires a GFDL license grant.  */
2140e4b17023SJohn MarinoDEFHOOK_UNDOC
2141e4b17023SJohn Marino(internal_arg_pointer,
2142e4b17023SJohn Marino"Return an rtx for the argument pointer incoming to the\
2143e4b17023SJohn Marino current function.",
2144e4b17023SJohn Marino rtx, (void),
2145e4b17023SJohn Marino default_internal_arg_pointer)
2146e4b17023SJohn Marino
2147e4b17023SJohn Marino/* Update the current function stack boundary if needed.  */
2148e4b17023SJohn MarinoDEFHOOK
2149e4b17023SJohn Marino(update_stack_boundary,
2150e4b17023SJohn Marino "",
2151e4b17023SJohn Marino void, (void), NULL)
2152e4b17023SJohn Marino
2153e4b17023SJohn Marino/* Handle stack alignment and return an rtx for Dynamic Realign
2154e4b17023SJohn Marino   Argument Pointer if necessary.  */
2155e4b17023SJohn MarinoDEFHOOK
2156e4b17023SJohn Marino(get_drap_rtx,
2157e4b17023SJohn Marino "",
2158e4b17023SJohn Marino rtx, (void), NULL)
2159e4b17023SJohn Marino
2160e4b17023SJohn Marino/* Return true if all function parameters should be spilled to the
2161e4b17023SJohn Marino   stack.  */
2162e4b17023SJohn MarinoDEFHOOK
2163e4b17023SJohn Marino(allocate_stack_slots_for_args,
2164e4b17023SJohn Marino "",
2165e4b17023SJohn Marino bool, (void),
2166e4b17023SJohn Marino hook_bool_void_true)
2167e4b17023SJohn Marino
2168e4b17023SJohn Marino/* Return an rtx for the static chain for FNDECL.  If INCOMING_P is true,
2169e4b17023SJohn Marino       then it should be for the callee; otherwise for the caller.  */
2170e4b17023SJohn MarinoDEFHOOK
2171e4b17023SJohn Marino(static_chain,
2172e4b17023SJohn Marino "",
2173e4b17023SJohn Marino rtx, (const_tree fndecl, bool incoming_p),
2174e4b17023SJohn Marino default_static_chain)
2175e4b17023SJohn Marino
2176e4b17023SJohn Marino/* Fill in the trampoline at MEM with a call to FNDECL and a
2177e4b17023SJohn Marino   static chain value of CHAIN.  */
2178e4b17023SJohn MarinoDEFHOOK
2179e4b17023SJohn Marino(trampoline_init,
2180e4b17023SJohn Marino "",
2181e4b17023SJohn Marino void, (rtx m_tramp, tree fndecl, rtx static_chain),
2182e4b17023SJohn Marino default_trampoline_init)
2183e4b17023SJohn Marino
2184e4b17023SJohn Marino/* Adjust the address of the trampoline in a target-specific way.  */
2185e4b17023SJohn MarinoDEFHOOK
2186e4b17023SJohn Marino(trampoline_adjust_address,
2187e4b17023SJohn Marino "",
2188e4b17023SJohn Marino rtx, (rtx addr), NULL)
2189e4b17023SJohn Marino
2190e4b17023SJohn Marino/* Return the number of bytes of its own arguments that a function
2191e4b17023SJohn Marino   pops on returning, or 0 if the function pops no arguments and the
2192e4b17023SJohn Marino   caller must therefore pop them all after the function returns.  */
2193e4b17023SJohn Marino/* ??? tm.texi has no types for the parameters.  */
2194e4b17023SJohn MarinoDEFHOOK
2195e4b17023SJohn Marino(return_pops_args,
2196e4b17023SJohn Marino "",
2197e4b17023SJohn Marino int, (tree fundecl, tree funtype, int size),
2198e4b17023SJohn Marino default_return_pops_args)
2199e4b17023SJohn Marino
2200e4b17023SJohn Marino/* Return a mode wide enough to copy any function value that might be
2201e4b17023SJohn Marino   returned.  */
2202e4b17023SJohn MarinoDEFHOOK
2203e4b17023SJohn Marino(get_raw_result_mode,
2204e4b17023SJohn Marino "This target hook returns the mode to be used when accessing raw return\
2205e4b17023SJohn Marino registers in @code{__builtin_return}.  Define this macro if the value\
2206e4b17023SJohn Marino in @var{reg_raw_mode} is not correct.",
2207e4b17023SJohn Marino enum machine_mode, (int regno),
2208e4b17023SJohn Marino default_get_reg_raw_mode)
2209e4b17023SJohn Marino
2210e4b17023SJohn Marino/* Return a mode wide enough to copy any argument value that might be
2211e4b17023SJohn Marino   passed.  */
2212e4b17023SJohn MarinoDEFHOOK
2213e4b17023SJohn Marino(get_raw_arg_mode,
2214e4b17023SJohn Marino "This target hook returns the mode to be used when accessing raw argument\
2215e4b17023SJohn Marino registers in @code{__builtin_apply_args}.  Define this macro if the value\
2216e4b17023SJohn Marino in @var{reg_raw_mode} is not correct.",
2217e4b17023SJohn Marino enum machine_mode, (int regno),
2218e4b17023SJohn Marino default_get_reg_raw_mode)
2219e4b17023SJohn Marino
2220e4b17023SJohn MarinoHOOK_VECTOR_END (calls)
2221e4b17023SJohn Marino
2222e4b17023SJohn Marino/* Return the diagnostic message string if conversion from FROMTYPE
2223e4b17023SJohn Marino   to TOTYPE is not allowed, NULL otherwise.  */
2224e4b17023SJohn MarinoDEFHOOK
2225e4b17023SJohn Marino(invalid_conversion,
2226e4b17023SJohn Marino "",
2227e4b17023SJohn Marino const char *, (const_tree fromtype, const_tree totype),
2228e4b17023SJohn Marino hook_constcharptr_const_tree_const_tree_null)
2229e4b17023SJohn Marino
2230e4b17023SJohn Marino/* Return the diagnostic message string if the unary operation OP is
2231e4b17023SJohn Marino   not permitted on TYPE, NULL otherwise.  */
2232e4b17023SJohn MarinoDEFHOOK
2233e4b17023SJohn Marino(invalid_unary_op,
2234e4b17023SJohn Marino "",
2235e4b17023SJohn Marino const char *, (int op, const_tree type),
2236e4b17023SJohn Marino hook_constcharptr_int_const_tree_null)
2237e4b17023SJohn Marino
2238e4b17023SJohn Marino/* Return the diagnostic message string if the binary operation OP
2239e4b17023SJohn Marino   is not permitted on TYPE1 and TYPE2, NULL otherwise.  */
2240e4b17023SJohn MarinoDEFHOOK
2241e4b17023SJohn Marino(invalid_binary_op,
2242e4b17023SJohn Marino "",
2243e4b17023SJohn Marino const char *, (int op, const_tree type1, const_tree type2),
2244e4b17023SJohn Marino hook_constcharptr_int_const_tree_const_tree_null)
2245e4b17023SJohn Marino
2246e4b17023SJohn Marino/* Return the diagnostic message string if TYPE is not valid as a
2247e4b17023SJohn Marino   function parameter type, NULL otherwise.  */
2248e4b17023SJohn MarinoDEFHOOK
2249e4b17023SJohn Marino(invalid_parameter_type,
2250e4b17023SJohn Marino "",
2251e4b17023SJohn Marino const char *, (const_tree type),
2252e4b17023SJohn Marino hook_constcharptr_const_tree_null)
2253e4b17023SJohn Marino
2254e4b17023SJohn Marino/* Return the diagnostic message string if TYPE is not valid as a
2255e4b17023SJohn Marino   function return type, NULL otherwise.  */
2256e4b17023SJohn MarinoDEFHOOK
2257e4b17023SJohn Marino(invalid_return_type,
2258e4b17023SJohn Marino "",
2259e4b17023SJohn Marino const char *, (const_tree type),
2260e4b17023SJohn Marino hook_constcharptr_const_tree_null)
2261e4b17023SJohn Marino
2262e4b17023SJohn Marino/* If values of TYPE are promoted to some other type when used in
2263e4b17023SJohn Marino   expressions (analogous to the integer promotions), return that type,
2264e4b17023SJohn Marino   or NULL_TREE otherwise.  */
2265e4b17023SJohn MarinoDEFHOOK
2266e4b17023SJohn Marino(promoted_type,
2267e4b17023SJohn Marino "",
2268e4b17023SJohn Marino tree, (const_tree type),
2269e4b17023SJohn Marino hook_tree_const_tree_null)
2270e4b17023SJohn Marino
2271e4b17023SJohn Marino/* Convert EXPR to TYPE, if target-specific types with special conversion
2272e4b17023SJohn Marino   rules are involved.  Return the converted expression, or NULL to apply
2273e4b17023SJohn Marino   the standard conversion rules.  */
2274e4b17023SJohn MarinoDEFHOOK
2275e4b17023SJohn Marino(convert_to_type,
2276e4b17023SJohn Marino "",
2277e4b17023SJohn Marino tree, (tree type, tree expr),
2278e4b17023SJohn Marino hook_tree_tree_tree_null)
2279e4b17023SJohn Marino
2280e4b17023SJohn Marino/* Return the class for a secondary reload, and fill in extra information.  */
2281e4b17023SJohn MarinoDEFHOOK
2282e4b17023SJohn Marino(secondary_reload,
2283e4b17023SJohn Marino "",
2284e4b17023SJohn Marino reg_class_t,
2285e4b17023SJohn Marino (bool in_p, rtx x, reg_class_t reload_class, enum machine_mode reload_mode,
2286e4b17023SJohn Marino  secondary_reload_info *sri),
2287e4b17023SJohn Marino default_secondary_reload)
2288e4b17023SJohn Marino
2289e4b17023SJohn Marino/* Given an rtx X being reloaded into a reg required to be in class CLASS,
2290e4b17023SJohn Marino   return the class of reg to actually use.  */
2291e4b17023SJohn MarinoDEFHOOK
2292e4b17023SJohn Marino(preferred_reload_class,
2293e4b17023SJohn Marino "",
2294e4b17023SJohn Marino reg_class_t,
2295e4b17023SJohn Marino (rtx x, reg_class_t rclass),
2296e4b17023SJohn Marino default_preferred_reload_class)
2297e4b17023SJohn Marino
2298e4b17023SJohn Marino/* Like TARGET_PREFERRED_RELOAD_CLASS, but for output reloads instead of
2299e4b17023SJohn Marino   input reloads.  */
2300e4b17023SJohn MarinoDEFHOOK
2301e4b17023SJohn Marino(preferred_output_reload_class,
2302e4b17023SJohn Marino "",
2303e4b17023SJohn Marino reg_class_t,
2304e4b17023SJohn Marino (rtx x, reg_class_t rclass),
2305e4b17023SJohn Marino default_preferred_output_reload_class)
2306e4b17023SJohn Marino
2307e4b17023SJohn MarinoDEFHOOK
2308e4b17023SJohn Marino(class_likely_spilled_p,
2309e4b17023SJohn Marino "",
2310e4b17023SJohn Marino bool, (reg_class_t rclass),
2311e4b17023SJohn Marino default_class_likely_spilled_p)
2312e4b17023SJohn Marino
2313e4b17023SJohn Marino/* Return the maximum number of consecutive registers
2314e4b17023SJohn Marino   needed to represent mode MODE in a register of class RCLASS.  */
2315e4b17023SJohn MarinoDEFHOOK
2316e4b17023SJohn Marino(class_max_nregs,
2317e4b17023SJohn Marino "",
2318e4b17023SJohn Marino unsigned char, (reg_class_t rclass, enum machine_mode mode),
2319e4b17023SJohn Marino default_class_max_nregs)
2320e4b17023SJohn Marino
2321e4b17023SJohn MarinoDEFHOOK
2322e4b17023SJohn Marino(preferred_rename_class,
2323e4b17023SJohn Marino "A target hook that places additional preference on the register\
2324e4b17023SJohn Marino class to use when it is necessary to rename a register in class\
2325e4b17023SJohn Marino @var{rclass} to another class, or perhaps @var{NO_REGS}, if no\
2326e4b17023SJohn Marino preferred register class is found or hook @code{preferred_rename_class}\
2327e4b17023SJohn Marino is not implemented.\
2328e4b17023SJohn Marino Sometimes returning a more restrictive class makes better code.  For\
2329e4b17023SJohn Marino example, on ARM, thumb-2 instructions using @code{LO_REGS} may be\
2330e4b17023SJohn Marino smaller than instructions using @code{GENERIC_REGS}.  By returning\
2331e4b17023SJohn Marino @code{LO_REGS} from @code{preferred_rename_class}, code size can\
2332e4b17023SJohn Marino be reduced.",
2333e4b17023SJohn Marino reg_class_t, (reg_class_t rclass),
2334e4b17023SJohn Marino default_preferred_rename_class)
2335e4b17023SJohn Marino
2336e4b17023SJohn Marino/* This target hook allows the backend to perform additional
2337e4b17023SJohn Marino   processing while initializing for variable expansion.  */
2338e4b17023SJohn MarinoDEFHOOK
2339e4b17023SJohn Marino(expand_to_rtl_hook,
2340e4b17023SJohn Marino "",
2341e4b17023SJohn Marino void, (void),
2342e4b17023SJohn Marino hook_void_void)
2343e4b17023SJohn Marino
2344e4b17023SJohn Marino/* This target hook allows the backend to perform additional
2345e4b17023SJohn Marino   instantiations on rtx that are not actually in insns yet,
2346e4b17023SJohn Marino   but will be later.  */
2347e4b17023SJohn MarinoDEFHOOK
2348e4b17023SJohn Marino(instantiate_decls,
2349e4b17023SJohn Marino "",
2350e4b17023SJohn Marino void, (void),
2351e4b17023SJohn Marino hook_void_void)
2352e4b17023SJohn Marino
2353e4b17023SJohn Marino/* Return true if is OK to use a hard register REGNO as scratch register
2354e4b17023SJohn Marino   in peephole2.  */
2355e4b17023SJohn MarinoDEFHOOK
2356e4b17023SJohn Marino(hard_regno_scratch_ok,
2357e4b17023SJohn Marino "",
2358e4b17023SJohn Marino bool, (unsigned int regno),
2359e4b17023SJohn Marino default_hard_regno_scratch_ok)
2360e4b17023SJohn Marino
2361e4b17023SJohn Marino/* Return the smallest number of different values for which it is best to
2362e4b17023SJohn Marino   use a jump-table instead of a tree of conditional branches.  */
2363e4b17023SJohn MarinoDEFHOOK
2364e4b17023SJohn Marino(case_values_threshold,
2365e4b17023SJohn Marino "",
2366e4b17023SJohn Marino unsigned int, (void),
2367e4b17023SJohn Marino default_case_values_threshold)
2368e4b17023SJohn Marino
2369e4b17023SJohn Marino/* Retutn true if a function must have and use a frame pointer.  */
2370e4b17023SJohn MarinoDEFHOOK
2371e4b17023SJohn Marino(frame_pointer_required,
2372e4b17023SJohn Marino "",
2373e4b17023SJohn Marino bool, (void),
2374e4b17023SJohn Marino hook_bool_void_false)
2375e4b17023SJohn Marino
2376e4b17023SJohn Marino/* Returns true if the compiler is allowed to try to replace register number
2377e4b17023SJohn Marino   from-reg with register number to-reg.  */
2378e4b17023SJohn MarinoDEFHOOK
2379e4b17023SJohn Marino(can_eliminate,
2380e4b17023SJohn Marino "",
2381e4b17023SJohn Marino bool, (const int from_reg, const int to_reg),
2382e4b17023SJohn Marino hook_bool_const_int_const_int_true)
2383e4b17023SJohn Marino
2384e4b17023SJohn Marino/* Modify any or all of fixed_regs, call_used_regs, global_regs,
2385e4b17023SJohn Marino   reg_names, and reg_class_contents to account of the vagaries of the
2386e4b17023SJohn Marino   target.  */
2387e4b17023SJohn MarinoDEFHOOK
2388e4b17023SJohn Marino(conditional_register_usage,
2389e4b17023SJohn Marino "",
2390e4b17023SJohn Marino void, (void),
2391e4b17023SJohn Marino hook_void_void)
2392e4b17023SJohn Marino
2393e4b17023SJohn Marino/* Functions specific to the C family of frontends.  */
2394e4b17023SJohn Marino#undef HOOK_PREFIX
2395e4b17023SJohn Marino#define HOOK_PREFIX "TARGET_C_"
2396e4b17023SJohn MarinoHOOK_VECTOR (TARGET_C, c)
2397e4b17023SJohn Marino
2398e4b17023SJohn Marino/* ??? Documenting this hook requires a GFDL license grant.  */
2399e4b17023SJohn MarinoDEFHOOK_UNDOC
2400e4b17023SJohn Marino(mode_for_suffix,
2401e4b17023SJohn Marino"Return machine mode for non-standard constant literal suffix @var{c},\
2402e4b17023SJohn Marino or VOIDmode if non-standard suffixes are unsupported.",
2403e4b17023SJohn Marino enum machine_mode, (char c),
2404e4b17023SJohn Marino default_mode_for_suffix)
2405e4b17023SJohn Marino
2406e4b17023SJohn MarinoHOOK_VECTOR_END (c)
2407e4b17023SJohn Marino
2408e4b17023SJohn Marino/* Functions specific to the C++ frontend.  */
2409e4b17023SJohn Marino#undef HOOK_PREFIX
2410e4b17023SJohn Marino#define HOOK_PREFIX "TARGET_CXX_"
2411e4b17023SJohn MarinoHOOK_VECTOR (TARGET_CXX, cxx)
2412e4b17023SJohn Marino
2413e4b17023SJohn Marino/* Return the integer type used for guard variables.  */
2414e4b17023SJohn MarinoDEFHOOK
2415e4b17023SJohn Marino(guard_type,
2416e4b17023SJohn Marino "",
2417e4b17023SJohn Marino tree, (void),
2418e4b17023SJohn Marino default_cxx_guard_type)
2419e4b17023SJohn Marino
2420e4b17023SJohn Marino/* Return true if only the low bit of the guard should be tested.  */
2421e4b17023SJohn MarinoDEFHOOK
2422e4b17023SJohn Marino(guard_mask_bit,
2423e4b17023SJohn Marino "",
2424e4b17023SJohn Marino bool, (void),
2425e4b17023SJohn Marino hook_bool_void_false)
2426e4b17023SJohn Marino
2427e4b17023SJohn Marino/* Returns the size of the array cookie for an array of type.  */
2428e4b17023SJohn MarinoDEFHOOK
2429e4b17023SJohn Marino(get_cookie_size,
2430e4b17023SJohn Marino "",
2431e4b17023SJohn Marino tree, (tree type),
2432e4b17023SJohn Marino default_cxx_get_cookie_size)
2433e4b17023SJohn Marino
2434e4b17023SJohn Marino/* Returns true if the element size should be stored in the array cookie.  */
2435e4b17023SJohn MarinoDEFHOOK
2436e4b17023SJohn Marino(cookie_has_size,
2437e4b17023SJohn Marino "",
2438e4b17023SJohn Marino bool, (void),
2439e4b17023SJohn Marino hook_bool_void_false)
2440e4b17023SJohn Marino
2441e4b17023SJohn Marino/* Allows backends to perform additional processing when
2442e4b17023SJohn Marino   deciding if a class should be exported or imported.  */
2443e4b17023SJohn MarinoDEFHOOK
2444e4b17023SJohn Marino(import_export_class,
2445e4b17023SJohn Marino "",
2446e4b17023SJohn Marino int, (tree type, int import_export), NULL)
2447e4b17023SJohn Marino
2448e4b17023SJohn Marino/* Returns true if constructors and destructors return "this".  */
2449e4b17023SJohn MarinoDEFHOOK
2450e4b17023SJohn Marino(cdtor_returns_this,
2451e4b17023SJohn Marino "",
2452e4b17023SJohn Marino bool, (void),
2453e4b17023SJohn Marino hook_bool_void_false)
2454e4b17023SJohn Marino
2455e4b17023SJohn Marino/* Returns true if the key method for a class can be an inline
2456e4b17023SJohn Marino   function, so long as it is not declared inline in the class
2457e4b17023SJohn Marino   itself.  Returning true is the behavior required by the Itanium C++ ABI.  */
2458e4b17023SJohn MarinoDEFHOOK
2459e4b17023SJohn Marino(key_method_may_be_inline,
2460e4b17023SJohn Marino "",
2461e4b17023SJohn Marino bool, (void),
2462e4b17023SJohn Marino hook_bool_void_true)
2463e4b17023SJohn Marino
2464e4b17023SJohn MarinoDEFHOOK
2465e4b17023SJohn Marino(determine_class_data_visibility,
2466e4b17023SJohn Marino"@var{decl} is a virtual table, virtual table table, typeinfo object,\
2467e4b17023SJohn Marino or other similar implicit class data object that will be emitted with\
2468e4b17023SJohn Marino external linkage in this translation unit.  No ELF visibility has been\
2469e4b17023SJohn Marino explicitly specified.  If the target needs to specify a visibility\
2470e4b17023SJohn Marino other than that of the containing class, use this hook to set\
2471e4b17023SJohn Marino @code{DECL_VISIBILITY} and @code{DECL_VISIBILITY_SPECIFIED}.",
2472e4b17023SJohn Marino void, (tree decl),
2473e4b17023SJohn Marino hook_void_tree)
2474e4b17023SJohn Marino
2475e4b17023SJohn Marino/* Returns true (the default) if virtual tables and other
2476e4b17023SJohn Marino   similar implicit class data objects are always COMDAT if they
2477e4b17023SJohn Marino   have external linkage.  If this hook returns false, then
2478e4b17023SJohn Marino   class data for classes whose virtual table will be emitted in
2479e4b17023SJohn Marino   only one translation unit will not be COMDAT.  */
2480e4b17023SJohn MarinoDEFHOOK
2481e4b17023SJohn Marino(class_data_always_comdat,
2482e4b17023SJohn Marino "",
2483e4b17023SJohn Marino bool, (void),
2484e4b17023SJohn Marino hook_bool_void_true)
2485e4b17023SJohn Marino
2486e4b17023SJohn Marino/* Returns true (the default) if the RTTI for the basic types,
2487e4b17023SJohn Marino   which is always defined in the C++ runtime, should be COMDAT;
2488e4b17023SJohn Marino   false if it should not be COMDAT.  */
2489e4b17023SJohn MarinoDEFHOOK
2490e4b17023SJohn Marino(library_rtti_comdat,
2491e4b17023SJohn Marino "",
2492e4b17023SJohn Marino bool, (void),
2493e4b17023SJohn Marino hook_bool_void_true)
2494e4b17023SJohn Marino
2495e4b17023SJohn Marino/* Returns true if __aeabi_atexit should be used to register static
2496e4b17023SJohn Marino   destructors.  */
2497e4b17023SJohn MarinoDEFHOOK
2498e4b17023SJohn Marino(use_aeabi_atexit,
2499e4b17023SJohn Marino "",
2500e4b17023SJohn Marino bool, (void),
2501e4b17023SJohn Marino hook_bool_void_false)
2502e4b17023SJohn Marino
2503e4b17023SJohn Marino/* Returns true if target may use atexit in the same manner as
2504e4b17023SJohn Marino   __cxa_atexit  to register static destructors.  */
2505e4b17023SJohn MarinoDEFHOOK
2506e4b17023SJohn Marino(use_atexit_for_cxa_atexit,
2507e4b17023SJohn Marino "",
2508e4b17023SJohn Marino bool, (void),
2509e4b17023SJohn Marino hook_bool_void_false)
2510e4b17023SJohn Marino
2511e4b17023SJohn MarinoDEFHOOK
2512e4b17023SJohn Marino(adjust_class_at_definition,
2513e4b17023SJohn Marino"@var{type} is a C++ class (i.e., RECORD_TYPE or UNION_TYPE) that has just\
2514e4b17023SJohn Marino been defined.  Use this hook to make adjustments to the class (eg, tweak\
2515e4b17023SJohn Marino visibility or perform any other required target modifications).",
2516e4b17023SJohn Marino void, (tree type),
2517e4b17023SJohn Marino hook_void_tree)
2518e4b17023SJohn Marino
2519e4b17023SJohn MarinoDEFHOOK
2520e4b17023SJohn Marino(decl_mangling_context,
2521e4b17023SJohn Marino "Return target-specific mangling context of @var{decl} or @code{NULL_TREE}.",
2522e4b17023SJohn Marino tree, (const_tree decl),
2523e4b17023SJohn Marino hook_tree_const_tree_null)
2524e4b17023SJohn Marino
2525e4b17023SJohn MarinoHOOK_VECTOR_END (cxx)
2526e4b17023SJohn Marino
2527e4b17023SJohn Marino/* Functions and data for emulated TLS support.  */
2528e4b17023SJohn Marino#undef HOOK_PREFIX
2529e4b17023SJohn Marino#define HOOK_PREFIX "TARGET_EMUTLS_"
2530e4b17023SJohn MarinoHOOK_VECTOR (TARGET_EMUTLS, emutls)
2531e4b17023SJohn Marino
2532e4b17023SJohn Marino/* Name of the address and common functions.  */
2533e4b17023SJohn MarinoDEFHOOKPOD
2534e4b17023SJohn Marino(get_address,
2535e4b17023SJohn Marino "",
2536e4b17023SJohn Marino const char *, "__builtin___emutls_get_address")
2537e4b17023SJohn Marino
2538e4b17023SJohn MarinoDEFHOOKPOD
2539e4b17023SJohn Marino(register_common,
2540e4b17023SJohn Marino "",
2541e4b17023SJohn Marino const char *, "__builtin___emutls_register_common")
2542e4b17023SJohn Marino
2543e4b17023SJohn Marino/* Prefixes for proxy variable and template.  */
2544e4b17023SJohn MarinoDEFHOOKPOD
2545e4b17023SJohn Marino(var_section,
2546e4b17023SJohn Marino "",
2547e4b17023SJohn Marino const char *, NULL)
2548e4b17023SJohn Marino
2549e4b17023SJohn MarinoDEFHOOKPOD
2550e4b17023SJohn Marino(tmpl_section,
2551e4b17023SJohn Marino "",
2552e4b17023SJohn Marino const char *, NULL)
2553e4b17023SJohn Marino
2554e4b17023SJohn Marino/* Prefixes for proxy variable and template.  */
2555e4b17023SJohn MarinoDEFHOOKPOD
2556e4b17023SJohn Marino(var_prefix,
2557e4b17023SJohn Marino "",
2558e4b17023SJohn Marino const char *, NULL)
2559e4b17023SJohn Marino
2560e4b17023SJohn MarinoDEFHOOKPOD
2561e4b17023SJohn Marino(tmpl_prefix,
2562e4b17023SJohn Marino "",
2563e4b17023SJohn Marino const char *, NULL)
2564e4b17023SJohn Marino
2565e4b17023SJohn Marino/* Function to generate field definitions of the proxy variable.  */
2566e4b17023SJohn MarinoDEFHOOK
2567e4b17023SJohn Marino(var_fields,
2568e4b17023SJohn Marino "",
2569e4b17023SJohn Marino tree, (tree type, tree *name),
2570e4b17023SJohn Marino default_emutls_var_fields)
2571e4b17023SJohn Marino
2572e4b17023SJohn Marino/* Function to initialize a proxy variable.  */
2573e4b17023SJohn MarinoDEFHOOK
2574e4b17023SJohn Marino(var_init,
2575e4b17023SJohn Marino "",
2576e4b17023SJohn Marino tree, (tree var, tree decl, tree tmpl_addr),
2577e4b17023SJohn Marino default_emutls_var_init)
2578e4b17023SJohn Marino
2579e4b17023SJohn Marino/* Whether we are allowed to alter the usual alignment of the
2580e4b17023SJohn Marino   proxy variable.  */
2581e4b17023SJohn MarinoDEFHOOKPOD
2582e4b17023SJohn Marino(var_align_fixed,
2583e4b17023SJohn Marino "",
2584e4b17023SJohn Marino bool, false)
2585e4b17023SJohn Marino
2586e4b17023SJohn Marino/* Whether we can emit debug information for TLS vars.  */
2587e4b17023SJohn MarinoDEFHOOKPOD
2588e4b17023SJohn Marino(debug_form_tls_address,
2589e4b17023SJohn Marino "",
2590e4b17023SJohn Marino bool, false)
2591e4b17023SJohn Marino
2592e4b17023SJohn MarinoHOOK_VECTOR_END (emutls)
2593e4b17023SJohn Marino
2594e4b17023SJohn Marino#undef HOOK_PREFIX
2595e4b17023SJohn Marino#define HOOK_PREFIX "TARGET_OPTION_"
2596e4b17023SJohn MarinoHOOK_VECTOR (TARGET_OPTION_HOOKS, target_option_hooks)
2597e4b17023SJohn Marino
2598e4b17023SJohn Marino/* Function to validate the attribute((option(...))) strings or NULL.  If
2599e4b17023SJohn Marino   the option is validated, it is assumed that DECL_FUNCTION_SPECIFIC will
2600e4b17023SJohn Marino   be filled in in the function decl node.  */
2601e4b17023SJohn MarinoDEFHOOK
2602e4b17023SJohn Marino(valid_attribute_p,
2603e4b17023SJohn Marino "",
2604e4b17023SJohn Marino bool, (tree fndecl, tree name, tree args, int flags),
2605e4b17023SJohn Marino default_target_option_valid_attribute_p)
2606e4b17023SJohn Marino
2607e4b17023SJohn Marino/* Function to save any extra target state in the target options structure.  */
2608e4b17023SJohn MarinoDEFHOOK
2609e4b17023SJohn Marino(save,
2610e4b17023SJohn Marino "",
2611e4b17023SJohn Marino void, (struct cl_target_option *ptr), NULL)
2612e4b17023SJohn Marino
2613e4b17023SJohn Marino/* Function to restore any extra target state from the target options
2614e4b17023SJohn Marino   structure.  */
2615e4b17023SJohn MarinoDEFHOOK
2616e4b17023SJohn Marino(restore,
2617e4b17023SJohn Marino "",
2618e4b17023SJohn Marino void, (struct cl_target_option *ptr), NULL)
2619e4b17023SJohn Marino
2620e4b17023SJohn Marino/* Function to print any extra target state from the target options
2621e4b17023SJohn Marino   structure.  */
2622e4b17023SJohn MarinoDEFHOOK
2623e4b17023SJohn Marino(print,
2624e4b17023SJohn Marino "",
2625e4b17023SJohn Marino void, (FILE *file, int indent, struct cl_target_option *ptr), NULL)
2626e4b17023SJohn Marino
2627e4b17023SJohn Marino/* Function to parse arguments to be validated for #pragma option, and to
2628e4b17023SJohn Marino   change the state if the options are valid.  If the first argument is
2629e4b17023SJohn Marino   NULL, the second argument specifies the default options to use.  Return
2630e4b17023SJohn Marino   true if the options are valid, and set the current state.  */
2631e4b17023SJohn Marino/* ??? The documentation in tm.texi is incomplete.  */
2632e4b17023SJohn MarinoDEFHOOK
2633e4b17023SJohn Marino(pragma_parse,
2634e4b17023SJohn Marino "",
2635e4b17023SJohn Marino bool, (tree args, tree pop_target),
2636e4b17023SJohn Marino default_target_option_pragma_parse)
2637e4b17023SJohn Marino
2638e4b17023SJohn Marino/* Do option overrides for the target.  */
2639e4b17023SJohn MarinoDEFHOOK
2640e4b17023SJohn Marino(override,
2641e4b17023SJohn Marino "",
2642e4b17023SJohn Marino void, (void),
2643e4b17023SJohn Marino hook_void_void)
2644e4b17023SJohn Marino
2645e4b17023SJohn Marino/* Function to determine if one function can inline another function.  */
2646e4b17023SJohn Marino#undef HOOK_PREFIX
2647e4b17023SJohn Marino#define HOOK_PREFIX "TARGET_"
2648e4b17023SJohn MarinoDEFHOOK
2649e4b17023SJohn Marino(can_inline_p,
2650e4b17023SJohn Marino "",
2651e4b17023SJohn Marino bool, (tree caller, tree callee),
2652e4b17023SJohn Marino default_target_can_inline_p)
2653e4b17023SJohn Marino
2654e4b17023SJohn MarinoHOOK_VECTOR_END (target_option)
2655e4b17023SJohn Marino
2656e4b17023SJohn Marino/* For targets that need to mark extra registers as live on entry to
2657e4b17023SJohn Marino   the function, they should define this target hook and set their
2658e4b17023SJohn Marino   bits in the bitmap passed in. */
2659e4b17023SJohn MarinoDEFHOOK
2660e4b17023SJohn Marino(extra_live_on_entry,
2661e4b17023SJohn Marino "",
2662e4b17023SJohn Marino void, (bitmap regs),
2663e4b17023SJohn Marino hook_void_bitmap)
2664e4b17023SJohn Marino
2665e4b17023SJohn Marino/* Fill in additional registers set up by prologue into a regset.  */
2666e4b17023SJohn MarinoDEFHOOK
2667e4b17023SJohn Marino(set_up_by_prologue,
2668e4b17023SJohn Marino "This hook should add additional registers that are computed by the prologue\
2669e4b17023SJohn Marino to the hard regset for shrink-wrapping optimization purposes.",
2670e4b17023SJohn Marino void, (struct hard_reg_set_container *),
2671e4b17023SJohn Marino NULL)
2672e4b17023SJohn Marino
2673e4b17023SJohn Marino/* Determine the type of unwind info to emit for debugging.  */
2674e4b17023SJohn MarinoDEFHOOK
2675e4b17023SJohn Marino(debug_unwind_info,
2676e4b17023SJohn Marino "",
2677e4b17023SJohn Marino enum unwind_info_type, (void),
2678e4b17023SJohn Marino default_debug_unwind_info)
2679e4b17023SJohn Marino
2680e4b17023SJohn MarinoDEFHOOKPOD
2681e4b17023SJohn Marino(atomic_test_and_set_trueval,
2682e4b17023SJohn Marino "This value should be set if the result written by\
2683e4b17023SJohn Marino @code{atomic_test_and_set} is not exactly 1, i.e. the\
2684e4b17023SJohn Marino @code{bool} @code{true}.",
2685e4b17023SJohn Marino unsigned char, 1)
2686e4b17023SJohn Marino
2687e4b17023SJohn Marino/* Leave the boolean fields at the end.  */
2688e4b17023SJohn Marino
2689e4b17023SJohn Marino/* True if we can create zeroed data by switching to a BSS section
2690e4b17023SJohn Marino   and then using ASM_OUTPUT_SKIP to allocate the space.  */
2691e4b17023SJohn MarinoDEFHOOKPOD
2692e4b17023SJohn Marino(have_switchable_bss_sections,
2693e4b17023SJohn Marino "",
2694e4b17023SJohn Marino bool, false)
2695e4b17023SJohn Marino
2696e4b17023SJohn Marino/* True if "native" constructors and destructors are supported,
2697e4b17023SJohn Marino   false if we're using collect2 for the job.  */
2698e4b17023SJohn MarinoDEFHOOKPOD
2699e4b17023SJohn Marino(have_ctors_dtors,
2700e4b17023SJohn Marino "",
2701e4b17023SJohn Marino bool, false)
2702e4b17023SJohn Marino
2703e4b17023SJohn Marino/* True if thread-local storage is supported.  */
2704e4b17023SJohn MarinoDEFHOOKPOD
2705e4b17023SJohn Marino(have_tls,
2706e4b17023SJohn Marino "",
2707e4b17023SJohn Marino bool, false)
2708e4b17023SJohn Marino
2709e4b17023SJohn Marino/* True if a small readonly data section is supported.  */
2710e4b17023SJohn MarinoDEFHOOKPOD
2711e4b17023SJohn Marino(have_srodata_section,
2712e4b17023SJohn Marino "",
2713e4b17023SJohn Marino bool, false)
2714e4b17023SJohn Marino
2715e4b17023SJohn Marino/* True if EH frame info sections should be zero-terminated.  */
2716e4b17023SJohn MarinoDEFHOOKPOD
2717e4b17023SJohn Marino(terminate_dw2_eh_frame_info,
2718e4b17023SJohn Marino "",
2719e4b17023SJohn Marino bool, true)
2720e4b17023SJohn Marino
2721e4b17023SJohn Marino/* True if #NO_APP should be emitted at the beginning of assembly output.  */
2722e4b17023SJohn MarinoDEFHOOKPOD
2723e4b17023SJohn Marino(asm_file_start_app_off,
2724e4b17023SJohn Marino "",
2725e4b17023SJohn Marino bool, false)
2726e4b17023SJohn Marino
2727e4b17023SJohn Marino/* True if output_file_directive should be called for main_input_filename
2728e4b17023SJohn Marino   at the beginning of assembly output.  */
2729e4b17023SJohn MarinoDEFHOOKPOD
2730e4b17023SJohn Marino(asm_file_start_file_directive,
2731e4b17023SJohn Marino "",
2732e4b17023SJohn Marino bool, false)
2733e4b17023SJohn Marino
2734e4b17023SJohn MarinoDEFHOOKPOD
2735e4b17023SJohn Marino(handle_pragma_extern_prefix,
2736e4b17023SJohn Marino"True if @code{#pragma extern_prefix} is to be supported.",
2737e4b17023SJohn Marino bool, 0)
2738e4b17023SJohn Marino
2739e4b17023SJohn Marino/* True if the target is allowed to reorder memory accesses unless
2740e4b17023SJohn Marino   synchronization is explicitly requested.  */
2741e4b17023SJohn MarinoDEFHOOKPOD
2742e4b17023SJohn Marino(relaxed_ordering,
2743e4b17023SJohn Marino "",
2744e4b17023SJohn Marino bool, false)
2745e4b17023SJohn Marino
2746e4b17023SJohn Marino/* Returns true if we should generate exception tables for use with the
2747e4b17023SJohn Marino   ARM EABI.  The effects the encoding of function exception specifications.  */
2748e4b17023SJohn MarinoDEFHOOKPOD
2749e4b17023SJohn Marino(arm_eabi_unwinder,
2750e4b17023SJohn Marino "",
2751e4b17023SJohn Marino bool, false)
2752e4b17023SJohn Marino
2753e4b17023SJohn MarinoDEFHOOKPOD
2754e4b17023SJohn Marino(want_debug_pub_sections,
2755e4b17023SJohn Marino "True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections\
2756e4b17023SJohn Marino should be emitted.  These sections are not used on most platforms, and\
2757e4b17023SJohn Marino in particular GDB does not use them.",
2758e4b17023SJohn Marino bool, false)
2759e4b17023SJohn Marino
2760e4b17023SJohn MarinoDEFHOOKPOD
2761*95d28233SJohn Marino(force_at_comp_dir,
2762*95d28233SJohn Marino "True if the @code{DW_AT_comp_dir} attribute should be emitted for each \
2763*95d28233SJohn Marino compilation unit.  This attribute is required for the darwin linker \
2764*95d28233SJohn Marino to emit debug information.",
2765*95d28233SJohn Marino bool, false)
2766*95d28233SJohn Marino
2767*95d28233SJohn MarinoDEFHOOKPOD
2768e4b17023SJohn Marino(delay_sched2, "True if sched2 is not to be run at its normal place.  \
2769e4b17023SJohn MarinoThis usually means it will be run as part of machine-specific reorg.",
2770e4b17023SJohn Marinobool, false)
2771e4b17023SJohn Marino
2772e4b17023SJohn MarinoDEFHOOKPOD
2773e4b17023SJohn Marino(delay_vartrack, "True if vartrack is not to be run at its normal place.  \
2774e4b17023SJohn MarinoThis usually means it will be run as part of machine-specific reorg.",
2775e4b17023SJohn Marinobool, false)
2776e4b17023SJohn Marino
2777e4b17023SJohn Marino/* Leave the boolean fields at the end.  */
2778e4b17023SJohn Marino
2779e4b17023SJohn Marino/* Close the 'struct gcc_target' definition.  */
2780e4b17023SJohn MarinoHOOK_VECTOR_END (C90_EMPTY_HACK)
2781