diff options
Diffstat (limited to 'test/example/c-api-kitchen-sink.c')
-rw-r--r-- | test/example/c-api-kitchen-sink.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index 3d9d42fa1..77349529b 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -520,6 +520,16 @@ void test_core() { module, makeInt32(module, 2449), callOperands4b, 4, "iiIfF"), // Exception handling BinaryenTry(module, tryBody, catchBody), + // Atomics + BinaryenAtomicStore(module, 4, 0, temp6, + BinaryenAtomicLoad(module, 4, 0, BinaryenTypeInt32(), temp6), + BinaryenTypeInt32() + ), + BinaryenDrop(module, + BinaryenAtomicWait(module, temp6, temp6, temp16, BinaryenTypeInt32()) + ), + BinaryenDrop(module, BinaryenAtomicNotify(module, temp6, temp6)), + BinaryenAtomicFence(module), // TODO: Host BinaryenNop(module), @@ -565,7 +575,7 @@ void test_core() { int8_t segmentPassive[] = { 0, 1 }; BinaryenExpressionRef segmentOffsets[] = { BinaryenConst(module, BinaryenLiteralInt32(10)), NULL }; BinaryenIndex segmentSizes[] = { 12, 12 }; - BinaryenSetMemory(module, 1, 256, "mem", segments, segmentPassive, segmentOffsets, segmentSizes, 2, 0); + BinaryenSetMemory(module, 1, 256, "mem", segments, segmentPassive, segmentOffsets, segmentSizes, 2, 1); // Start function. One per module |