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