.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2013 ARM Ltd. |
---|
3 | 4 | * Copyright (C) 2013 Linaro. |
---|
4 | 5 | * |
---|
5 | 6 | * 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 |
---|
7 | 7 | * be found @ |
---|
8 | 8 | * |
---|
9 | 9 | * http://bazaar.launchpad.net/~linaro-toolchain-dev/cortex-strings/trunk/ |
---|
10 | 10 | * files/head:/src/aarch64/ |
---|
11 | | - * |
---|
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. |
---|
15 | | - * |
---|
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. |
---|
20 | | - * |
---|
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/>. |
---|
23 | 11 | */ |
---|
24 | 12 | |
---|
25 | 13 | #include <linux/linkage.h> |
---|
.. | .. |
---|
60 | 48 | zeroones .req x10 |
---|
61 | 49 | pos .req x11 |
---|
62 | 50 | |
---|
63 | | -WEAK(strcmp) |
---|
| 51 | +SYM_FUNC_START_WEAK_PI(strcmp) |
---|
64 | 52 | eor tmp1, src1, src2 |
---|
65 | 53 | mov zeroones, #REP8_01 |
---|
66 | 54 | tst tmp1, #7 |
---|
.. | .. |
---|
198 | 186 | * as carry-propagation can corrupt the upper bits if the trailing |
---|
199 | 187 | * bytes in the string contain 0x01. |
---|
200 | 188 | * However, if there is no NUL byte in the dword, we can generate |
---|
201 | | - * the result directly. We ca not just subtract the bytes as the |
---|
| 189 | + * the result directly. We cannot just subtract the bytes as the |
---|
202 | 190 | * MSB might be significant. |
---|
203 | 191 | */ |
---|
204 | 192 | CPU_BE( cbnz has_nul, 1f ) |
---|
.. | .. |
---|
231 | 219 | lsr data1, data1, #56 |
---|
232 | 220 | sub result, data1, data2, lsr #56 |
---|
233 | 221 | ret |
---|
234 | | -ENDPIPROC(strcmp) |
---|
| 222 | +SYM_FUNC_END_PI(strcmp) |
---|
| 223 | +EXPORT_SYMBOL_NOKASAN(strcmp) |
---|