diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2020-10-27 08:58:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-27 08:58:36 -0700 |
commit | ca16f7cdc57549333474d7042128d2007bc35fad (patch) | |
tree | c42bffa8027099b9d4f5cb6c2283571bd06950c5 /src/wasm/literal.cpp | |
parent | 91ac3be4364e6f9763d6ccff35c83fab0692ef5c (diff) | |
download | binaryen-ca16f7cdc57549333474d7042128d2007bc35fad.tar.gz binaryen-ca16f7cdc57549333474d7042128d2007bc35fad.tar.bz2 binaryen-ca16f7cdc57549333474d7042128d2007bc35fad.zip |
Implement i8x16.popcnt (#3286)
As proposed in https://github.com/WebAssembly/simd/pull/379. Since this
instruction is still being evaluated for inclusion in the SIMD proposal, this PR
does not add support for it to the C/JS APIs or to the fuzzer. This PR also
performs a drive-by fix for unrelated instructions in c-api-kitchen-sink.c
Diffstat (limited to 'src/wasm/literal.cpp')
-rw-r--r-- | src/wasm/literal.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wasm/literal.cpp b/src/wasm/literal.cpp index 360b514c5..f549a9ca6 100644 --- a/src/wasm/literal.cpp +++ b/src/wasm/literal.cpp @@ -1653,6 +1653,9 @@ Literal Literal::absI32x4() const { Literal Literal::negI8x16() const { return unary<16, &Literal::getLanesUI8x16, &Literal::neg>(*this); } +Literal Literal::popcntI8x16() const { + return unary<16, &Literal::getLanesUI8x16, &Literal::popCount>(*this); +} Literal Literal::negI16x8() const { return unary<8, &Literal::getLanesUI16x8, &Literal::neg>(*this); } |