summaryrefslogtreecommitdiff
path: root/src/wasm-builder.h
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-builder.h
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-builder.h')
-rw-r--r--src/wasm-builder.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index 3e61b1a36..c2f1e41b6 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -400,12 +400,15 @@ public:
ret->finalize();
return ret;
}
- SIMDBitselect*
- makeSIMDBitselect(Expression* left, Expression* right, Expression* cond) {
- auto* ret = allocator.alloc<SIMDBitselect>();
- ret->left = left;
- ret->right = right;
- ret->cond = cond;
+ SIMDTernary* makeSIMDTernary(SIMDTernaryOp op,
+ Expression* a,
+ Expression* b,
+ Expression* c) {
+ auto* ret = allocator.alloc<SIMDTernary>();
+ ret->op = op;
+ ret->a = a;
+ ret->b = b;
+ ret->c = c;
ret->finalize();
return ret;
}