a9de470cc7
Since all other apps have been moved to the "app" folder, the autotest app remains alone in the test folder. Rather than having an entire top-level folder for this, we can move it back to where it all started in early versions of DPDK - the "app/" folder. This move has a couple of advantages: * This reduces clutter at the top level of the project, due to one less folder. * It eliminates the separate build task necessary for building the autotests using make "make test-build" which means that developers are less likely to miss something in their own compilation tests * It re-aligns the final location of the test binary in the app folder when building with make with it's location in the source tree. For meson builds, the autotest app is different from the other apps in that it needs a series of different test cases defined for it for use by "meson test". Therefore, it does not get built as part of the main loop in the app folder, but gets built separately at the end. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
55 lines
1.4 KiB
C
55 lines
1.4 KiB
C
/* SPDX-License-Identifier: BSD-3-Clause
|
|
* Copyright(c) 2015 Cavium, Inc
|
|
*/
|
|
|
|
#ifndef _TEST_XMMT_OPS_H_
|
|
#define _TEST_XMMT_OPS_H_
|
|
|
|
#include <rte_vect.h>
|
|
|
|
#if defined(RTE_ARCH_ARM) || defined(RTE_ARCH_ARM64)
|
|
|
|
/* vect_* abstraction implementation using NEON */
|
|
|
|
/* loads the xmm_t value from address p(does not need to be 16-byte aligned)*/
|
|
#define vect_loadu_sil128(p) vld1q_s32((const int32_t *)p)
|
|
|
|
/* sets the 4 signed 32-bit integer values and returns the xmm_t variable */
|
|
static __rte_always_inline xmm_t
|
|
vect_set_epi32(int i3, int i2, int i1, int i0)
|
|
{
|
|
int32_t data[4] = {i0, i1, i2, i3};
|
|
|
|
return vld1q_s32(data);
|
|
}
|
|
|
|
#elif defined(RTE_ARCH_X86)
|
|
|
|
/* vect_* abstraction implementation using SSE */
|
|
|
|
/* loads the xmm_t value from address p(does not need to be 16-byte aligned)*/
|
|
#define vect_loadu_sil128(p) _mm_loadu_si128(p)
|
|
|
|
/* sets the 4 signed 32-bit integer values and returns the xmm_t variable */
|
|
#define vect_set_epi32(i3, i2, i1, i0) _mm_set_epi32(i3, i2, i1, i0)
|
|
|
|
#elif defined(RTE_ARCH_PPC_64)
|
|
|
|
/* vect_* abstraction implementation using ALTIVEC */
|
|
|
|
/* loads the xmm_t value from address p(does not need to be 16-byte aligned)*/
|
|
#define vect_loadu_sil128(p) vec_ld(0, p)
|
|
|
|
/* sets the 4 signed 32-bit integer values and returns the xmm_t variable */
|
|
static __rte_always_inline xmm_t
|
|
vect_set_epi32(int i3, int i2, int i1, int i0)
|
|
{
|
|
xmm_t data = (xmm_t){i0, i1, i2, i3};
|
|
|
|
return data;
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* _TEST_XMMT_OPS_H_ */
|