PR c++/85662
[official-gcc.git] / gcc / dojump.h
blobb7682291d22384c8855c617c0c91e0417602fe1f
1 /* Export function prototypes from dojump.c.
2 Copyright (C) 2015-2018 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
9 version.
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 #ifndef GCC_DOJUMP_H
21 #define GCC_DOJUMP_H
23 /* At the start of a function, record that we have no previously-pushed
24 arguments waiting to be popped. */
25 extern void init_pending_stack_adjust (void);
27 /* Discard any pending stack adjustment. */
28 extern void discard_pending_stack_adjust (void);
30 /* When exiting from function, if safe, clear out any pending stack adjust
31 so the adjustment won't get done. */
32 extern void clear_pending_stack_adjust (void);
34 /* Pop any previously-pushed arguments that have not been popped yet. */
35 extern void do_pending_stack_adjust (void);
37 /* Struct for saving/restoring of pending_stack_adjust/stack_pointer_delta
38 values. */
40 struct saved_pending_stack_adjust
42 /* Saved value of pending_stack_adjust. */
43 poly_int64 x_pending_stack_adjust;
45 /* Saved value of stack_pointer_delta. */
46 poly_int64 x_stack_pointer_delta;
49 /* Remember pending_stack_adjust/stack_pointer_delta.
50 To be used around code that may call do_pending_stack_adjust (),
51 but the generated code could be discarded e.g. using delete_insns_since. */
53 extern void save_pending_stack_adjust (saved_pending_stack_adjust *);
55 /* Restore the saved pending_stack_adjust/stack_pointer_delta. */
57 extern void restore_pending_stack_adjust (saved_pending_stack_adjust *);
59 /* Generate code to evaluate EXP and jump to LABEL if the value is zero. */
60 extern void jumpifnot (tree exp, rtx_code_label *label,
61 profile_probability prob);
62 extern void jumpifnot_1 (enum tree_code, tree, tree, rtx_code_label *,
63 profile_probability);
65 /* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */
66 extern void jumpif (tree exp, rtx_code_label *label, profile_probability prob);
67 extern void jumpif_1 (enum tree_code, tree, tree, rtx_code_label *,
68 profile_probability);
70 /* Generate code to evaluate EXP and jump to IF_FALSE_LABEL if
71 the result is zero, or IF_TRUE_LABEL if the result is one. */
72 extern void do_jump (tree exp, rtx_code_label *if_false_label,
73 rtx_code_label *if_true_label, profile_probability prob);
74 extern void do_jump_1 (enum tree_code, tree, tree, rtx_code_label *,
75 rtx_code_label *, profile_probability);
77 extern void do_compare_rtx_and_jump (rtx, rtx, enum rtx_code, int,
78 machine_mode, rtx, rtx_code_label *,
79 rtx_code_label *, profile_probability);
81 extern bool split_comparison (enum rtx_code, machine_mode,
82 enum rtx_code *, enum rtx_code *);
84 #endif /* GCC_DOJUMP_H */