(memory, offset, index, val, timeout)
| 42 | } |
| 43 | |
| 44 | function WasmI32AtomicWait(memory, offset, index, val, timeout) { |
| 45 | let builder = new WasmModuleBuilder(); |
| 46 | let pages = memory.buffer.byteLength / kPageSize; |
| 47 | builder.addImportedMemory("m", "memory", pages, pages, "shared", "memory64"); |
| 48 | builder.addFunction("main", |
| 49 | makeSig([kWasmF64, kWasmI32, kWasmF64], [kWasmI32])) |
| 50 | .addBody([ |
| 51 | kExprLocalGet, 0, |
| 52 | kExprI64SConvertF64, |
| 53 | kExprLocalGet, 1, |
| 54 | kExprLocalGet, 2, |
| 55 | kExprI64SConvertF64, |
| 56 | kAtomicPrefix, |
| 57 | kExprI32AtomicWait, /* alignment */ 2, ...wasmSignedLeb64(offset, 10)]) |
| 58 | .exportAs("main"); |
| 59 | |
| 60 | let module = new WebAssembly.Module(builder.toBuffer()); |
| 61 | let instance = new WebAssembly.Instance(module, {m: {memory}}); |
| 62 | return instance.exports.main(index, val, timeout); |
| 63 | } |
| 64 | |
| 65 | function WasmI64AtomicWait(memory, offset, index, val_low, |
| 66 | val_high, timeout) { |
no test coverage detected