summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-validator.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-validator.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-validator.cpp')
-rw-r--r--src/wasm/wasm-validator.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index 9b1220371..f2d6c259b 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -274,7 +274,7 @@ public:
void visitSIMDExtract(SIMDExtract* curr);
void visitSIMDReplace(SIMDReplace* curr);
void visitSIMDShuffle(SIMDShuffle* curr);
- void visitSIMDBitselect(SIMDBitselect* curr);
+ void visitSIMDTernary(SIMDTernary* curr);
void visitSIMDShift(SIMDShift* curr);
void visitMemoryInit(MemoryInit* curr);
void visitDataDrop(DataDrop* curr);
@@ -1030,17 +1030,17 @@ void FunctionValidator::visitSIMDShuffle(SIMDShuffle* curr) {
}
}
-void FunctionValidator::visitSIMDBitselect(SIMDBitselect* curr) {
+void FunctionValidator::visitSIMDTernary(SIMDTernary* curr) {
shouldBeTrue(
getModule()->features.hasSIMD(), curr, "SIMD operation (SIMD is disabled)");
shouldBeEqualOrFirstIsUnreachable(
- curr->type, v128, curr, "v128.bitselect must have type v128");
+ curr->type, v128, curr, "SIMD ternary must have type v128");
shouldBeEqualOrFirstIsUnreachable(
- curr->left->type, v128, curr, "expected operand of type v128");
+ curr->a->type, v128, curr, "expected operand of type v128");
shouldBeEqualOrFirstIsUnreachable(
- curr->right->type, v128, curr, "expected operand of type v128");
+ curr->b->type, v128, curr, "expected operand of type v128");
shouldBeEqualOrFirstIsUnreachable(
- curr->cond->type, v128, curr, "expected operand of type v128");
+ curr->c->type, v128, curr, "expected operand of type v128");
}
void FunctionValidator::visitSIMDShift(SIMDShift* curr) {