Add u32x4_extend_to_u64x2 for aarch64 using NEON intrinsics 08/14608/5
authorSirshak Das <[email protected]>
Wed, 22 Aug 2018 06:04:33 +0000 (14:04 +0800)
committerDamjan Marion <[email protected]>
Tue, 11 Sep 2018 08:39:49 +0000 (08:39 +0000)
This is used in vlib_get_buffers_with_offset.

Change-Id: If4ff776bc97d21a22e870300b164eeb6a5ec3638
Signed-off-by: Sirshak Das <[email protected]>
Reviewed-by: Steve Capper <[email protected]>
Reviewed-by: Brian Brooks <[email protected]>
Reviewed-by: Yi He <[email protected]>
Verified-by: Lijian Zhang <[email protected]>
src/vppinfra/vector_neon.h

index adea39a..2c3578c 100644 (file)
@@ -140,6 +140,12 @@ u32x4_hadd (u32x4 v1, u32x4 v2)
   return (u32x4) vpaddq_u32 (v1, v2);
 }
 
+static_always_inline u64x2
+u32x4_extend_to_u64x2 (u32x4 v)
+{
+  return vmovl_u32 (vget_low_u32 (v));
+}
+
 #define CLIB_HAVE_VEC128_UNALIGNED_LOAD_STORE
 #define CLIB_VEC128_SPLAT_DEFINED
 #endif /* included_vector_neon_h */