The hardware instructions based vector implementation will come in a future patch. This dummy implementation can also work.
Signed-off-by: Min Zhou <zhou...@loongson.cn> --- app/test/test_xmmt_ops.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/test/test_xmmt_ops.h b/app/test/test_xmmt_ops.h index 3a82d5ecac..7b2c3c37dd 100644 --- a/app/test/test_xmmt_ops.h +++ b/app/test/test_xmmt_ops.h @@ -49,6 +49,23 @@ vect_set_epi32(int i3, int i2, int i1, int i0) return data; } +#elif defined(RTE_ARCH_LOONGARCH) +/* loads the xmm_t value from address p(does not need to be 16-byte aligned)*/ +static __rte_always_inline xmm_t +vect_loadu_sil128(void *p) +{ + xmm_t data; + data = *(const xmm_t *)p; + return data; +} + +/* 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){.u32 = {i0, i1, i2, i3} }; + return data; +} #endif #endif /* _TEST_XMMT_OPS_H_ */ -- 2.31.1