.. | .. |
---|
12 | 12 | */ |
---|
13 | 13 | |
---|
14 | 14 | #include <linux/linkage.h> |
---|
15 | | -#include <variant/core.h> |
---|
16 | 15 | #include <asm/asmmacro.h> |
---|
| 16 | +#include <asm/core.h> |
---|
17 | 17 | |
---|
18 | 18 | /* |
---|
19 | 19 | * size_t __strnlen_user(const char *s, size_t len) |
---|
.. | .. |
---|
45 | 45 | .text |
---|
46 | 46 | ENTRY(__strnlen_user) |
---|
47 | 47 | |
---|
48 | | - entry sp, 16 # minimal stack frame |
---|
| 48 | + abi_entry_default |
---|
49 | 49 | # a2/ s, a3/ len |
---|
50 | 50 | addi a4, a2, -4 # because we overincrement at the end; |
---|
51 | 51 | # we compensate with load offsets of 4 |
---|
.. | .. |
---|
96 | 96 | addi a4, a4, 1 # advance string pointer |
---|
97 | 97 | .L101: |
---|
98 | 98 | sub a2, a4, a2 # compute length |
---|
99 | | - retw |
---|
| 99 | + abi_ret_default |
---|
100 | 100 | |
---|
101 | 101 | # NOTE that in several places below, we point to the byte just after |
---|
102 | 102 | # the zero byte in order to include the NULL terminator in the count. |
---|
.. | .. |
---|
106 | 106 | .Lz0: # byte 0 is zero |
---|
107 | 107 | addi a4, a4, 1 # point just beyond zero byte |
---|
108 | 108 | sub a2, a4, a2 # subtract to get length |
---|
109 | | - retw |
---|
| 109 | + abi_ret_default |
---|
110 | 110 | .Lz1: # byte 1 is zero |
---|
111 | 111 | addi a4, a4, 1+1 # point just beyond zero byte |
---|
112 | 112 | sub a2, a4, a2 # subtract to get length |
---|
113 | | - retw |
---|
| 113 | + abi_ret_default |
---|
114 | 114 | .Lz2: # byte 2 is zero |
---|
115 | 115 | addi a4, a4, 2+1 # point just beyond zero byte |
---|
116 | 116 | sub a2, a4, a2 # subtract to get length |
---|
117 | | - retw |
---|
| 117 | + abi_ret_default |
---|
118 | 118 | |
---|
119 | 119 | .L1mod2: # address is odd |
---|
120 | 120 | EX(10f) l8ui a9, a4, 4 # get byte 0 |
---|
.. | .. |
---|
130 | 130 | # byte 3 is zero |
---|
131 | 131 | addi a4, a4, 3+1 # point just beyond zero byte |
---|
132 | 132 | sub a2, a4, a2 # subtract to get length |
---|
133 | | - retw |
---|
| 133 | + abi_ret_default |
---|
134 | 134 | |
---|
135 | 135 | ENDPROC(__strnlen_user) |
---|
136 | 136 | |
---|
.. | .. |
---|
138 | 138 | .align 4 |
---|
139 | 139 | 10: |
---|
140 | 140 | movi a2, 0 |
---|
141 | | - retw |
---|
| 141 | + abi_ret_default |
---|