diff options
author | Brendan Dahl <brendan.dahl@gmail.com> | 2024-08-21 15:03:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-21 22:03:46 +0000 |
commit | 99db0d9c7c33bcea7b7730bb5684f41176146f83 (patch) | |
tree | 3986c87e5533421be50673710d1acc6edba29dda /src/literal.h | |
parent | 21ddb853559bde490b4f02db576d4b8cd48d3106 (diff) | |
download | binaryen-99db0d9c7c33bcea7b7730bb5684f41176146f83.tar.gz binaryen-99db0d9c7c33bcea7b7730bb5684f41176146f83.tar.bz2 binaryen-99db0d9c7c33bcea7b7730bb5684f41176146f83.zip |
[FP16] Implement arithmetic operations. (#6855)
Specified at
https://github.com/WebAssembly/half-precision/blob/main/proposals/half-precision/Overview.md
Diffstat (limited to 'src/literal.h')
-rw-r--r-- | src/literal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/literal.h b/src/literal.h index dd6247d00..882a99027 100644 --- a/src/literal.h +++ b/src/literal.h @@ -382,6 +382,7 @@ public: Literal convertUIToF32() const; Literal convertSIToF64() const; Literal convertUIToF64() const; + Literal convertF32ToF16() const; Literal truncSatToSI32() const; Literal truncSatToSI64() const; @@ -618,6 +619,14 @@ public: Literal extMulHighSI64x2(const Literal& other) const; Literal extMulLowUI64x2(const Literal& other) const; Literal extMulHighUI64x2(const Literal& other) const; + Literal addF16x8(const Literal& other) const; + Literal subF16x8(const Literal& other) const; + Literal mulF16x8(const Literal& other) const; + Literal divF16x8(const Literal& other) const; + Literal minF16x8(const Literal& other) const; + Literal maxF16x8(const Literal& other) const; + Literal pminF16x8(const Literal& other) const; + Literal pmaxF16x8(const Literal& other) const; Literal absF32x4() const; Literal negF32x4() const; Literal sqrtF32x4() const; |