1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * ARCv2 memcpy implementation optimized for unaligned memory access using.
5 * Copyright (C) 2019 Synopsys
6 * Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
9 #include <linux/linkage.h>
11 #ifdef CONFIG_ARC_HAS_LL64
12 # define LOADX(DST,RX) ldd.ab DST, [RX, 8]
13 # define STOREX(SRC,RX) std.ab SRC, [RX, 8]
17 # define LOADX(DST,RX) ld.ab DST, [RX, 4]
18 # define STOREX(SRC,RX) st.ab SRC, [RX, 4]
24 mov r3, r0 ; don;t clobber ret val
26 lsr.f lp_count, r2, ZOLSHFT
27 lpnz @.Lcopy32_64bytes
39 and.f lp_count, r2, ZOLAND ;Last remaining 31 bytes
40 lpnz @.Lcopyremainingbytes