2 * Copyright (C) 2013 ARM Ltd.
3 * Copyright (C) 2013 Linaro.
5 * This code is based on glibc cortex strings work originally authored by Linaro
6 * and re-licensed under GPLv2 for the Linux kernel. The original code can
9 * http://bazaar.launchpad.net/~linaro-toolchain-dev/cortex-strings/trunk/
10 * files/head:/src/aarch64/
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #include <linux/linkage.h>
26 #include <asm/assembler.h>
27 #include <asm/cache.h>
30 * Copy a buffer from src to dest (alignment handled by the hardware)
39 .macro ldrb1 ptr, regB, val
40 ldrb \ptr, [\regB], \val
43 .macro strb1 ptr, regB, val
44 strb \ptr, [\regB], \val
47 .macro ldrh1 ptr, regB, val
48 ldrh \ptr, [\regB], \val
51 .macro strh1 ptr, regB, val
52 strh \ptr, [\regB], \val
55 .macro ldr1 ptr, regB, val
56 ldr \ptr, [\regB], \val
59 .macro str1 ptr, regB, val
60 str \ptr, [\regB], \val
63 .macro ldp1 ptr, regB, regC, val
64 ldp \ptr, \regB, [\regC], \val
67 .macro stp1 ptr, regB, regC, val
68 stp \ptr, \regB, [\regC], \val
74 #include "copy_template.S"