summaryrefslogtreecommitdiff
path: root/src/asm2wasm.h
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2017-06-28 12:05:27 -0700
committerGitHub <noreply@github.com>2017-06-28 12:05:27 -0700
commite2c08d42ab0ffc05d980ae2d34fee0e77b201134 (patch)
tree4b70d7469df7fdd4ee70abf42534a2f685da4704 /src/asm2wasm.h
parent14bcc443282146cb85ef2798c36fcb2fe6fa74fa (diff)
downloadbinaryen-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/asm2wasm.h')
-rw-r--r--src/asm2wasm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h
index 90e258c54..4395054f6 100644
--- a/src/asm2wasm.h
+++ b/src/asm2wasm.h
@@ -1772,6 +1772,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) {
assert(views.find(heap) != views.end());
View& view = views[heap];
auto ret = allocator.alloc<Store>();
+ ret->isAtomic = false;
ret->bytes = view.bytes;
ret->offset = 0;
ret->align = view.bytes;
@@ -1843,6 +1844,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) {
assert(views.find(heap) != views.end());
View& view = views[heap];
auto ret = allocator.alloc<Load>();
+ ret->isAtomic = false;
ret->bytes = view.bytes;
ret->signed_ = view.signed_;
ret->offset = 0;