Lines Matching +full:n +full:- +full:1
2 * include/asm-xtensa/checksum.h
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
20 * and adds in "sum" (32-bit)
22 * returns a 32-bit number suitable for feeding into itself
28 * it's best to have buff aligned on a 32-bit boundary
34 * checksums, and handles user-space pointer exceptions correctly, when needed.
36 * here even more important to align src and dst on a 32-bit (or even
37 * better 64-bit) boundary
70 __asm__("extui %1, %0, 16, 16\n\t" in csum_fold()
71 "extui %0 ,%0, 0, 16\n\t" in csum_fold()
72 "add %0, %0, %1\n\t" in csum_fold()
73 "slli %1, %0, 16\n\t" in csum_fold()
74 "add %0, %0, %1\n\t" in csum_fold()
75 "extui %0, %0, 16, 16\n\t" in csum_fold()
76 "neg %0, %0\n\t" in csum_fold()
77 "addi %0, %0, -1\n\t" in csum_fold()
78 "extui %0, %0, 0, 16\n\t" in csum_fold()
93 "sub %0, %0, %0\n\t" in ip_fast_csum()
95 "loopgtz %2, 2f\n\t" in ip_fast_csum()
97 "beqz %2, 2f\n\t" in ip_fast_csum()
98 "slli %4, %2, 2\n\t" in ip_fast_csum()
99 "add %4, %4, %1\n\t" in ip_fast_csum()
102 "l32i %3, %1, 0\n\t" in ip_fast_csum()
103 "add %0, %0, %3\n\t" in ip_fast_csum()
104 "bgeu %0, %3, 1f\n\t" in ip_fast_csum()
105 "addi %0, %0, 1\n\t" in ip_fast_csum()
106 "1:\t" in ip_fast_csum()
107 "addi %1, %1, 4\n\t" in ip_fast_csum()
109 "blt %1, %4, 0b\n\t" in ip_fast_csum()
117 : "1" (iph), "2" (ihl) in ip_fast_csum()
135 __asm__("add %0, %0, %1\n\t" in csum_tcpudp_nofold()
136 "bgeu %0, %1, 1f\n\t" in csum_tcpudp_nofold()
137 "addi %0, %0, 1\n\t" in csum_tcpudp_nofold()
138 "1:\t" in csum_tcpudp_nofold()
139 "add %0, %0, %2\n\t" in csum_tcpudp_nofold()
140 "bgeu %0, %2, 1f\n\t" in csum_tcpudp_nofold()
141 "addi %0, %0, 1\n\t" in csum_tcpudp_nofold()
142 "1:\t" in csum_tcpudp_nofold()
143 "add %0, %0, %3\n\t" in csum_tcpudp_nofold()
144 "bgeu %0, %3, 1f\n\t" in csum_tcpudp_nofold()
145 "addi %0, %0, 1\n\t" in csum_tcpudp_nofold()
146 "1:\t" in csum_tcpudp_nofold()
148 : "r" (daddr), "r" (saddr), "1" (len_proto), "0" (sum)); in csum_tcpudp_nofold()
153 * computes the checksum of the TCP/UDP pseudo-header
154 * returns a 16-bit checksum, already complemented
164 * this routine is used for miscellaneous IP-like checksums, mainly
180 __asm__("l32i %1, %2, 0\n\t" in csum_ipv6_magic()
181 "add %0, %0, %1\n\t" in csum_ipv6_magic()
182 "bgeu %0, %1, 1f\n\t" in csum_ipv6_magic()
183 "addi %0, %0, 1\n\t" in csum_ipv6_magic()
184 "1:\t" in csum_ipv6_magic()
185 "l32i %1, %2, 4\n\t" in csum_ipv6_magic()
186 "add %0, %0, %1\n\t" in csum_ipv6_magic()
187 "bgeu %0, %1, 1f\n\t" in csum_ipv6_magic()
188 "addi %0, %0, 1\n\t" in csum_ipv6_magic()
189 "1:\t" in csum_ipv6_magic()
190 "l32i %1, %2, 8\n\t" in csum_ipv6_magic()
191 "add %0, %0, %1\n\t" in csum_ipv6_magic()
192 "bgeu %0, %1, 1f\n\t" in csum_ipv6_magic()
193 "addi %0, %0, 1\n\t" in csum_ipv6_magic()
194 "1:\t" in csum_ipv6_magic()
195 "l32i %1, %2, 12\n\t" in csum_ipv6_magic()
196 "add %0, %0, %1\n\t" in csum_ipv6_magic()
197 "bgeu %0, %1, 1f\n\t" in csum_ipv6_magic()
198 "addi %0, %0, 1\n\t" in csum_ipv6_magic()
199 "1:\t" in csum_ipv6_magic()
200 "l32i %1, %3, 0\n\t" in csum_ipv6_magic()
201 "add %0, %0, %1\n\t" in csum_ipv6_magic()
202 "bgeu %0, %1, 1f\n\t" in csum_ipv6_magic()
203 "addi %0, %0, 1\n\t" in csum_ipv6_magic()
204 "1:\t" in csum_ipv6_magic()
205 "l32i %1, %3, 4\n\t" in csum_ipv6_magic()
206 "add %0, %0, %1\n\t" in csum_ipv6_magic()
207 "bgeu %0, %1, 1f\n\t" in csum_ipv6_magic()
208 "addi %0, %0, 1\n\t" in csum_ipv6_magic()
209 "1:\t" in csum_ipv6_magic()
210 "l32i %1, %3, 8\n\t" in csum_ipv6_magic()
211 "add %0, %0, %1\n\t" in csum_ipv6_magic()
212 "bgeu %0, %1, 1f\n\t" in csum_ipv6_magic()
213 "addi %0, %0, 1\n\t" in csum_ipv6_magic()
214 "1:\t" in csum_ipv6_magic()
215 "l32i %1, %3, 12\n\t" in csum_ipv6_magic()
216 "add %0, %0, %1\n\t" in csum_ipv6_magic()
217 "bgeu %0, %1, 1f\n\t" in csum_ipv6_magic()
218 "addi %0, %0, 1\n\t" in csum_ipv6_magic()
219 "1:\t" in csum_ipv6_magic()
220 "add %0, %0, %4\n\t" in csum_ipv6_magic()
221 "bgeu %0, %4, 1f\n\t" in csum_ipv6_magic()
222 "addi %0, %0, 1\n\t" in csum_ipv6_magic()
223 "1:\t" in csum_ipv6_magic()
224 "add %0, %0, %5\n\t" in csum_ipv6_magic()
225 "bgeu %0, %5, 1f\n\t" in csum_ipv6_magic()
226 "addi %0, %0, 1\n\t" in csum_ipv6_magic()
227 "1:\t" in csum_ipv6_magic()