summaryrefslogtreecommitdiff
path: root/src/binaryen-c.cpp
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/binaryen-c.cpp
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/binaryen-c.cpp')
-rw-r--r--src/binaryen-c.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp
index 36b2abbe7..83d0e155f 100644
--- a/src/binaryen-c.cpp
+++ b/src/binaryen-c.cpp
@@ -549,7 +549,7 @@ BinaryenExpressionRef BinaryenLoad(BinaryenModuleRef module, uint32_t bytes, int
auto id = noteExpression(ret);
std::cout << " expressions[" << id << "] = BinaryenLoad(the_module, " << bytes << ", " << int(signed_) << ", " << offset << ", " << align << ", " << type << ", expressions[" << expressions[ptr] << "]);\n";
}
-
+ ret->isAtomic = false;
ret->bytes = bytes;
ret->signed_ = !!signed_;
ret->offset = offset;
@@ -566,7 +566,7 @@ BinaryenExpressionRef BinaryenStore(BinaryenModuleRef module, uint32_t bytes, ui
auto id = noteExpression(ret);
std::cout << " expressions[" << id << "] = BinaryenStore(the_module, " << bytes << ", " << offset << ", " << align << ", expressions[" << expressions[ptr] << "], expressions[" << expressions[value] << "], " << type << ");\n";
}
-
+ ret->isAtomic = false;
ret->bytes = bytes;
ret->offset = offset;
ret->align = align ? align : bytes;