Implement Fast JIT multi-threading feature (#2134)

- Translate all the opcodes of threads spec proposal for Fast JIT
- Add the atomic flag for Fast JIT load/store IRs to support atomic load/store
- Add new atomic related Fast JIT IRs and translate them in the codegen
- Add suspend_flags check in branch opcodes and before/after call function
- Modify CI to enable Fast JIT multi-threading test

Co-authored-by: TianlongLiang <tianlong.liang@intel.com>
This commit is contained in:
Wenyong Huang
2023-04-20 10:09:34 +08:00
committed by GitHub
parent dfca21d239
commit 7e9bf9cdf5
15 changed files with 2290 additions and 168 deletions

View File

@ -108,6 +108,17 @@ typedef enum FloatArithmetic {
FLOAT_MAX,
} FloatArithmetic;
#if WASM_ENABLE_SHARED_MEMORY != 0
typedef enum AtomicRMWBinOp {
AtomicRMWBinOpAdd,
AtomicRMWBinOpSub,
AtomicRMWBinOpAnd,
AtomicRMWBinOpOr,
AtomicRMWBinOpXor,
AtomicRMWBinOpXchg
} AtomicRMWBinOp;
#endif
/**
* Translate instructions in a function. The translated block must
* end with a branch instruction whose targets are offsets relating to