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
Notes: sideshowbarker 2024-07-16 17:12:03 +09:00
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;