Merge tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux/fpc-iii.git] / arch / arm / lib / csumpartialcopy.S
blob1ca6aadd649cf7cff8b43390893c3d03b020251c
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  *  linux/arch/arm/lib/csumpartialcopy.S
4  *
5  *  Copyright (C) 1995-1998 Russell King
6  */
7 #include <linux/linkage.h>
8 #include <asm/assembler.h>
10                 .text
12 /* Function: __u32 csum_partial_copy_nocheck(const char *src, char *dst, int len)
13  * Params  : r0 = src, r1 = dst, r2 = len
14  * Returns : r0 = new checksum
15  */
17                 .macro  save_regs
18                 stmfd   sp!, {r1, r4 - r8, lr}
19                 .endm
21                 .macro  load_regs
22                 ldmfd   sp!, {r1, r4 - r8, pc}
23                 .endm
25                 .macro  load1b, reg1
26                 ldrb    \reg1, [r0], #1
27                 .endm
29                 .macro  load2b, reg1, reg2
30                 ldrb    \reg1, [r0], #1
31                 ldrb    \reg2, [r0], #1
32                 .endm
34                 .macro  load1l, reg1
35                 ldr     \reg1, [r0], #4
36                 .endm
38                 .macro  load2l, reg1, reg2
39                 ldr     \reg1, [r0], #4
40                 ldr     \reg2, [r0], #4
41                 .endm
43                 .macro  load4l, reg1, reg2, reg3, reg4
44                 ldmia   r0!, {\reg1, \reg2, \reg3, \reg4}
45                 .endm
47 #define FN_ENTRY        ENTRY(csum_partial_copy_nocheck)
48 #define FN_EXIT         ENDPROC(csum_partial_copy_nocheck)
50 #include "csumpartialcopygeneric.S"