diff options
Diffstat (limited to 'src/wasm/wasm-stack.cpp')
-rw-r--r-- | src/wasm/wasm-stack.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp index faa06330b..498a53cb2 100644 --- a/src/wasm/wasm-stack.cpp +++ b/src/wasm/wasm-stack.cpp @@ -491,8 +491,25 @@ void BinaryInstWriter::visitSIMDShuffle(SIMDShuffle* curr) { } } -void BinaryInstWriter::visitSIMDBitselect(SIMDBitselect* curr) { - o << int8_t(BinaryConsts::SIMDPrefix) << U32LEB(BinaryConsts::V128Bitselect); +void BinaryInstWriter::visitSIMDTernary(SIMDTernary* curr) { + o << int8_t(BinaryConsts::SIMDPrefix); + switch (curr->op) { + case Bitselect: + o << U32LEB(BinaryConsts::V128Bitselect); + break; + case QFMAF32x4: + o << U32LEB(BinaryConsts::F32x4QFMA); + break; + case QFMSF32x4: + o << U32LEB(BinaryConsts::F32x4QFMS); + break; + case QFMAF64x2: + o << U32LEB(BinaryConsts::F64x2QFMA); + break; + case QFMSF64x2: + o << U32LEB(BinaryConsts::F64x2QFMS); + break; + } } void BinaryInstWriter::visitSIMDShift(SIMDShift* curr) { |