eal/arm: use vector memcpy only when NEON is enabled
The GCC can be configured to avoid using NEON extensions. For that purpose, we provide just the memcpy implementation of the rte_memcpy. Based on the patch by David Hunt and Armuta Zende: lib: added support for armv7 architecture Signed-off-by: Jan Viktorin <viktorin@rehivetech.com> Signed-off-by: Amruta Zende <amruta.zende@intel.com> Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: David Marchand <david.marchand@6wind.com>
This commit is contained in:
parent
04a2fde35d
commit
d8581077d8
@ -35,8 +35,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
/* ARM NEON Intrinsics are used to copy data */
|
||||
#include <arm_neon.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -44,6 +42,11 @@ extern "C" {
|
||||
|
||||
#include "generic/rte_memcpy.h"
|
||||
|
||||
#ifdef __ARM_NEON_FP
|
||||
|
||||
/* ARM NEON Intrinsics are used to copy data */
|
||||
#include <arm_neon.h>
|
||||
|
||||
static inline void
|
||||
rte_mov16(uint8_t *dst, const uint8_t *src)
|
||||
{
|
||||
@ -272,6 +275,58 @@ rte_memcpy_func(void *dst, const void *src, size_t n)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline void
|
||||
rte_mov16(uint8_t *dst, const uint8_t *src)
|
||||
{
|
||||
memcpy(dst, src, 16);
|
||||
}
|
||||
|
||||
static inline void
|
||||
rte_mov32(uint8_t *dst, const uint8_t *src)
|
||||
{
|
||||
memcpy(dst, src, 32);
|
||||
}
|
||||
|
||||
static inline void
|
||||
rte_mov48(uint8_t *dst, const uint8_t *src)
|
||||
{
|
||||
memcpy(dst, src, 48);
|
||||
}
|
||||
|
||||
static inline void
|
||||
rte_mov64(uint8_t *dst, const uint8_t *src)
|
||||
{
|
||||
memcpy(dst, src, 64);
|
||||
}
|
||||
|
||||
static inline void
|
||||
rte_mov128(uint8_t *dst, const uint8_t *src)
|
||||
{
|
||||
memcpy(dst, src, 128);
|
||||
}
|
||||
|
||||
static inline void
|
||||
rte_mov256(uint8_t *dst, const uint8_t *src)
|
||||
{
|
||||
memcpy(dst, src, 256);
|
||||
}
|
||||
|
||||
static inline void *
|
||||
rte_memcpy(void *dst, const void *src, size_t n)
|
||||
{
|
||||
return memcpy(dst, src, n);
|
||||
}
|
||||
|
||||
static inline void *
|
||||
rte_memcpy_func(void *dst, const void *src, size_t n)
|
||||
{
|
||||
return memcpy(dst, src, n);
|
||||
}
|
||||
|
||||
#endif /* __ARM_NEON_FP */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user