From 5f7d2636e926e0061e4f07dfd5c864d32a7f6144 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Wed, 28 Oct 2020 09:05:03 -0700 Subject: Prototype new SIMD multiplications (#3291) Including saturating, rounding Q15 multiplication as proposed in https://github.com/WebAssembly/simd/pull/365 and extending multiplications as proposed in https://github.com/WebAssembly/simd/pull/376. Since these are just prototypes, skips adding them to the C or JS APIs and the fuzzer, as well as implementing them in the interpreter. --- src/wasm/literal.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'src/wasm/literal.cpp') diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp index f549a9ca6..6d0a0fee7 100644 --- a/src/wasm/literal.cpp +++ b/src/wasm/literal.cpp @@ -2100,6 +2100,9 @@ Literal Literal::maxUI16x8(const Literal& other) const { Literal Literal::avgrUI16x8(const Literal& other) const { return binary<8, &Literal::getLanesUI16x8, &Literal::avgrUInt>(*this, other); } +Literal Literal::q15MulrSatSI16x8(const Literal& other) const { + WASM_UNREACHABLE("TODO: implement Q15 rounding, saturating multiplication"); +} Literal Literal::addI32x4(const Literal& other) const { return binary<4, &Literal::getLanesI32x4, &Literal::add>(*this, other); } @@ -2277,6 +2280,43 @@ Literal Literal::widenHighUToVecI32x4() const { return widen<4, &Literal::getLanesUI16x8, LaneOrder::High>(*this); } +Literal Literal::extMulLowSI16x8(const Literal& other) const { + WASM_UNREACHABLE("TODO: implement SIMD extending multiplications"); +} +Literal Literal::extMulHighSI16x8(const Literal& other) const { + WASM_UNREACHABLE("TODO: implement SIMD extending multiplications"); +} +Literal Literal::extMulLowUI16x8(const Literal& other) const { + WASM_UNREACHABLE("TODO: implement SIMD extending multiplications"); +} +Literal Literal::extMulHighUI16x8(const Literal& other) const { + WASM_UNREACHABLE("TODO: implement SIMD extending multiplications"); +} +Literal Literal::extMulLowSI32x4(const Literal& other) const { + WASM_UNREACHABLE("TODO: implement SIMD extending multiplications"); +} +Literal Literal::extMulHighSI32x4(const Literal& other) const { + WASM_UNREACHABLE("TODO: implement SIMD extending multiplications"); +} +Literal Literal::extMulLowUI32x4(const Literal& other) const { + WASM_UNREACHABLE("TODO: implement SIMD extending multiplications"); +} +Literal Literal::extMulHighUI32x4(const Literal& other) const { + WASM_UNREACHABLE("TODO: implement SIMD extending multiplications"); +} +Literal Literal::extMulLowSI64x2(const Literal& other) const { + WASM_UNREACHABLE("TODO: implement SIMD extending multiplications"); +} +Literal Literal::extMulHighSI64x2(const Literal& other) const { + WASM_UNREACHABLE("TODO: implement SIMD extending multiplications"); +} +Literal Literal::extMulLowUI64x2(const Literal& other) const { + WASM_UNREACHABLE("TODO: implement SIMD extending multiplications"); +} +Literal Literal::extMulHighUI64x2(const Literal& other) const { + WASM_UNREACHABLE("TODO: implement SIMD extending multiplications"); +} + Literal Literal::swizzleVec8x16(const Literal& other) const { auto lanes = getLanesUI8x16(); auto indices = other.getLanesUI8x16(); -- cgit v1.2.3