dojump.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* Export function prototypes from dojump.c.
  2. Copyright (C) 2015-2020 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. class saved_pending_stack_adjust
  30. {
  31. public:
  32. /* Saved value of pending_stack_adjust. */
  33. poly_int64 x_pending_stack_adjust;
  34. /* Saved value of stack_pointer_delta. */
  35. poly_int64 x_stack_pointer_delta;
  36. };
  37. /* Remember pending_stack_adjust/stack_pointer_delta.
  38. To be used around code that may call do_pending_stack_adjust (),
  39. but the generated code could be discarded e.g. using delete_insns_since. */
  40. extern void save_pending_stack_adjust (saved_pending_stack_adjust *);
  41. /* Restore the saved pending_stack_adjust/stack_pointer_delta. */
  42. extern void restore_pending_stack_adjust (saved_pending_stack_adjust *);
  43. extern bool split_comparison (enum rtx_code, machine_mode,
  44. enum rtx_code *, enum rtx_code *);
  45. /* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */
  46. extern void jumpif (tree exp, rtx_code_label *label, profile_probability prob);
  47. extern void jumpif_1 (enum tree_code, tree, tree, rtx_code_label *,
  48. profile_probability);
  49. /* Generate code to evaluate EXP and jump to LABEL if the value is zero. */
  50. extern void jumpifnot (tree exp, rtx_code_label *label,
  51. profile_probability prob);
  52. extern void jumpifnot_1 (enum tree_code, tree, tree, rtx_code_label *,
  53. profile_probability);
  54. extern void do_compare_rtx_and_jump (rtx, rtx, enum rtx_code, int,
  55. machine_mode, rtx, rtx_code_label *,
  56. rtx_code_label *, profile_probability);
  57. #endif /* GCC_DOJUMP_H */