summaryrefslogtreecommitdiff
path: root/src/wasm/wasm.cpp
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2021-02-01 16:53:01 -0800
committerGitHub <noreply@github.com>2021-02-01 16:53:01 -0800
commitb5c287567ebcb3cbb1b1acb7f9e717f8b834ea83 (patch)
tree158cb452f58553cc0244d98c45e9d2b2705c1bbd /src/wasm/wasm.cpp
parenta4837c095275b465005841616ff10bcd0b0d7996 (diff)
downloadbinaryen-b5c287567ebcb3cbb1b1acb7f9e717f8b834ea83.tar.gz
binaryen-b5c287567ebcb3cbb1b1acb7f9e717f8b834ea83.tar.bz2
binaryen-b5c287567ebcb3cbb1b1acb7f9e717f8b834ea83.zip
Prototype i32x4.widen_i8x16_{s,u} (#3535)
As proposed in https://github.com/WebAssembly/simd/pull/395. Note that the other instructions in the proposal have not been implemented in LLVM or in V8, so there is no need to implement them in Binaryen right now either. This PR introduces a new expression class for the new instructions because they uniquely take an immediate argument identifying which portion of the input vector to widen.
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r--src/wasm/wasm.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index f8d8890ec..e9d2bf116 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -496,6 +496,11 @@ void SIMDLoadStoreLane::finalize() {
}
}
+void SIMDWiden::finalize() {
+ assert(vec);
+ type = vec->type == Type::unreachable ? Type::unreachable : Type::v128;
+}
+
Index SIMDLoadStoreLane::getMemBytes() {
switch (op) {
case LoadLaneVec8x16: