diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2020-09-25 14:12:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-25 14:12:57 -0700 |
commit | fbdcaf70c6b8888254d409bf57c80ea007058838 (patch) | |
tree | dec0e6c063ae80f110b460c69663dbb160ea0e16 /src | |
parent | 46d2cbab48ebbc8c9aab3f285cc42b2544bb526a (diff) | |
download | binaryen-fbdcaf70c6b8888254d409bf57c80ea007058838.tar.gz binaryen-fbdcaf70c6b8888254d409bf57c80ea007058838.tar.bz2 binaryen-fbdcaf70c6b8888254d409bf57c80ea007058838.zip |
Allow atomics to validate with unshared memory (#3172)
This relaxation has made it to Chrome stable, so it makes sense that we would
allow it in the tools.
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm/wasm-validator.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 2a4c19732..ff2ed7e39 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -931,9 +931,6 @@ void FunctionValidator::visitLoad(Load* curr) { curr, "SIMD operation (SIMD is disabled)"); } - shouldBeFalse(curr->isAtomic && !getModule()->memory.shared, - curr, - "Atomic operation with non-shared memory"); validateMemBytes(curr->bytes, curr->type, curr); validateAlignment(curr->align, curr->type, curr->bytes, curr->isAtomic, curr); shouldBeEqualOrFirstIsUnreachable( @@ -965,9 +962,6 @@ void FunctionValidator::visitStore(Store* curr) { curr, "SIMD operation (SIMD is disabled)"); } - shouldBeFalse(curr->isAtomic && !getModule()->memory.shared, - curr, - "Atomic operation with non-shared memory"); validateMemBytes(curr->bytes, curr->valueType, curr); validateAlignment( curr->align, curr->valueType, curr->bytes, curr->isAtomic, curr); @@ -994,9 +988,6 @@ void FunctionValidator::visitAtomicRMW(AtomicRMW* curr) { shouldBeTrue(getModule()->features.hasAtomics(), curr, "Atomic operation (atomics are disabled)"); - shouldBeFalse(!getModule()->memory.shared, - curr, - "Atomic operation with non-shared memory"); validateMemBytes(curr->bytes, curr->type, curr); shouldBeEqualOrFirstIsUnreachable( curr->ptr->type, @@ -1017,9 +1008,6 @@ void FunctionValidator::visitAtomicCmpxchg(AtomicCmpxchg* curr) { shouldBeTrue(getModule()->features.hasAtomics(), curr, "Atomic operation (atomics are disabled)"); - shouldBeFalse(!getModule()->memory.shared, - curr, - "Atomic operation with non-shared memory"); validateMemBytes(curr->bytes, curr->type, curr); shouldBeEqualOrFirstIsUnreachable( curr->ptr->type, @@ -1053,9 +1041,6 @@ void FunctionValidator::visitAtomicWait(AtomicWait* curr) { shouldBeTrue(getModule()->features.hasAtomics(), curr, "Atomic operation (atomics are disabled)"); - shouldBeFalse(!getModule()->memory.shared, - curr, - "Atomic operation with non-shared memory"); shouldBeEqualOrFirstIsUnreachable( curr->type, Type(Type::i32), curr, "AtomicWait must have type i32"); shouldBeEqualOrFirstIsUnreachable( @@ -1082,9 +1067,6 @@ void FunctionValidator::visitAtomicNotify(AtomicNotify* curr) { shouldBeTrue(getModule()->features.hasAtomics(), curr, "Atomic operation (atomics are disabled)"); - shouldBeFalse(!getModule()->memory.shared, - curr, - "Atomic operation with non-shared memory"); shouldBeEqualOrFirstIsUnreachable( curr->type, Type(Type::i32), curr, "AtomicNotify must have type i32"); shouldBeEqualOrFirstIsUnreachable( @@ -1105,9 +1087,6 @@ void FunctionValidator::visitAtomicFence(AtomicFence* curr) { shouldBeTrue(getModule()->features.hasAtomics(), curr, "Atomic operation (atomics are disabled)"); - shouldBeFalse(!getModule()->memory.shared, - curr, - "Atomic operation with non-shared memory"); shouldBeTrue(curr->order == 0, curr, "Currently only sequentially consistent atomics are supported, " |