xref: /dragonfly/contrib/gcc-8.0/gcc/hooks.c (revision 38fd1498)
1*38fd1498Szrj /* General-purpose hooks.
2*38fd1498Szrj    Copyright (C) 2002-2018 Free Software Foundation, Inc.
3*38fd1498Szrj 
4*38fd1498Szrj    This program is free software; you can redistribute it and/or modify it
5*38fd1498Szrj    under the terms of the GNU General Public License as published by the
6*38fd1498Szrj    Free Software Foundation; either version 3, or (at your option) any
7*38fd1498Szrj    later version.
8*38fd1498Szrj 
9*38fd1498Szrj    This program is distributed in the hope that it will be useful,
10*38fd1498Szrj    but WITHOUT ANY WARRANTY; without even the implied warranty of
11*38fd1498Szrj    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12*38fd1498Szrj    GNU General Public License for more details.
13*38fd1498Szrj 
14*38fd1498Szrj    You should have received a copy of the GNU General Public License
15*38fd1498Szrj    along with this program; see the file COPYING3.  If not see
16*38fd1498Szrj    <http://www.gnu.org/licenses/>.
17*38fd1498Szrj 
18*38fd1498Szrj    In other words, you are welcome to use, share and improve this program.
19*38fd1498Szrj    You are forbidden to forbid anyone else to use, share and improve
20*38fd1498Szrj    what you give them.   Help stamp out software-hoarding!  */
21*38fd1498Szrj 
22*38fd1498Szrj /* This file contains generic hooks that can be used as defaults for
23*38fd1498Szrj    target or language-dependent hook initializers.  */
24*38fd1498Szrj 
25*38fd1498Szrj #include "config.h"
26*38fd1498Szrj #include "system.h"
27*38fd1498Szrj #include "coretypes.h"
28*38fd1498Szrj #include "tm.h"
29*38fd1498Szrj #include "hooks.h"
30*38fd1498Szrj 
31*38fd1498Szrj /* Generic hook that does absolutely zappo.  */
32*38fd1498Szrj void
hook_void_void(void)33*38fd1498Szrj hook_void_void (void)
34*38fd1498Szrj {
35*38fd1498Szrj }
36*38fd1498Szrj 
37*38fd1498Szrj /* Generic hook that takes no arguments and returns false.  */
38*38fd1498Szrj bool
hook_bool_void_false(void)39*38fd1498Szrj hook_bool_void_false (void)
40*38fd1498Szrj {
41*38fd1498Szrj   return false;
42*38fd1498Szrj }
43*38fd1498Szrj 
44*38fd1498Szrj /* Generic hook that takes no arguments and returns true.  */
45*38fd1498Szrj bool
hook_bool_void_true(void)46*38fd1498Szrj hook_bool_void_true (void)
47*38fd1498Szrj {
48*38fd1498Szrj   return true;
49*38fd1498Szrj }
50*38fd1498Szrj 
51*38fd1498Szrj /* Generic hook that takes (bool) and returns false.  */
52*38fd1498Szrj bool
hook_bool_bool_false(bool)53*38fd1498Szrj hook_bool_bool_false (bool)
54*38fd1498Szrj {
55*38fd1498Szrj   return false;
56*38fd1498Szrj }
57*38fd1498Szrj 
58*38fd1498Szrj /* Generic hook that takes (bool, struct gcc_options *) and returns false.  */
59*38fd1498Szrj bool
hook_bool_bool_gcc_optionsp_false(bool,struct gcc_options *)60*38fd1498Szrj hook_bool_bool_gcc_optionsp_false (bool, struct gcc_options *)
61*38fd1498Szrj {
62*38fd1498Szrj   return false;
63*38fd1498Szrj }
64*38fd1498Szrj 
65*38fd1498Szrj /* Generic hook that takes const int, const int) and returns true.  */
hook_bool_const_int_const_int_true(const int,const int)66*38fd1498Szrj bool hook_bool_const_int_const_int_true (const int, const int)
67*38fd1498Szrj {
68*38fd1498Szrj   return true;
69*38fd1498Szrj }
70*38fd1498Szrj 
71*38fd1498Szrj /* Generic hook that takes (machine_mode) and returns false.  */
72*38fd1498Szrj bool
hook_bool_mode_false(machine_mode)73*38fd1498Szrj hook_bool_mode_false (machine_mode)
74*38fd1498Szrj {
75*38fd1498Szrj   return false;
76*38fd1498Szrj }
77*38fd1498Szrj 
78*38fd1498Szrj /* Generic hook that takes (machine_mode) and returns true.  */
79*38fd1498Szrj bool
hook_bool_mode_true(machine_mode)80*38fd1498Szrj hook_bool_mode_true (machine_mode)
81*38fd1498Szrj {
82*38fd1498Szrj   return true;
83*38fd1498Szrj }
84*38fd1498Szrj 
85*38fd1498Szrj /* Generic hook that takes (machine_mode, machine_mode) and returns true.  */
86*38fd1498Szrj bool
hook_bool_mode_mode_true(machine_mode,machine_mode)87*38fd1498Szrj hook_bool_mode_mode_true (machine_mode, machine_mode)
88*38fd1498Szrj {
89*38fd1498Szrj   return true;
90*38fd1498Szrj }
91*38fd1498Szrj 
92*38fd1498Szrj /* Generic hook that takes (machine_mode, const_rtx) and returns false.  */
93*38fd1498Szrj bool
hook_bool_mode_const_rtx_false(machine_mode,const_rtx)94*38fd1498Szrj hook_bool_mode_const_rtx_false (machine_mode, const_rtx)
95*38fd1498Szrj {
96*38fd1498Szrj   return false;
97*38fd1498Szrj }
98*38fd1498Szrj 
99*38fd1498Szrj /* Generic hook that takes (machine_mode, const_rtx) and returns true.  */
100*38fd1498Szrj bool
hook_bool_mode_const_rtx_true(machine_mode,const_rtx)101*38fd1498Szrj hook_bool_mode_const_rtx_true (machine_mode, const_rtx)
102*38fd1498Szrj {
103*38fd1498Szrj   return true;
104*38fd1498Szrj }
105*38fd1498Szrj 
106*38fd1498Szrj /* Generic hook that takes (machine_mode, rtx) and returns false.  */
107*38fd1498Szrj bool
hook_bool_mode_rtx_false(machine_mode,rtx)108*38fd1498Szrj hook_bool_mode_rtx_false (machine_mode, rtx)
109*38fd1498Szrj {
110*38fd1498Szrj   return false;
111*38fd1498Szrj }
112*38fd1498Szrj 
113*38fd1498Szrj /* Generic hook that takes (machine_mode, rtx) and returns true.  */
114*38fd1498Szrj bool
hook_bool_mode_rtx_true(machine_mode,rtx)115*38fd1498Szrj hook_bool_mode_rtx_true (machine_mode, rtx)
116*38fd1498Szrj {
117*38fd1498Szrj   return true;
118*38fd1498Szrj }
119*38fd1498Szrj 
120*38fd1498Szrj /* Generic hook that takes (const rtx_insn *, const rtx_insn *) and returns true.  */
121*38fd1498Szrj bool
hook_bool_const_rtx_insn_const_rtx_insn_true(const rtx_insn *,const rtx_insn *)122*38fd1498Szrj hook_bool_const_rtx_insn_const_rtx_insn_true (const rtx_insn *,
123*38fd1498Szrj 					      const rtx_insn *)
124*38fd1498Szrj {
125*38fd1498Szrj   return true;
126*38fd1498Szrj }
127*38fd1498Szrj 
128*38fd1498Szrj /* Generic hook that takes (machine_mode, unsigned HOST_WIDE_INT)
129*38fd1498Szrj    and returns false.  */
130*38fd1498Szrj bool
hook_bool_mode_uhwi_false(machine_mode,unsigned HOST_WIDE_INT)131*38fd1498Szrj hook_bool_mode_uhwi_false (machine_mode, unsigned HOST_WIDE_INT)
132*38fd1498Szrj {
133*38fd1498Szrj   return false;
134*38fd1498Szrj }
135*38fd1498Szrj 
136*38fd1498Szrj /* Generic hook that takes (poly_uint64, poly_uint64) and returns true.  */
137*38fd1498Szrj bool
hook_bool_puint64_puint64_true(poly_uint64,poly_uint64)138*38fd1498Szrj hook_bool_puint64_puint64_true (poly_uint64, poly_uint64)
139*38fd1498Szrj {
140*38fd1498Szrj   return true;
141*38fd1498Szrj }
142*38fd1498Szrj 
143*38fd1498Szrj /* Generic hook that takes (unsigned int, machine_mode) and returns false.  */
144*38fd1498Szrj bool
hook_bool_uint_mode_false(unsigned int,machine_mode)145*38fd1498Szrj hook_bool_uint_mode_false (unsigned int, machine_mode)
146*38fd1498Szrj {
147*38fd1498Szrj   return false;
148*38fd1498Szrj }
149*38fd1498Szrj 
150*38fd1498Szrj /* Generic hook that takes (unsigned int, machine_mode) and returns true.  */
151*38fd1498Szrj bool
hook_bool_uint_mode_true(unsigned int,machine_mode)152*38fd1498Szrj hook_bool_uint_mode_true (unsigned int, machine_mode)
153*38fd1498Szrj {
154*38fd1498Szrj   return true;
155*38fd1498Szrj }
156*38fd1498Szrj 
157*38fd1498Szrj /* Generic hook that takes (FILE *, const char *) and does nothing.  */
158*38fd1498Szrj void
hook_void_FILEptr_constcharptr(FILE *,const char *)159*38fd1498Szrj hook_void_FILEptr_constcharptr (FILE *, const char *)
160*38fd1498Szrj {
161*38fd1498Szrj }
162*38fd1498Szrj 
163*38fd1498Szrj /* Generic hook that takes (FILE *, const char *, constr_tree *) and does
164*38fd1498Szrj    nothing.  */
165*38fd1498Szrj void
hook_void_FILEptr_constcharptr_const_tree(FILE *,const char *,const_tree)166*38fd1498Szrj hook_void_FILEptr_constcharptr_const_tree (FILE *, const char *, const_tree)
167*38fd1498Szrj {
168*38fd1498Szrj }
169*38fd1498Szrj 
170*38fd1498Szrj /* Generic hook that takes (FILE *, rtx) and returns false.  */
171*38fd1498Szrj bool
hook_bool_FILEptr_rtx_false(FILE *,rtx)172*38fd1498Szrj hook_bool_FILEptr_rtx_false (FILE *, rtx)
173*38fd1498Szrj {
174*38fd1498Szrj   return false;
175*38fd1498Szrj }
176*38fd1498Szrj 
177*38fd1498Szrj /* Generic hook that takes (gimple_stmt_iterator *) and returns
178*38fd1498Szrj    false.  */
179*38fd1498Szrj bool
hook_bool_gsiptr_false(gimple_stmt_iterator *)180*38fd1498Szrj hook_bool_gsiptr_false (gimple_stmt_iterator *)
181*38fd1498Szrj {
182*38fd1498Szrj   return false;
183*38fd1498Szrj }
184*38fd1498Szrj 
185*38fd1498Szrj /* Used for the TARGET_ASM_CAN_OUTPUT_MI_THUNK hook.  */
186*38fd1498Szrj bool
hook_bool_const_tree_hwi_hwi_const_tree_false(const_tree,HOST_WIDE_INT,HOST_WIDE_INT,const_tree)187*38fd1498Szrj hook_bool_const_tree_hwi_hwi_const_tree_false (const_tree, HOST_WIDE_INT,
188*38fd1498Szrj 					       HOST_WIDE_INT, const_tree)
189*38fd1498Szrj {
190*38fd1498Szrj   return false;
191*38fd1498Szrj }
192*38fd1498Szrj 
193*38fd1498Szrj bool
hook_bool_const_tree_hwi_hwi_const_tree_true(const_tree,HOST_WIDE_INT,HOST_WIDE_INT,const_tree)194*38fd1498Szrj hook_bool_const_tree_hwi_hwi_const_tree_true (const_tree, HOST_WIDE_INT,
195*38fd1498Szrj 					      HOST_WIDE_INT, const_tree)
196*38fd1498Szrj {
197*38fd1498Szrj   return true;
198*38fd1498Szrj }
199*38fd1498Szrj 
200*38fd1498Szrj bool
default_can_output_mi_thunk_no_vcall(const_tree,HOST_WIDE_INT,HOST_WIDE_INT c,const_tree)201*38fd1498Szrj default_can_output_mi_thunk_no_vcall (const_tree, HOST_WIDE_INT,
202*38fd1498Szrj 				      HOST_WIDE_INT c, const_tree)
203*38fd1498Szrj {
204*38fd1498Szrj   return c == 0;
205*38fd1498Szrj }
206*38fd1498Szrj 
207*38fd1498Szrj int
hook_int_uint_mode_1(unsigned int,machine_mode)208*38fd1498Szrj hook_int_uint_mode_1 (unsigned int, machine_mode)
209*38fd1498Szrj {
210*38fd1498Szrj   return 1;
211*38fd1498Szrj }
212*38fd1498Szrj 
213*38fd1498Szrj int
hook_int_const_tree_0(const_tree)214*38fd1498Szrj hook_int_const_tree_0 (const_tree)
215*38fd1498Szrj {
216*38fd1498Szrj   return 0;
217*38fd1498Szrj }
218*38fd1498Szrj 
219*38fd1498Szrj /* ??? Used for comp_type_attributes, which ought to return bool.  */
220*38fd1498Szrj int
hook_int_const_tree_const_tree_1(const_tree,const_tree)221*38fd1498Szrj hook_int_const_tree_const_tree_1 (const_tree, const_tree)
222*38fd1498Szrj {
223*38fd1498Szrj   return 1;
224*38fd1498Szrj }
225*38fd1498Szrj 
226*38fd1498Szrj int
hook_int_rtx_0(rtx)227*38fd1498Szrj hook_int_rtx_0 (rtx)
228*38fd1498Szrj {
229*38fd1498Szrj   return 0;
230*38fd1498Szrj }
231*38fd1498Szrj 
232*38fd1498Szrj int
hook_int_rtx_1(rtx)233*38fd1498Szrj hook_int_rtx_1 (rtx)
234*38fd1498Szrj {
235*38fd1498Szrj   return 1;
236*38fd1498Szrj }
237*38fd1498Szrj 
238*38fd1498Szrj int
hook_int_rtx_insn_0(rtx_insn *)239*38fd1498Szrj hook_int_rtx_insn_0 (rtx_insn *)
240*38fd1498Szrj {
241*38fd1498Szrj   return 0;
242*38fd1498Szrj }
243*38fd1498Szrj 
244*38fd1498Szrj int
hook_int_rtx_insn_unreachable(rtx_insn *)245*38fd1498Szrj hook_int_rtx_insn_unreachable (rtx_insn *)
246*38fd1498Szrj {
247*38fd1498Szrj   gcc_unreachable ();
248*38fd1498Szrj }
249*38fd1498Szrj 
250*38fd1498Szrj int
hook_int_rtx_bool_0(rtx,bool)251*38fd1498Szrj hook_int_rtx_bool_0 (rtx, bool)
252*38fd1498Szrj {
253*38fd1498Szrj   return 0;
254*38fd1498Szrj }
255*38fd1498Szrj 
256*38fd1498Szrj int
hook_int_rtx_mode_as_bool_0(rtx,machine_mode,addr_space_t,bool)257*38fd1498Szrj hook_int_rtx_mode_as_bool_0 (rtx, machine_mode, addr_space_t, bool)
258*38fd1498Szrj {
259*38fd1498Szrj   return 0;
260*38fd1498Szrj }
261*38fd1498Szrj 
262*38fd1498Szrj unsigned int
hook_uint_void_0(void)263*38fd1498Szrj hook_uint_void_0 (void)
264*38fd1498Szrj {
265*38fd1498Szrj   return 0;
266*38fd1498Szrj }
267*38fd1498Szrj 
268*38fd1498Szrj HOST_WIDE_INT
hook_hwi_void_0(void)269*38fd1498Szrj hook_hwi_void_0 (void)
270*38fd1498Szrj {
271*38fd1498Szrj   return 0;
272*38fd1498Szrj }
273*38fd1498Szrj 
274*38fd1498Szrj void
hook_void_tree(tree)275*38fd1498Szrj hook_void_tree (tree)
276*38fd1498Szrj {
277*38fd1498Szrj }
278*38fd1498Szrj 
279*38fd1498Szrj void
hook_void_rtx_tree(rtx,tree)280*38fd1498Szrj hook_void_rtx_tree (rtx, tree)
281*38fd1498Szrj {
282*38fd1498Szrj }
283*38fd1498Szrj 
284*38fd1498Szrj void
hook_void_constcharptr(const char *)285*38fd1498Szrj hook_void_constcharptr (const char *)
286*38fd1498Szrj {
287*38fd1498Szrj }
288*38fd1498Szrj 
289*38fd1498Szrj void
hook_void_tree_treeptr(tree,tree *)290*38fd1498Szrj hook_void_tree_treeptr (tree, tree *)
291*38fd1498Szrj {
292*38fd1498Szrj }
293*38fd1498Szrj 
294*38fd1498Szrj void
hook_void_int_int(int,int)295*38fd1498Szrj hook_void_int_int (int, int)
296*38fd1498Szrj {
297*38fd1498Szrj }
298*38fd1498Szrj 
299*38fd1498Szrj bool
hook_bool_tree_false(tree)300*38fd1498Szrj hook_bool_tree_false (tree)
301*38fd1498Szrj {
302*38fd1498Szrj   return false;
303*38fd1498Szrj }
304*38fd1498Szrj 
305*38fd1498Szrj bool
hook_bool_const_tree_false(const_tree)306*38fd1498Szrj hook_bool_const_tree_false (const_tree)
307*38fd1498Szrj {
308*38fd1498Szrj   return false;
309*38fd1498Szrj }
310*38fd1498Szrj 
311*38fd1498Szrj bool
hook_bool_tree_true(tree)312*38fd1498Szrj hook_bool_tree_true (tree)
313*38fd1498Szrj {
314*38fd1498Szrj   return true;
315*38fd1498Szrj }
316*38fd1498Szrj 
317*38fd1498Szrj bool
hook_bool_const_tree_true(const_tree)318*38fd1498Szrj hook_bool_const_tree_true (const_tree)
319*38fd1498Szrj {
320*38fd1498Szrj   return true;
321*38fd1498Szrj }
322*38fd1498Szrj 
323*38fd1498Szrj bool
hook_bool_tree_tree_false(tree,tree)324*38fd1498Szrj hook_bool_tree_tree_false (tree, tree)
325*38fd1498Szrj {
326*38fd1498Szrj   return false;
327*38fd1498Szrj }
328*38fd1498Szrj 
329*38fd1498Szrj bool
hook_bool_tree_tree_true(tree,tree)330*38fd1498Szrj hook_bool_tree_tree_true (tree, tree)
331*38fd1498Szrj {
332*38fd1498Szrj   return true;
333*38fd1498Szrj }
334*38fd1498Szrj 
335*38fd1498Szrj bool
hook_bool_tree_bool_false(tree,bool)336*38fd1498Szrj hook_bool_tree_bool_false (tree, bool)
337*38fd1498Szrj {
338*38fd1498Szrj   return false;
339*38fd1498Szrj }
340*38fd1498Szrj 
341*38fd1498Szrj bool
hook_bool_rtx_insn_true(rtx_insn *)342*38fd1498Szrj hook_bool_rtx_insn_true (rtx_insn *)
343*38fd1498Szrj {
344*38fd1498Szrj   return true;
345*38fd1498Szrj }
346*38fd1498Szrj 
347*38fd1498Szrj bool
hook_bool_rtx_false(rtx)348*38fd1498Szrj hook_bool_rtx_false (rtx)
349*38fd1498Szrj {
350*38fd1498Szrj   return false;
351*38fd1498Szrj }
352*38fd1498Szrj 
353*38fd1498Szrj bool
hook_bool_uintp_uintp_false(unsigned int *,unsigned int *)354*38fd1498Szrj hook_bool_uintp_uintp_false (unsigned int *, unsigned int *)
355*38fd1498Szrj {
356*38fd1498Szrj   return false;
357*38fd1498Szrj }
358*38fd1498Szrj 
359*38fd1498Szrj bool
hook_bool_rtx_mode_int_int_intp_bool_false(rtx,machine_mode,int,int,int *,bool)360*38fd1498Szrj hook_bool_rtx_mode_int_int_intp_bool_false (rtx, machine_mode, int, int,
361*38fd1498Szrj 					    int *, bool)
362*38fd1498Szrj {
363*38fd1498Szrj   return false;
364*38fd1498Szrj }
365*38fd1498Szrj 
366*38fd1498Szrj bool
hook_bool_wint_wint_uint_bool_true(const widest_int &,const widest_int &,unsigned int,bool)367*38fd1498Szrj hook_bool_wint_wint_uint_bool_true (const widest_int &, const widest_int &,
368*38fd1498Szrj 				    unsigned int, bool)
369*38fd1498Szrj {
370*38fd1498Szrj   return true;
371*38fd1498Szrj }
372*38fd1498Szrj 
373*38fd1498Szrj /* Generic hook that takes an rtx and returns it.  */
374*38fd1498Szrj rtx
hook_rtx_rtx_identity(rtx x)375*38fd1498Szrj hook_rtx_rtx_identity (rtx x)
376*38fd1498Szrj {
377*38fd1498Szrj   return x;
378*38fd1498Szrj }
379*38fd1498Szrj 
380*38fd1498Szrj /* Generic hook that takes an rtx and returns NULL_RTX.  */
381*38fd1498Szrj rtx
hook_rtx_rtx_null(rtx)382*38fd1498Szrj hook_rtx_rtx_null (rtx)
383*38fd1498Szrj {
384*38fd1498Szrj   return NULL;
385*38fd1498Szrj }
386*38fd1498Szrj 
387*38fd1498Szrj /* Generic hook that takes a tree and an int and returns NULL_RTX.  */
388*38fd1498Szrj rtx
hook_rtx_tree_int_null(tree,int)389*38fd1498Szrj hook_rtx_tree_int_null (tree, int)
390*38fd1498Szrj {
391*38fd1498Szrj   return NULL;
392*38fd1498Szrj }
393*38fd1498Szrj 
394*38fd1498Szrj /* Generic hook that takes a machine mode and returns an unsigned int 0.  */
395*38fd1498Szrj unsigned int
hook_uint_mode_0(machine_mode)396*38fd1498Szrj hook_uint_mode_0 (machine_mode)
397*38fd1498Szrj {
398*38fd1498Szrj   return 0;
399*38fd1498Szrj }
400*38fd1498Szrj 
401*38fd1498Szrj /* Generic hook that takes no arguments and returns a NULL const string.  */
402*38fd1498Szrj const char *
hook_constcharptr_void_null(void)403*38fd1498Szrj hook_constcharptr_void_null (void)
404*38fd1498Szrj {
405*38fd1498Szrj   return NULL;
406*38fd1498Szrj }
407*38fd1498Szrj 
408*38fd1498Szrj /* Generic hook that takes no arguments and returns a NULL string.  */
409*38fd1498Szrj char *
hook_charptr_void_null(void)410*38fd1498Szrj hook_charptr_void_null (void)
411*38fd1498Szrj {
412*38fd1498Szrj   return NULL;
413*38fd1498Szrj }
414*38fd1498Szrj 
415*38fd1498Szrj /* Generic hook that takes a tree and returns a NULL string.  */
416*38fd1498Szrj const char *
hook_constcharptr_const_tree_null(const_tree)417*38fd1498Szrj hook_constcharptr_const_tree_null (const_tree)
418*38fd1498Szrj {
419*38fd1498Szrj   return NULL;
420*38fd1498Szrj }
421*38fd1498Szrj 
422*38fd1498Szrj tree
hook_tree_tree_int_treep_bool_null(tree,int,tree *,bool)423*38fd1498Szrj hook_tree_tree_int_treep_bool_null (tree, int, tree *, bool)
424*38fd1498Szrj {
425*38fd1498Szrj   return NULL;
426*38fd1498Szrj }
427*38fd1498Szrj 
428*38fd1498Szrj tree
hook_tree_tree_tree_null(tree,tree)429*38fd1498Szrj hook_tree_tree_tree_null (tree, tree)
430*38fd1498Szrj {
431*38fd1498Szrj   return NULL;
432*38fd1498Szrj }
433*38fd1498Szrj 
434*38fd1498Szrj tree
hook_tree_tree_tree_tree_null(tree,tree,tree)435*38fd1498Szrj hook_tree_tree_tree_tree_null (tree, tree, tree)
436*38fd1498Szrj {
437*38fd1498Szrj   return NULL;
438*38fd1498Szrj }
439*38fd1498Szrj 
440*38fd1498Szrj /* Generic hook that takes an rtx_insn *and returns a NULL string.  */
441*38fd1498Szrj const char *
hook_constcharptr_const_rtx_insn_null(const rtx_insn *)442*38fd1498Szrj hook_constcharptr_const_rtx_insn_null (const rtx_insn *)
443*38fd1498Szrj {
444*38fd1498Szrj   return NULL;
445*38fd1498Szrj }
446*38fd1498Szrj 
447*38fd1498Szrj const char *
hook_constcharptr_const_tree_const_tree_null(const_tree,const_tree)448*38fd1498Szrj hook_constcharptr_const_tree_const_tree_null (const_tree, const_tree)
449*38fd1498Szrj {
450*38fd1498Szrj   return NULL;
451*38fd1498Szrj }
452*38fd1498Szrj 
453*38fd1498Szrj const char *
hook_constcharptr_int_const_tree_null(int,const_tree)454*38fd1498Szrj hook_constcharptr_int_const_tree_null (int, const_tree)
455*38fd1498Szrj {
456*38fd1498Szrj   return NULL;
457*38fd1498Szrj }
458*38fd1498Szrj 
459*38fd1498Szrj const char *
hook_constcharptr_int_const_tree_const_tree_null(int,const_tree,const_tree)460*38fd1498Szrj hook_constcharptr_int_const_tree_const_tree_null (int, const_tree, const_tree)
461*38fd1498Szrj {
462*38fd1498Szrj   return NULL;
463*38fd1498Szrj }
464*38fd1498Szrj 
465*38fd1498Szrj /* Generic hook that takes a const_tree and returns NULL_TREE.  */
466*38fd1498Szrj tree
hook_tree_const_tree_null(const_tree)467*38fd1498Szrj hook_tree_const_tree_null (const_tree)
468*38fd1498Szrj {
469*38fd1498Szrj   return NULL;
470*38fd1498Szrj }
471*38fd1498Szrj 
472*38fd1498Szrj /* Generic hook that takes no arguments and returns a NULL_TREE.  */
473*38fd1498Szrj tree
hook_tree_void_null(void)474*38fd1498Szrj hook_tree_void_null (void)
475*38fd1498Szrj {
476*38fd1498Szrj   return NULL;
477*38fd1498Szrj }
478*38fd1498Szrj 
479*38fd1498Szrj /* Generic hook that takes a rtx_insn * and an int and returns a bool.  */
480*38fd1498Szrj 
481*38fd1498Szrj bool
hook_bool_rtx_insn_int_false(rtx_insn *,int)482*38fd1498Szrj hook_bool_rtx_insn_int_false (rtx_insn *, int)
483*38fd1498Szrj {
484*38fd1498Szrj   return false;
485*38fd1498Szrj }
486*38fd1498Szrj 
487*38fd1498Szrj /* Generic hook that takes a rtx_insn * and an int and returns void.  */
488*38fd1498Szrj 
489*38fd1498Szrj void
hook_void_rtx_insn_int(rtx_insn *,int)490*38fd1498Szrj hook_void_rtx_insn_int (rtx_insn *, int)
491*38fd1498Szrj {
492*38fd1498Szrj }
493*38fd1498Szrj 
494*38fd1498Szrj /* Generic hook that takes a struct gcc_options * and returns void.  */
495*38fd1498Szrj 
496*38fd1498Szrj void
hook_void_gcc_optionsp(struct gcc_options *)497*38fd1498Szrj hook_void_gcc_optionsp (struct gcc_options *)
498*38fd1498Szrj {
499*38fd1498Szrj }
500*38fd1498Szrj 
501*38fd1498Szrj /* Generic hook that takes an unsigned int, an unsigned int pointer and
502*38fd1498Szrj    returns false.  */
503*38fd1498Szrj 
504*38fd1498Szrj bool
hook_bool_uint_uintp_false(unsigned int,unsigned int *)505*38fd1498Szrj hook_bool_uint_uintp_false (unsigned int, unsigned int *)
506*38fd1498Szrj {
507*38fd1498Szrj   return false;
508*38fd1498Szrj }
509*38fd1498Szrj 
510*38fd1498Szrj /* Generic hook that takes a register class and returns false.  */
511*38fd1498Szrj bool
hook_bool_reg_class_t_false(reg_class_t regclass ATTRIBUTE_UNUSED)512*38fd1498Szrj hook_bool_reg_class_t_false (reg_class_t regclass ATTRIBUTE_UNUSED)
513*38fd1498Szrj {
514*38fd1498Szrj   return false;
515*38fd1498Szrj }
516*38fd1498Szrj 
517*38fd1498Szrj /* Generic hook that takes 2 machine_modes and a register class and
518*38fd1498Szrj    returns true.  */
519*38fd1498Szrj bool
hook_bool_mode_mode_reg_class_t_true(machine_mode,machine_mode,reg_class_t)520*38fd1498Szrj hook_bool_mode_mode_reg_class_t_true (machine_mode, machine_mode, reg_class_t)
521*38fd1498Szrj {
522*38fd1498Szrj   return true;
523*38fd1498Szrj }
524*38fd1498Szrj 
525*38fd1498Szrj /* Generic hook that takes a machine_mode and 2 register classes
526*38fd1498Szrj    and returns false.  */
527*38fd1498Szrj bool
hook_bool_mode_reg_class_t_reg_class_t_false(machine_mode,reg_class_t,reg_class_t)528*38fd1498Szrj hook_bool_mode_reg_class_t_reg_class_t_false (machine_mode, reg_class_t,
529*38fd1498Szrj 					      reg_class_t)
530*38fd1498Szrj {
531*38fd1498Szrj   return false;
532*38fd1498Szrj }
533*38fd1498Szrj 
534*38fd1498Szrj /* Generic hook that takes a mode and an unsigned HOST_WIDE_INT and
535*38fd1498Szrj    returns no mode.  */
536*38fd1498Szrj 
537*38fd1498Szrj opt_machine_mode
hook_optmode_mode_uhwi_none(machine_mode,unsigned HOST_WIDE_INT)538*38fd1498Szrj hook_optmode_mode_uhwi_none (machine_mode, unsigned HOST_WIDE_INT)
539*38fd1498Szrj {
540*38fd1498Szrj   return opt_machine_mode ();
541*38fd1498Szrj }
542