.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/arch/arm/lib/csumpartial.S |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 1995-1998 Russell King |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License version 2 as |
---|
8 | | - * published by the Free Software Foundation. |
---|
9 | 6 | */ |
---|
10 | 7 | #include <linux/linkage.h> |
---|
11 | 8 | #include <asm/assembler.h> |
---|
.. | .. |
---|
40 | 37 | /* we must have at least one byte. */ |
---|
41 | 38 | tst buf, #1 @ odd address? |
---|
42 | 39 | movne sum, sum, ror #8 |
---|
43 | | - ldrneb td0, [buf], #1 |
---|
| 40 | + ldrbne td0, [buf], #1 |
---|
44 | 41 | subne len, len, #1 |
---|
45 | | - adcnes sum, sum, td0, put_byte_1 |
---|
| 42 | + adcsne sum, sum, td0, put_byte_1 |
---|
46 | 43 | |
---|
47 | 44 | .Lless4: tst len, #6 |
---|
48 | 45 | beq .Lless8_byte |
---|
.. | .. |
---|
68 | 65 | bne .Lless8_wordlp |
---|
69 | 66 | |
---|
70 | 67 | .Lless8_byte: tst len, #1 @ odd number of bytes |
---|
71 | | - ldrneb td0, [buf], #1 @ include last byte |
---|
72 | | - adcnes sum, sum, td0, put_byte_0 @ update checksum |
---|
| 68 | + ldrbne td0, [buf], #1 @ include last byte |
---|
| 69 | + adcsne sum, sum, td0, put_byte_0 @ update checksum |
---|
73 | 70 | |
---|
74 | 71 | .Ldone: adc r0, sum, #0 @ collect up the last carry |
---|
75 | 72 | ldr td0, [sp], #4 |
---|
.. | .. |
---|
78 | 75 | ldr pc, [sp], #4 @ return |
---|
79 | 76 | |
---|
80 | 77 | .Lnot_aligned: tst buf, #1 @ odd address |
---|
81 | | - ldrneb td0, [buf], #1 @ make even |
---|
| 78 | + ldrbne td0, [buf], #1 @ make even |
---|
82 | 79 | subne len, len, #1 |
---|
83 | | - adcnes sum, sum, td0, put_byte_1 @ update checksum |
---|
| 80 | + adcsne sum, sum, td0, put_byte_1 @ update checksum |
---|
84 | 81 | |
---|
85 | 82 | tst buf, #2 @ 32-bit aligned? |
---|
86 | 83 | #if __LINUX_ARM_ARCH__ >= 4 |
---|
87 | | - ldrneh td0, [buf], #2 @ make 32-bit aligned |
---|
| 84 | + ldrhne td0, [buf], #2 @ make 32-bit aligned |
---|
88 | 85 | subne len, len, #2 |
---|
89 | 86 | #else |
---|
90 | | - ldrneb td0, [buf], #1 |
---|
91 | | - ldrneb ip, [buf], #1 |
---|
| 87 | + ldrbne td0, [buf], #1 |
---|
| 88 | + ldrbne ip, [buf], #1 |
---|
92 | 89 | subne len, len, #2 |
---|
93 | 90 | #ifndef __ARMEB__ |
---|
94 | 91 | orrne td0, td0, ip, lsl #8 |
---|
.. | .. |
---|
96 | 93 | orrne td0, ip, td0, lsl #8 |
---|
97 | 94 | #endif |
---|
98 | 95 | #endif |
---|
99 | | - adcnes sum, sum, td0 @ update checksum |
---|
| 96 | + adcsne sum, sum, td0 @ update checksum |
---|
100 | 97 | ret lr |
---|
101 | 98 | |
---|
102 | 99 | ENTRY(csum_partial) |
---|