DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] eal/armv7: emulate vaddvq u16 variant
@ 2017-07-07 16:26 Jerin Jacob
  2017-07-08 17:08 ` Thomas Monjalon
  2017-07-10  3:34 ` Jianbo Liu
  0 siblings, 2 replies; 7+ messages in thread
From: Jerin Jacob @ 2017-07-07 16:26 UTC (permalink / raw)
  To: dev; +Cc: thomas, jianbo.liu, viktorin, Jerin Jacob

vaddvq_u16() is not available for armv7.
Emulate the vaddvq_u16() using armv7 NEON intrinsics.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 lib/librte_eal/common/include/arch/arm/rte_vect.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/librte_eal/common/include/arch/arm/rte_vect.h b/lib/librte_eal/common/include/arch/arm/rte_vect.h
index 0670ca2ee..69fd428f3 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_vect.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h
@@ -77,6 +77,17 @@ vqtbl1q_u8(uint8x16_t a, uint8x16_t b)
 
 	return vld1q_u8(rte_ret.u8);
 }
+
+static inline uint16_t
+vaddvq_u16(uint16x8_t a)
+{
+	uint32x4_t m = vpaddlq_u16(a);
+	uint64x2_t n = vpaddlq_u32(m);
+	uint64x1_t o = vget_low_u64(n) + vget_high_u64(n);
+
+	return vget_lane_u32((uint32x2_t)o, 0);
+}
+
 #endif
 
 #if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION < 70000)
-- 
2.13.2

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-07-10  7:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-07 16:26 [dpdk-dev] [PATCH] eal/armv7: emulate vaddvq u16 variant Jerin Jacob
2017-07-08 17:08 ` Thomas Monjalon
2017-07-10  3:51   ` Jianbo Liu
2017-07-10  7:28     ` Thomas Monjalon
2017-07-10  7:32       ` Thomas Monjalon
2017-07-10  3:34 ` Jianbo Liu
2017-07-10  7:35   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).