1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2013 ARM Ltd.
4 * Copyright (C) 2013 Linaro.
6 * This code is based on glibc cortex strings work originally authored by Linaro
9 * http://bazaar.launchpad.net/~linaro-toolchain-dev/cortex-strings/trunk/
10 * files/head:/src/aarch64/
13 #include <linux/linkage.h>
14 #include <asm/assembler.h>
15 #include <asm/cache.h>
18 * Copy a buffer from src to dest (alignment handled by the hardware)
27 .macro ldrb1 ptr, regB, val
28 ldrb \ptr, [\regB], \val
31 .macro strb1 ptr, regB, val
32 strb \ptr, [\regB], \val
35 .macro ldrh1 ptr, regB, val
36 ldrh \ptr, [\regB], \val
39 .macro strh1 ptr, regB, val
40 strh \ptr, [\regB], \val
43 .macro ldr1 ptr, regB, val
44 ldr \ptr, [\regB], \val
47 .macro str1 ptr, regB, val
48 str \ptr, [\regB], \val
51 .macro ldp1 ptr, regB, regC, val
52 ldp \ptr, \regB, [\regC], \val
55 .macro stp1 ptr, regB, regC, val
56 stp \ptr, \regB, [\regC], \val
62 #include "copy_template.S"
67 EXPORT_SYMBOL(__memcpy)