1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2022 Loongson Technology Corporation Limited 3 */ 4 5 #ifndef RTE_MEMCPY_LOONGARCH_H 6 #define RTE_MEMCPY_LOONGARCH_H 7 8 #include <stdint.h> 9 #include <string.h> 10 11 #include "rte_common.h" 12 13 #include "generic/rte_memcpy.h" 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 static inline void 20 rte_mov16(uint8_t *dst, const uint8_t *src) 21 { 22 memcpy(dst, src, 16); 23 } 24 25 static inline void 26 rte_mov32(uint8_t *dst, const uint8_t *src) 27 { 28 memcpy(dst, src, 32); 29 } 30 31 static inline void 32 rte_mov48(uint8_t *dst, const uint8_t *src) 33 { 34 memcpy(dst, src, 48); 35 } 36 37 static inline void 38 rte_mov64(uint8_t *dst, const uint8_t *src) 39 { 40 memcpy(dst, src, 64); 41 } 42 43 static inline void 44 rte_mov128(uint8_t *dst, const uint8_t *src) 45 { 46 memcpy(dst, src, 128); 47 } 48 49 static inline void 50 rte_mov256(uint8_t *dst, const uint8_t *src) 51 { 52 memcpy(dst, src, 256); 53 } 54 55 #define rte_memcpy(d, s, n) memcpy((d), (s), (n)) 56 57 #ifdef __cplusplus 58 } 59 #endif 60 61 #endif /* RTE_MEMCPY_LOONGARCH_H */ 62