dojump.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* Export function prototypes from dojump.c.
  2. Copyright (C) 2015-2019 Free Software Foundation, Inc.
  3. This file is part of GCC.
  4. GCC is free software; you can redistribute it and/or modify it under
  5. the terms of the GNU General Public License as published by the Free
  6. Software Foundation; either version 3, or (at your option) any later
  7. version.
  8. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  9. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  11. for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GCC; see the file COPYING3. If not see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef GCC_DOJUMP_H
  16. #define GCC_DOJUMP_H
  17. /* At the start of a function, record that we have no previously-pushed
  18. arguments waiting to be popped. */
  19. extern void init_pending_stack_adjust (void);
  20. /* Discard any pending stack adjustment. */
  21. extern void discard_pending_stack_adjust (void);
  22. /* When exiting from function, if safe, clear out any pending stack adjust
  23. so the adjustment won't get done. */
  24. extern void clear_pending_stack_adjust (void);
  25. /* Pop any previously-pushed arguments that have not been popped yet. */
  26. extern void do_pending_stack_adjust (void);
  27. /* Struct for saving/restoring of pending_stack_adjust/stack_pointer_delta
  28. values. */
  29. struct saved_pending_stack_adjust
  30. {
  31. /* Saved value of pending_stack_adjust. */
  32. poly_int64 x_pending_stack_adjust;
  33. /* Saved value of stack_pointer_delta. */
  34. poly_int64 x_stack_pointer_delta;
  35. };
  36. /* Remember pending_stack_adjust/stack_pointer_delta.
  37. To be used around code that may call do_pending_stack_adjust (),
  38. but the generated code could be discarded e.g. using delete_insns_since. */
  39. extern void save_pending_stack_adjust (saved_pending_stack_adjust *);
  40. /* Restore the saved pending_stack_adjust/stack_pointer_delta. */
  41. extern void restore_pending_stack_adjust (saved_pending_stack_adjust *);
  42. extern bool split_comparison (enum rtx_code, machine_mode,
  43. enum rtx_code *, enum rtx_code *);
  44. /* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */
  45. extern void jumpif (tree exp, rtx_code_label *label, profile_probability prob);
  46. extern void jumpif_1 (enum tree_code, tree, tree, rtx_code_label *,
  47. profile_probability);
  48. /* Generate code to evaluate EXP and jump to LABEL if the value is zero. */
  49. extern void jumpifnot (tree exp, rtx_code_label *label,
  50. profile_probability prob);
  51. extern void jumpifnot_1 (enum tree_code, tree, tree, rtx_code_label *,
  52. profile_probability);
  53. extern void do_compare_rtx_and_jump (rtx, rtx, enum rtx_code, int,
  54. machine_mode, rtx, rtx_code_label *,
  55. rtx_code_label *, profile_probability);
  56. #endif /* GCC_DOJUMP_H */