1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (C) 2023 Rivos Inc. */
4 #include <linux/linkage.h>
9 /* void __riscv_copy_words_unaligned(void *, const void *, size_t) */
10 /* Performs a memcpy without aligning buffers, using word loads and stores. */
11 /* Note: The size is truncated to a multiple of 8 * SZREG */
12 SYM_FUNC_START(__riscv_copy_words_unaligned)
13 andi a4, a2, ~((8*SZREG)-1)
39 SYM_FUNC_END(__riscv_copy_words_unaligned)
41 /* void __riscv_copy_bytes_unaligned(void *, const void *, size_t) */
42 /* Performs a memcpy without aligning buffers, using only byte accesses. */
43 /* Note: The size is truncated to a multiple of 8 */
44 SYM_FUNC_START(__riscv_copy_bytes_unaligned)
71 SYM_FUNC_END(__riscv_copy_bytes_unaligned)