mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 01:26:22 +00:00
LibWasm: Implement checked truncation instructions
This implements the 8 i<n>.truncate.f<n>_<s> instructions.
This commit is contained in:
parent
59e01e2813
commit
a21ebae652
Notes:
sideshowbarker
2024-07-18 17:23:08 +09:00
Author: https://github.com/alimpfard
Commit: a21ebae652
Pull-request: https://github.com/SerenityOS/serenity/pull/7395
Reviewed-by: https://github.com/linusg
3 changed files with 86 additions and 10 deletions
|
@ -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>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue