(wasmExpression, alignment, offset)
| 77 | } |
| 78 | |
| 79 | function GetAtomicLoadFunction(wasmExpression, alignment, offset) { |
| 80 | let builder = new WasmModuleBuilder(); |
| 81 | builder.addImportedMemory("m", "imported_mem", 0, maxSize, "shared"); |
| 82 | builder.addFunction("main", kSig_i_i) |
| 83 | .addBody([ |
| 84 | kExprLocalGet, 0, |
| 85 | kAtomicPrefix, |
| 86 | wasmExpression, alignment, offset]) |
| 87 | .exportAs("main"); |
| 88 | |
| 89 | // Instantiate module, get function exports |
| 90 | let module = new WebAssembly.Module(builder.toBuffer()); |
| 91 | let instance = new WebAssembly.Instance(module, |
| 92 | {m: {imported_mem: memory}}); |
| 93 | return instance.exports.main; |
| 94 | } |
| 95 | |
| 96 | function GetAtomicStoreFunction(wasmExpression, alignment, offset) { |
| 97 | let builder = new WasmModuleBuilder(); |
no test coverage detected