summaryrefslogtreecommitdiff
path: root/src/wasm/wasm.cpp
diff options
context:
space:
mode:
authorBrendan Dahl <brendan.dahl@gmail.com>2024-09-26 15:35:47 -0700
committerGitHub <noreply@github.com>2024-09-26 15:35:47 -0700
commitc3a71ff46d8f38e29896c321d89b6d0c3b90fbc1 (patch)
tree04c4751da10f8e548e0ff94945d2635939b34f58 /src/wasm/wasm.cpp
parent3856a2dc909b3c713497ef311fe4051078ee74b9 (diff)
downloadbinaryen-c3a71ff46d8f38e29896c321d89b6d0c3b90fbc1.tar.gz
binaryen-c3a71ff46d8f38e29896c321d89b6d0c3b90fbc1.tar.bz2
binaryen-c3a71ff46d8f38e29896c321d89b6d0c3b90fbc1.zip
[FP16] Implement conversion operations. (#6974)
Note: FP16 is a little different from F32/F64 since it can't represent the full 2^16 integer range. 65504 is the max whole integer. This leads to some slightly strange behavior when converting integers greater than 65504 since they become infinity. Specified at https://github.com/WebAssembly/half-precision/blob/main/proposals/half-precision/Overview.md
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r--src/wasm/wasm.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index 87ae6ac5a..84fd9a06f 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -703,6 +703,10 @@ void Unary::finalize() {
case RelaxedTruncUVecF32x4ToVecI32x4:
case RelaxedTruncZeroSVecF64x2ToVecI32x4:
case RelaxedTruncZeroUVecF64x2ToVecI32x4:
+ case TruncSatSVecF16x8ToVecI16x8:
+ case TruncSatUVecF16x8ToVecI16x8:
+ case ConvertSVecI16x8ToVecF16x8:
+ case ConvertUVecI16x8ToVecF16x8:
type = Type::v128;
break;
case AnyTrueVec128: