dojump.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* Export function prototypes from dojump.c.
  2. Copyright (C) 2015-2016 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. int x_pending_stack_adjust;
  33. /* Saved value of stack_pointer_delta. */
  34. int 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. /* Generate code to evaluate EXP and jump to LABEL if the value is zero. */
  43. extern void jumpifnot (tree, rtx, int);
  44. extern void jumpifnot_1 (enum tree_code, tree, tree, rtx, int);
  45. /* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */
  46. extern void jumpif (tree, rtx, int);
  47. extern void jumpif_1 (enum tree_code, tree, tree, rtx, int);
  48. /* Generate code to evaluate EXP and jump to IF_FALSE_LABEL if
  49. the result is zero, or IF_TRUE_LABEL if the result is one. */
  50. extern void do_jump (tree, rtx, rtx, int);
  51. extern void do_jump_1 (enum tree_code, tree, tree, rtx, rtx, int);
  52. extern void do_compare_rtx_and_jump (rtx, rtx, enum rtx_code, int,
  53. machine_mode, rtx, rtx, rtx, int);
  54. extern bool split_comparison (enum rtx_code, machine_mode,
  55. enum rtx_code *, enum rtx_code *);
  56. #endif /* GCC_DOJUMP_H */