From 0faa68b9dfbe478c6d238a5c55ac61b54a86a3c3 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Tue, 3 Sep 2019 14:13:29 -0700 Subject: 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. --- src/passes/Print.cpp | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'src/passes/Print.cpp') diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index b1e1240ae..ad4d20bae 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -330,9 +330,25 @@ struct PrintExpressionContents o << " " << std::to_string(mask_index); } } - void visitSIMDBitselect(SIMDBitselect* curr) { + void visitSIMDTernary(SIMDTernary* curr) { prepareColor(o); - o << "v128.bitselect"; + switch (curr->op) { + case Bitselect: + o << "v128.bitselect"; + break; + case QFMAF32x4: + o << "f32x4.qfma"; + break; + case QFMSF32x4: + o << "f32x4.qfms"; + break; + case QFMAF64x2: + o << "f64x2.qfma"; + break; + case QFMSF64x2: + o << "f64x2.qfms"; + break; + } } void visitSIMDShift(SIMDShift* curr) { prepareColor(o); @@ -1534,13 +1550,13 @@ struct PrintSExpression : public OverriddenVisitor { printFullLine(curr->right); decIndent(); } - void visitSIMDBitselect(SIMDBitselect* curr) { + void visitSIMDTernary(SIMDTernary* curr) { o << '('; PrintExpressionContents(currFunction, o).visit(curr); incIndent(); - printFullLine(curr->left); - printFullLine(curr->right); - printFullLine(curr->cond); + printFullLine(curr->a); + printFullLine(curr->b); + printFullLine(curr->c); decIndent(); } void visitSIMDShift(SIMDShift* curr) { -- cgit v1.2.3