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:
parent
5f013e5374
commit
3c176bafee
8 changed files with 356 additions and 11 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue