diff options
author | Damjan Marion <damarion@cisco.com> | 2018-02-20 12:34:40 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2018-02-20 21:11:06 +0000 |
commit | 6525c7f9022fbed15c519872833097eb8607118b (patch) | |
tree | c9b1632a16ae1f724d48b1a5bdb2aefab8634e9d /src/vppinfra/vector_altivec.h | |
parent | ad099335c1c2de17fb0b3b29b008ef8623ee93c0 (diff) |
vppinfra: autogerate vector typedefs and basic inline functions
Change-Id: Ie9f611fa6a962b0937245f5cc949571ba11c5604
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/vector_altivec.h')
-rw-r--r-- | src/vppinfra/vector_altivec.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/vppinfra/vector_altivec.h b/src/vppinfra/vector_altivec.h index 0e9de820ed8..c9f7facca30 100644 --- a/src/vppinfra/vector_altivec.h +++ b/src/vppinfra/vector_altivec.h @@ -38,26 +38,6 @@ #ifndef included_vector_altivec_h #define included_vector_altivec_h -/* Splats. */ -#define _(t,n,ti,fi,tr,fr) \ - always_inline t##x##n t##x##n##_splat (t v) \ - { return (t##x##n) __builtin_altivec_##fi ((ti) v); } \ - \ - always_inline t##x##n t##x##n##_splat_word (t##x##n x, int word_index) \ - { return (t##x##n) __builtin_altivec_##fr ((tr) x, word_index); } - -#define u16x8_splat(i) ((u16x8) __builtin_altivec_vspltish (i)) -#define i16x8_splat(i) ((i16x8) __builtin_altivec_vspltish (i)) -#define u32x4_splat(i) ((u32x4) __builtin_altivec_vspltisw (i)) -#define i32x4_splat(i) ((i32x4) __builtin_altivec_vspltisw (i)) - -#define u16x8_splat_word(x,i) ((u16x8) __builtin_altivec_vsplth ((i16x8) (x), (i))) -#define i16x8_splat_word(x,i) ((i16x8) __builtin_altivec_vsplth ((i16x8) (x), (i))) -#define u32x4_splat_word(x,i) ((u32x4) __builtin_altivec_vspltw ((i32x4) (x), (i))) -#define i32x4_splat_word(x,i) ((i32x4) __builtin_altivec_vspltw ((i32x4) (x), (i))) - -#undef _ - /* 128 bit shifts. */ #define _(t,ti,lr,f) \ always_inline t t##_##lr (t x, t y) \ @@ -149,13 +129,6 @@ _signed_binop (32, 4, is_equal, vcmpequw) return u16x8_is_equal (x, zero); } -always_inline u32x4 -u32x4_is_zero (u32x4 x) -{ - u32x4 zero = { 0 }; - return u32x4_is_equal (x, zero); -} - always_inline u32 u32x4_zero_byte_mask (u32x4 x) { |