Lines Matching +full:- +full:b

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * SM4-CCM AEAD Algorithm using ARMv8 Crypto Extensions
13 #include "sm4-ce-asm.h"
15 .arch armv8-a+crypto
17 .irp b, 0, 1, 8, 9, 10, 11, 12, 13, 14, 15, 16, 24, 25, 26, 27, 28, 29, 30, 31
18 .set .Lv\b\().4s, \b
35 rev64 vctr.16b, vctr.16b; \
49 ld1 {RMAC.16b}, [x1]
57 ld1 {v0.16b-v3.16b}, [x2], #64
60 eor RMAC.16b, RMAC.16b, v0.16b
62 eor RMAC.16b, RMAC.16b, v1.16b
64 eor RMAC.16b, RMAC.16b, v2.16b
66 eor RMAC.16b, RMAC.16b, v3.16b
69 b .Lcbcmac_loop_4x
74 ld1 {v0.16b}, [x2], #16
77 eor RMAC.16b, RMAC.16b, v0.16b
82 st1 {RMAC.16b}, [x1]
95 ld1 {RMAC.16b}, [x2]
96 ld1 {v0.16b}, [x1]
100 /* en-/decrypt the mac with ctr0 */
101 eor RMAC.16b, RMAC.16b, v0.16b
102 st1 {RMAC.16b}, [x2]
123 ld1 {RMAC.16b}, [x5]
137 ld1 {v0.16b-v3.16b}, [x2], #64
140 eor v8.16b, v8.16b, v0.16b
141 eor RMAC.16b, RMAC.16b, v0.16b
143 eor v9.16b, v9.16b, v1.16b
144 eor RMAC.16b, RMAC.16b, v1.16b
146 eor v10.16b, v10.16b, v2.16b
147 eor RMAC.16b, RMAC.16b, v2.16b
149 eor v11.16b, v11.16b, v3.16b
150 eor RMAC.16b, RMAC.16b, v3.16b
152 st1 {v8.16b-v11.16b}, [x1], #64
155 b .Lccm_enc_loop_4x
166 ld1 {v0.16b}, [x2], #16
169 eor v8.16b, v8.16b, v0.16b
170 eor RMAC.16b, RMAC.16b, v0.16b
172 st1 {v8.16b}, [x1], #16
175 b .Lccm_enc_loop_1x
184 st1 {RMAC.16b}, [x5]
188 umov w9, v8.b[0] /* get top crypted CTR byte */
189 umov w6, RMAC.b[0] /* get top MAC byte */
201 ext RMAC.16b, RMAC.16b, RMAC.16b, #1
202 ext v8.16b, v8.16b, v8.16b, #1
204 b .Lccm_enc_tail_loop
208 st1 {RMAC.16b}, [x5]
235 ld1 {RMAC.16b}, [x5]
249 ld1 {v0.16b-v3.16b}, [x2], #64
252 eor v8.16b, v8.16b, v0.16b
253 eor RMAC.16b, RMAC.16b, v8.16b
255 eor v9.16b, v9.16b, v1.16b
256 eor RMAC.16b, RMAC.16b, v9.16b
258 eor v10.16b, v10.16b, v2.16b
259 eor RMAC.16b, RMAC.16b, v10.16b
261 eor v11.16b, v11.16b, v3.16b
262 eor RMAC.16b, RMAC.16b, v11.16b
264 st1 {v8.16b-v11.16b}, [x1], #64
267 b .Lccm_dec_loop_4x
278 ld1 {v0.16b}, [x2], #16
281 eor v8.16b, v8.16b, v0.16b
282 eor RMAC.16b, RMAC.16b, v8.16b
284 st1 {v8.16b}, [x1], #16
287 b .Lccm_dec_loop_1x
296 st1 {RMAC.16b}, [x5]
300 umov w9, v8.b[0] /* get top crypted CTR byte */
301 umov w6, RMAC.b[0] /* get top MAC byte */
313 ext RMAC.16b, RMAC.16b, RMAC.16b, #1
314 ext v8.16b, v8.16b, v8.16b, #1
316 b .Lccm_dec_tail_loop
320 st1 {RMAC.16b}, [x5]