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

LibWasm: Implement a few SIMD instructions

This commit is contained in:
Ali Mohammad Pur 2023-06-12 13:38:22 +03:30 committed by Ali Mohammad Pur
parent 5f013e5374
commit 3c176bafee
8 changed files with 356 additions and 11 deletions

View file

@ -140,10 +140,17 @@ public:
if constexpr (IsSame<T, decltype(value)> || (!IsFloatingPoint<T> && IsSame<decltype(value), MakeSigned<T>>)) {
result = static_cast<T>(value);
} else if constexpr (!IsFloatingPoint<T> && IsConvertible<decltype(value), T>) {
if (AK::is_within_range<T>(value))
result = static_cast<T>(value);
// NOTE: No implicit vector <-> scalar conversion.
if constexpr (!IsSame<T, u128>) {
if (AK::is_within_range<T>(value))
result = static_cast<T>(value);
}
}
},
[&](u128 value) {
if constexpr (IsSame<T, u128>)
result = value;
},
[&](Reference const& value) {
if constexpr (IsSame<T, Reference>) {
result = value;