[v4,5/8] arch/arm: add vcopyq_laneq_u32 for old version of gcc

Message ID 1494819296-23049-6-git-send-email-jianbo.liu@linaro.org
State New
Headers show
Series
  • accelerate examples/l3fwd with NEON on ARM64 platform
Related show

Commit Message

Jianbo Liu May 15, 2017, 3:34 a.m.
Implement vcopyq_laneq_u32 if gcc version is lower than 7.

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>

---
 lib/librte_eal/common/include/arch/arm/rte_vect.h | 9 +++++++++
 1 file changed, 9 insertions(+)

-- 
1.8.3.1

Comments

Jerin Jacob May 15, 2017, 4:01 a.m. | #1
-----Original Message-----
> Date: Mon, 15 May 2017 11:34:53 +0800

> From: Jianbo Liu <jianbo.liu@linaro.org>

> To: dev@dpdk.org, tomasz.kantecki@intel.com,

>  jerin.jacob@caviumnetworks.com, ashwin.sekhar@caviumnetworks.com

> CC: Jianbo Liu <jianbo.liu@linaro.org>

> Subject: [PATCH v4 5/8] arch/arm: add vcopyq_laneq_u32 for old version of

>  gcc

> X-Mailer: git-send-email 1.8.3.1

> 

> Implement vcopyq_laneq_u32 if gcc version is lower than 7.

> 

> Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>


Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>


> ---

>  lib/librte_eal/common/include/arch/arm/rte_vect.h | 9 +++++++++

>  1 file changed, 9 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 4107c99..d9fb4d0 100644

> --- a/lib/librte_eal/common/include/arch/arm/rte_vect.h

> +++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h

> @@ -78,6 +78,15 @@

>  }

>  #endif

>  

> +#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION < 70000)

> +static inline uint32x4_t

> +vcopyq_laneq_u32(uint32x4_t a, const int lane_a,

> +		 uint32x4_t b, const int lane_b)

> +{

> +	return vsetq_lane_u32(vgetq_lane_u32(b, lane_b), a, lane_a);

> +}

> +#endif

> +

>  #ifdef __cplusplus

>  }

>  #endif

> -- 

> 1.8.3.1

>

Patch hide | download patch | download mbox

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 4107c99..d9fb4d0 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_vect.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h
@@ -78,6 +78,15 @@ 
 }
 #endif
 
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION < 70000)
+static inline uint32x4_t
+vcopyq_laneq_u32(uint32x4_t a, const int lane_a,
+		 uint32x4_t b, const int lane_b)
+{
+	return vsetq_lane_u32(vgetq_lane_u32(b, lane_b), a, lane_a);
+}
+#endif
+
 #ifdef __cplusplus
 }
 #endif