diff options
Diffstat (limited to 'src/wasm-builder.h')
-rw-r--r-- | src/wasm-builder.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h index df9f1fcaa..4ef4b1e0b 100644 --- a/src/wasm-builder.h +++ b/src/wasm-builder.h @@ -198,6 +198,24 @@ public: load->isAtomic = true; return load; } + AtomicWait* makeAtomicWait(Expression* ptr, Expression* expected, Expression* timeout, WasmType type) { + auto* wait = allocator.alloc<AtomicWait>(); + wait->ptr = ptr; + wait->expected = expected; + wait->timeout = timeout; + wait->expectedType = type; + wait->type = i32; + wait->finalize(); + return wait; + } + AtomicWake* makeAtomicWake(Expression* ptr, Expression* wakeCount) { + auto* wake = allocator.alloc<AtomicWake>(); + wake->ptr = ptr; + wake->wakeCount = wakeCount; + wake->type = i32; + wake->finalize(); + return wake; + } Store* makeStore(unsigned bytes, uint32_t offset, unsigned align, Expression *ptr, Expression *value, WasmType type) { auto* ret = allocator.alloc<Store>(); ret->isAtomic = false; |