1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * String handling functions for PowerPC.
5 * Copyright (C) 1996 Paul Mackerras.
7 #include <asm/processor.h>
9 #include <asm/ppc_asm.h>
10 #include <asm/export.h>
11 #include <asm/kasan.h>
27 EXPORT_SYMBOL(__memset16)
28 EXPORT_SYMBOL(__memset32)
29 EXPORT_SYMBOL(__memset64)
35 andi. r0,r0,7 /* # bytes to be 8-byte aligned */
37 cmplw cr1,r5,r0 /* do we get that far? */
39 .Lms: PPC_MTOCRF(1,r0)
42 beq 3f /* if already 8-byte aligned */
98 EXPORT_SYMBOL_KASAN(memset)
100 _GLOBAL_TOC_KASAN(memmove)
105 _GLOBAL(backwards_memcpy)
106 rlwinm. r7,r5,32-3,3,31 /* r0 = r5 >> 3 */
137 rlwinm. r7,r5,32-3,3,31
141 EXPORT_SYMBOL(memmove)
142 EXPORT_SYMBOL_KASAN(memmove)