1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:27:45 +00:00

LibWasm: Implement checked truncation instructions

This implements the 8 i<n>.truncate.f<n>_<s> instructions.
This commit is contained in:
Ali Mohammad Pur 2021-05-18 01:19:40 +04:30 committed by Ali Mohammad Pur
parent 59e01e2813
commit a21ebae652
3 changed files with 86 additions and 10 deletions

View file

@ -115,6 +115,8 @@ public:
[&](auto value) {
if constexpr (IsSame<T, decltype(value)>)
result = value;
else if constexpr (!IsFloatingPoint<T> && IsSame<decltype(value), MakeSigned<T>>)
result = value;
},
[&](const FunctionAddress& address) {
if constexpr (IsSame<T, FunctionAddress>)