fix add_sat and sub_sat intrinsics

This commit is contained in:
Laytan Laats
2024-07-16 22:07:49 +02:00
parent 0d881e1561
commit 853487e86c
3 changed files with 84 additions and 10 deletions
+6 -3
View File
@@ -38,9 +38,12 @@ count_leading_zeros :: proc(x: $T) -> T where type_is_integer(T) || type_is_sim
reverse_bits :: proc(x: $T) -> T where type_is_integer(T) || type_is_simd_vector(T) ---
byte_swap :: proc(x: $T) -> T where type_is_integer(T) || type_is_float(T) ---
overflow_add :: proc(lhs, rhs: $T) -> (T, bool) ---
overflow_sub :: proc(lhs, rhs: $T) -> (T, bool) ---
overflow_mul :: proc(lhs, rhs: $T) -> (T, bool) ---
overflow_add :: proc(lhs, rhs: $T) -> (T, bool) where type_is_integer(T) ---
overflow_sub :: proc(lhs, rhs: $T) -> (T, bool) where type_is_integer(T) ---
overflow_mul :: proc(lhs, rhs: $T) -> (T, bool) where type_is_integer(T) ---
add_sat :: proc(lhs, rhs: $T) -> T where type_is_integer(T) ---
sub_sat :: proc(lhs, rhs: $T) -> T where type_is_integer(T) ---
sqrt :: proc(x: $T) -> T where type_is_float(T) || (type_is_simd_vector(T) && type_is_float(type_elem_type(T))) ---