jit_emit_control.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #ifndef _JIT_EMIT_CONTROL_H_
  6. #define _JIT_EMIT_CONTROL_H_
  7. #include "../jit_compiler.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. bool
  12. jit_compile_op_block(JitCompContext *cc, uint8 **p_frame_ip,
  13. uint8 *frame_ip_end, uint32 label_type, uint32 param_count,
  14. uint8 *param_types, uint32 result_count,
  15. uint8 *result_types, bool merge_cmp_and_if);
  16. bool
  17. jit_compile_op_else(JitCompContext *cc, uint8 **p_frame_ip);
  18. bool
  19. jit_compile_op_end(JitCompContext *cc, uint8 **p_frame_ip);
  20. bool
  21. jit_compile_op_br(JitCompContext *cc, uint32 br_depth, uint8 **p_frame_ip);
  22. bool
  23. jit_compile_op_br_if(JitCompContext *cc, uint32 br_depth,
  24. bool merge_cmp_and_br_if, uint8 **p_frame_ip);
  25. bool
  26. jit_compile_op_br_table(JitCompContext *cc, uint32 *br_depths, uint32 br_count,
  27. uint8 **p_frame_ip);
  28. bool
  29. jit_compile_op_return(JitCompContext *cc, uint8 **p_frame_ip);
  30. bool
  31. jit_compile_op_unreachable(JitCompContext *cc, uint8 **p_frame_ip);
  32. bool
  33. jit_handle_next_reachable_block(JitCompContext *cc, uint8 **p_frame_ip);
  34. #if WASM_ENABLE_THREAD_MGR != 0
  35. bool
  36. jit_check_suspend_flags(JitCompContext *cc);
  37. #endif
  38. #ifdef __cplusplus
  39. } /* end of extern "C" */
  40. #endif
  41. #endif /* end of _JIT_EMIT_CONTROL_H_ */