From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wes1-so1.wedos.net (wes1-so1.wedos.net [46.28.106.15]) by dpdk.org (Postfix) with ESMTP id A09588D8B for ; Mon, 26 Oct 2015 17:25:10 +0100 (CET) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so1.wedos.net (Postfix) with ESMTPSA id 3nl1jL36q3z4qf; Mon, 26 Oct 2015 17:25:10 +0100 (CET) Date: Mon, 26 Oct 2015 17:23:23 +0100 From: Jan Viktorin To: David Hunt Message-ID: <20151026172323.3f58dc70@pcviktorin.fit.vutbr.cz> In-Reply-To: <1445609833-17649-10-git-send-email-david.hunt@intel.com> References: <1445609833-17649-1-git-send-email-david.hunt@intel.com> <1445609833-17649-10-git-send-email-david.hunt@intel.com> Organization: RehiveTech MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Benjamin Boren Subject: Re: [dpdk-dev] [PATCH 09/11] lib: add armv8 rte_vect.h X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 16:25:10 -0000 On Fri, 23 Oct 2015 15:17:11 +0100 David Hunt wrote: > + > +typedef float32x4_t __m128; > + > +typedef int32x4_t __m128i; > + > +typedef __m128i xmm_t; > + > +#define XMM_SIZE (sizeof(xmm_t)) > +#define XMM_MASK (XMM_SIZE - 1) > + > +typedef union rte_xmm { > + xmm_t x; > + uint8_t u8[XMM_SIZE / sizeof(uint8_t)]; > + uint16_t u16[XMM_SIZE / sizeof(uint16_t)]; > + uint32_t u32[XMM_SIZE / sizeof(uint32_t)]; > + uint64_t u64[XMM_SIZE / sizeof(uint64_t)]; > + double pd[XMM_SIZE / sizeof(double)]; > +} rte_xmm_t __aligned(16); > + > +#define _mm_srli_epi32(a, imm) { (__m128i)vshrq_n_u32((uint32x4_t)a, imm) } > + > +#define _mm_srli_si128(a, imm) { (__m128i)vextq_s8((int8x16_t)a, \ > + vdupq_n_s8(0), (imm)) } > + > +static inline __m128i > +_mm_set_epi32(int i3, int i2, int i1, int i0); > +static inline int > +_mm_cvtsi128_si64(__m128i a); > + > +static inline __m128i > +_mm_set_epi32(int i3, int i2, int i1, int i0) > +{ > + int32_t __aligned(16) data[4] = { i0, i1, i2, i3 }; > + return vld1q_s32(data); > +} > + > +static inline int > +_mm_cvtsi128_si64(__m128i a) > +{ > + return vgetq_lane_s64(a, 0); > +} > + > +static inline __m128i > +_mm_and_si128(__m128i a, __m128i b) > +{ > + return (__m128i)vandq_s32(a, b); > +} > + What is the purpose of those wrappers? I mean, does it help to compile some SSE-dependent libraries in DPDK for NEON? Jan -- Jan Viktorin E-mail: Viktorin@RehiveTech.com System Architect Web: www.RehiveTech.com RehiveTech Brno, Czech Republic