diff options
author | Derek Schuff <dschuff@chromium.org> | 2017-06-28 12:05:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-28 12:05:27 -0700 |
commit | e2c08d42ab0ffc05d980ae2d34fee0e77b201134 (patch) | |
tree | 4b70d7469df7fdd4ee70abf42534a2f685da4704 /src/wasm.h | |
parent | 14bcc443282146cb85ef2798c36fcb2fe6fa74fa (diff) | |
download | binaryen-e2c08d42ab0ffc05d980ae2d34fee0e77b201134.tar.gz binaryen-e2c08d42ab0ffc05d980ae2d34fee0e77b201134.tar.bz2 binaryen-e2c08d42ab0ffc05d980ae2d34fee0e77b201134.zip |
Add atomic loads and stores (#1077)
Add IR, wast and binary support for atomic loads and stores.
Currently all IR generated by means other than parsing wast and binary files always generates non-atomic accesses, and optimizations have not yet been made aware of atomics, so they are certainly not ready to be used yet.
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wasm.h b/src/wasm.h index 56432faf9..286604848 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -177,6 +177,7 @@ public: HostId, NopId, UnreachableId, + AtomicRMWId, NumExpressionIds }; Id _id; @@ -398,6 +399,7 @@ public: bool signed_; Address offset; Address align; + bool isAtomic; Expression* ptr; // type must be set during creation, cannot be inferred @@ -413,6 +415,7 @@ public: uint8_t bytes; Address offset; Address align; + bool isAtomic; Expression* ptr; Expression* value; WasmType valueType; // the store never returns a value @@ -511,6 +514,13 @@ public: Unreachable(MixedArena& allocator) : Unreachable() {} }; +class AtomicRMW : public SpecificExpression<Expression::AtomicRMWId> { + public: + AtomicRMW() {} + AtomicRMW(MixedArena& allocator) : AtomicRMW() {} + bool finalize(); +}; + // Globals class Function { |