| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/arch/arm/lib/csumpartialcopygeneric.S |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 1995-2001 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 <asm/assembler.h> |
|---|
| 11 | 8 | |
|---|
| .. | .. |
|---|
| 89 | 86 | |
|---|
| 90 | 87 | FN_ENTRY |
|---|
| 91 | 88 | save_regs |
|---|
| 89 | + mov sum, #-1 |
|---|
| 92 | 90 | |
|---|
| 93 | 91 | cmp len, #8 @ Ensure that we have at least |
|---|
| 94 | 92 | blo .Lless8 @ 8 bytes to copy. |
|---|
| .. | .. |
|---|
| 148 | 146 | strb r5, [dst], #1 |
|---|
| 149 | 147 | mov r5, r4, get_byte_2 |
|---|
| 150 | 148 | .Lexit: tst len, #1 |
|---|
| 151 | | - strneb r5, [dst], #1 |
|---|
| 149 | + strbne r5, [dst], #1 |
|---|
| 152 | 150 | andne r5, r5, #255 |
|---|
| 153 | | - adcnes sum, sum, r5, put_byte_0 |
|---|
| 151 | + adcsne sum, sum, r5, put_byte_0 |
|---|
| 154 | 152 | |
|---|
| 155 | 153 | /* |
|---|
| 156 | 154 | * If the dst pointer was not 16-bit aligned, we |
|---|