Lines Matching +full:1 +full:- +full:v0

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * aesce-ccm-core.S - AES-CCM transform for ARMv8 with Crypto Extensions
5 * Copyright (C) 2013 - 2017 Linaro Ltd <ard.biesheuvel@linaro.org>
12 .arch armv8-a+crypto
20 ld1 {v0.16b}, [x0] /* load mac */
21 cbz w8, 1f
24 0: ldrb w7, [x1], #1 /* get 1 byte of input */
25 subs w2, w2, #1
26 add w8, w8, #1
28 ext v1.16b, v1.16b, v1.16b, #1 /* rotate in the input bytes */
31 eor v0.16b, v0.16b, v1.16b
32 1: ld1 {v3.4s}, [x4] /* load first round key */
43 3: aese v0.16b, v4.16b
44 aesmc v0.16b, v0.16b
46 aese v0.16b, v5.16b
47 aesmc v0.16b, v0.16b
50 aese v0.16b, v3.16b
51 aesmc v0.16b, v0.16b
54 aese v0.16b, v4.16b
56 eor v0.16b, v0.16b, v5.16b /* final round */
59 eor v0.16b, v0.16b, v1.16b /* xor with mac */
60 bne 1b
61 6: st1 {v0.16b}, [x0] /* store mac */
66 7: ldrb w7, [x1], #1
67 umov w6, v0.b[0]
69 strb w6, [x0], #1
70 subs w2, w2, #1
72 ext v0.16b, v0.16b, v0.16b, #1 /* rotate out the mac bytes */
77 9: ext v1.16b, v1.16b, v1.16b, #1
78 adds w7, w7, #1
80 91: eor v0.16b, v0.16b, v1.16b
81 st1 {v0.16b}, [x0]
92 ld1 {v0.16b}, [x0] /* load mac */
95 ld1 {v1.16b}, [x1] /* load 1st ctriv */
101 1: ld1 {v5.4s}, [x2], #16 /* load next round key */
102 aese v0.16b, v4.16b
103 aesmc v0.16b, v0.16b
107 aese v0.16b, v5.16b
108 aesmc v0.16b, v0.16b
113 aese v0.16b, v3.16b
114 aesmc v0.16b, v0.16b
117 bpl 1b
118 aese v0.16b, v4.16b
121 eor v0.16b, v0.16b, v1.16b /* en-/decrypt the mac */
122 st1 {v0.16b}, [x0] /* store result */
128 ld1 {v0.16b}, [x5] /* load mac */
133 add x8, x8, #1
137 ins v1.d[1], x9 /* no carry in lower ctr */
140 bmi 1f
144 1: mov v4.16b, v3.16b
147 aese v0.16b, v4.16b
148 aesmc v0.16b, v0.16b
152 aese v0.16b, v5.16b
153 aesmc v0.16b, v0.16b
158 aese v0.16b, v3.16b
159 aesmc v0.16b, v0.16b
164 aese v0.16b, v4.16b
169 .if \enc == 1
176 eor v0.16b, v0.16b, v2.16b /* xor mac with pt ^ rk[last] */
180 st1 {v0.16b}, [x5] /* store mac */
184 6: eor v0.16b, v0.16b, v5.16b /* final round mac */
186 st1 {v0.16b}, [x5] /* store mac */
188 7: ldrb w9, [x1], #1 /* get 1 byte of input */
190 umov w7, v0.b[0] /* get top mac byte */
191 .if \enc == 1
198 strb w9, [x0], #1 /* store out byte */
199 strb w7, [x5], #1 /* store mac byte */
200 subs w2, w2, #1
202 ext v0.16b, v0.16b, v0.16b, #1 /* shift out mac byte */
203 ext v1.16b, v1.16b, v1.16b, #1 /* shift out ctr byte */
216 aes_ccm_do_crypt 1