aot_emit_control.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #ifndef _AOT_EMIT_CONTROL_H_
  6. #define _AOT_EMIT_CONTROL_H_
  7. #include "aot_compiler.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. bool
  12. aot_compile_op_block(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
  13. uint8 **p_frame_ip, uint8 *frame_ip_end, uint32 label_type,
  14. uint32 param_count, uint8 *param_types,
  15. uint32 result_count, uint8 *result_types);
  16. bool
  17. aot_compile_op_else(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
  18. uint8 **p_frame_ip);
  19. bool
  20. aot_compile_op_end(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
  21. uint8 **p_frame_ip);
  22. bool
  23. aot_compile_op_br(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
  24. uint32 br_depth, uint8 **p_frame_ip);
  25. bool
  26. aot_compile_op_br_if(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
  27. uint32 br_depth, uint8 **p_frame_ip);
  28. bool
  29. aot_compile_op_br_table(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
  30. uint32 *br_depths, uint32 br_count, uint8 **p_frame_ip);
  31. bool
  32. aot_compile_op_return(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
  33. uint8 **p_frame_ip);
  34. bool
  35. aot_compile_op_unreachable(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
  36. uint8 **p_frame_ip);
  37. bool
  38. aot_handle_next_reachable_block(AOTCompContext *comp_ctx,
  39. AOTFuncContext *func_ctx, uint8 **p_frame_ip);
  40. #if WASM_ENABLE_THREAD_MGR != 0
  41. bool
  42. check_suspend_flags(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx);
  43. #endif
  44. #ifdef __cplusplus
  45. } /* end of extern "C" */
  46. #endif
  47. #endif /* end of _AOT_EMIT_CONTROL_H_ */