summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-s-parser.cpp
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2019-09-03 14:13:29 -0700
committerGitHub <noreply@github.com>2019-09-03 14:13:29 -0700
commit0faa68b9dfbe478c6d238a5c55ac61b54a86a3c3 (patch)
tree9ca1c6e09858ebcefb0dc14f60c95293fb6976ef /src/wasm/wasm-s-parser.cpp
parent445881f6c8a28faae22a764c96449be86b48a96b (diff)
downloadbinaryen-0faa68b9dfbe478c6d238a5c55ac61b54a86a3c3.tar.gz
binaryen-0faa68b9dfbe478c6d238a5c55ac61b54a86a3c3.tar.bz2
binaryen-0faa68b9dfbe478c6d238a5c55ac61b54a86a3c3.zip
QFMA/QFMS instructions (#2328)
Renames the SIMDBitselect class to SIMDTernary and adds the new {f32x4,f64x2}.qfm{a,s} ternary instructions. Because the SIMDBitselect class is no more, this is a backwards-incompatible change to the C interface. The new instructions are not yet used in the fuzzer because they are not yet implemented in V8. The corresponding LLVM commit is https://reviews.llvm.org/rL370556.
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r--src/wasm/wasm-s-parser.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp
index 3a1e0db09..322c36c45 100644
--- a/src/wasm/wasm-s-parser.cpp
+++ b/src/wasm/wasm-s-parser.cpp
@@ -1473,11 +1473,13 @@ Expression* SExpressionWasmBuilder::makeSIMDShuffle(Element& s) {
return ret;
}
-Expression* SExpressionWasmBuilder::makeSIMDBitselect(Element& s) {
- auto ret = allocator.alloc<SIMDBitselect>();
- ret->left = parseExpression(s[1]);
- ret->right = parseExpression(s[2]);
- ret->cond = parseExpression(s[3]);
+Expression* SExpressionWasmBuilder::makeSIMDTernary(Element& s,
+ SIMDTernaryOp op) {
+ auto ret = allocator.alloc<SIMDTernary>();
+ ret->op = op;
+ ret->a = parseExpression(s[1]);
+ ret->b = parseExpression(s[2]);
+ ret->c = parseExpression(s[3]);
ret->finalize();
return ret;
}