hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/arch/arm64/lib/strcmp.S
....@@ -1,25 +1,13 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) 2013 ARM Ltd.
34 * Copyright (C) 2013 Linaro.
45 *
56 * 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
77 * be found @
88 *
99 * http://bazaar.launchpad.net/~linaro-toolchain-dev/cortex-strings/trunk/
1010 * 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/>.
2311 */
2412
2513 #include <linux/linkage.h>
....@@ -60,7 +48,7 @@
6048 zeroones .req x10
6149 pos .req x11
6250
63
-WEAK(strcmp)
51
+SYM_FUNC_START_WEAK_PI(strcmp)
6452 eor tmp1, src1, src2
6553 mov zeroones, #REP8_01
6654 tst tmp1, #7
....@@ -198,7 +186,7 @@
198186 * as carry-propagation can corrupt the upper bits if the trailing
199187 * bytes in the string contain 0x01.
200188 * 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
202190 * MSB might be significant.
203191 */
204192 CPU_BE( cbnz has_nul, 1f )
....@@ -231,4 +219,5 @@
231219 lsr data1, data1, #56
232220 sub result, data1, data2, lsr #56
233221 ret
234
-ENDPIPROC(strcmp)
222
+SYM_FUNC_END_PI(strcmp)
223
+EXPORT_SYMBOL_NOKASAN(strcmp)