diff options
Diffstat (limited to 'sysdeps/aarch64/fpu/v_math.h')
-rw-r--r-- | sysdeps/aarch64/fpu/v_math.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/sysdeps/aarch64/fpu/v_math.h b/sysdeps/aarch64/fpu/v_math.h index 43efd8f99d..cfc87f8dd0 100644 --- a/sysdeps/aarch64/fpu/v_math.h +++ b/sysdeps/aarch64/fpu/v_math.h @@ -30,15 +30,15 @@ #define V_NAME_D2(fun) _ZGVnN2vv_##fun /* Shorthand helpers for declaring constants. */ -#define V2(x) \ - { \ - x, x \ - } +#define V2(X) { X, X } +#define V4(X) { X, X, X, X } +#define V8(X) { X, X, X, X, X, X, X, X } -#define V4(x) \ - { \ - x, x, x, x \ - } +static inline int +v_any_u16h (uint16x4_t x) +{ + return vget_lane_u64 (vreinterpret_u64_u16 (x), 0) != 0; +} static inline float32x4_t v_f32 (float x) @@ -63,6 +63,11 @@ v_any_u32 (uint32x4_t x) /* assume elements in x are either 0 or -1u. */ return vpaddd_u64 (vreinterpretq_u64_u32 (x)) != 0; } +static inline int +v_any_u32h (uint32x2_t x) +{ + return vget_lane_u64 (vreinterpret_u64_u32 (x), 0) != 0; +} static inline float32x4_t v_lookup_f32 (const float *tab, uint32x4_t idx) { |