aot_emit_control.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. bool
  41. check_suspend_flags(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
  42. bool check_terminate_and_suspend);
  43. #if WASM_ENABLE_GC != 0
  44. bool
  45. aot_compile_op_br_on_null(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
  46. uint32 br_depth, uint8 **p_frame_ip);
  47. bool
  48. aot_compile_op_br_on_non_null(AOTCompContext *comp_ctx,
  49. AOTFuncContext *func_ctx, uint32 br_depth,
  50. uint8 **p_frame_ip);
  51. bool
  52. aot_compile_op_br_on_cast(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
  53. int32 heap_type, bool nullable, bool br_on_fail,
  54. uint32 br_depth, uint8 **p_frame_ip);
  55. #endif
  56. #ifdef __cplusplus
  57. } /* end of extern "C" */
  58. #endif
  59. #endif /* end of _AOT_EMIT_CONTROL_H_ */