diff options
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r-- | src/wasm/wasm-validator.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 242e07c43..7de69a1ff 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -2989,6 +2989,11 @@ void FunctionValidator::visitStructGet(StructGet* curr) { shouldBeTrue(getModule()->features.hasGC(), curr, "struct.get requires gc [--enable-gc]"); + shouldBeTrue(curr->order == MemoryOrder::Unordered || + getModule()->features.hasSharedEverything(), + curr, + "struct.atomic.get requires shared-everything " + "[--enable-shared-everything]"); if (curr->type == Type::unreachable || curr->ref->type.isNull()) { return; } @@ -3016,6 +3021,11 @@ void FunctionValidator::visitStructSet(StructSet* curr) { shouldBeTrue(getModule()->features.hasGC(), curr, "struct.set requires gc [--enable-gc]"); + shouldBeTrue(curr->order == MemoryOrder::Unordered || + getModule()->features.hasSharedEverything(), + curr, + "struct.atomic.set requires shared-everything " + "[--enable-shared-everything]"); if (curr->ref->type == Type::unreachable) { return; } |