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

@ -10,7 +10,11 @@
/**
* Operand kinds of instructions.
*/
enum { JIT_OPND_KIND_Reg, JIT_OPND_KIND_VReg, JIT_OPND_KIND_LookupSwitch };
enum {
JIT_OPND_KIND_Reg,
JIT_OPND_KIND_VReg,
JIT_OPND_KIND_LookupSwitch,
};
/**
* Operand kind of each instruction.
@ -45,6 +49,18 @@ static const uint8 insn_opnd_first_use[] = {
jit_calloc(offsetof(JitInsn, _opnd._opnd_VReg._reg) \
+ sizeof(JitReg) * (OPND_NUM))
JitInsn *
_jit_insn_new_Reg_0(JitOpcode opc)
{
JitInsn *insn = JIT_INSN_NEW_Reg(0);
if (insn) {
insn->opcode = opc;
}
return insn;
}
JitInsn *
_jit_insn_new_Reg_1(JitOpcode opc, JitReg r0)
{