Lines Matching +full:- +full:b
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/arch/arm64/crypto/aes-neon.S - AES cipher for ARMv8 NEON
5 * Copyright (C) 2013 - 2017 Linaro Ltd. <ard.biesheuvel@linaro.org>
22 /* special case for the neon-bs driver calling into this one for CTS */
45 movi v12.16b, #0x1b
49 ld1 {v16.16b-v19.16b}, [\temp], #64
50 ld1 {v20.16b-v23.16b}, [\temp], #64
51 ld1 {v24.16b-v27.16b}, [\temp], #64
52 ld1 {v28.16b-v31.16b}, [\temp]
71 sub v9.16b, \in\().16b, v15.16b
72 tbl \in\().16b, {v16.16b-v19.16b}, \in\().16b
73 sub v10.16b, v9.16b, v15.16b
74 tbx \in\().16b, {v20.16b-v23.16b}, v9.16b
75 sub v11.16b, v10.16b, v15.16b
76 tbx \in\().16b, {v24.16b-v27.16b}, v10.16b
77 tbx \in\().16b, {v28.16b-v31.16b}, v11.16b
83 /* Inverse MixColumns: pre-multiply by { 5, 0, 4, 0 } */
84 mul_by_x2 v8.16b, \in\().16b, v9.16b, v12.16b
85 eor \in\().16b, \in\().16b, v8.16b
87 eor \in\().16b, \in\().16b, v8.16b
90 mul_by_x v9.16b, \in\().16b, v8.16b, v12.16b
92 eor v8.16b, v8.16b, v9.16b
93 eor \in\().16b, \in\().16b, v8.16b
94 tbl \in\().16b, {\in\().16b}, v14.16b
95 eor \in\().16b, \in\().16b, v8.16b
102 .La\@: eor \in\().16b, \in\().16b, v15.16b /* ^round key */
103 movi v15.16b, #0x40
104 tbl \in\().16b, {\in\().16b}, v13.16b /* ShiftRows */
110 b .La\@
111 .Lb\@: eor \in\().16b, \in\().16b, v15.16b /* ^round key */
128 sub v8.16b, \in0\().16b, v15.16b
129 tbl \in0\().16b, {v16.16b-v19.16b}, \in0\().16b
130 sub v9.16b, \in1\().16b, v15.16b
131 tbl \in1\().16b, {v16.16b-v19.16b}, \in1\().16b
132 sub v10.16b, \in2\().16b, v15.16b
133 tbl \in2\().16b, {v16.16b-v19.16b}, \in2\().16b
134 sub v11.16b, \in3\().16b, v15.16b
135 tbl \in3\().16b, {v16.16b-v19.16b}, \in3\().16b
136 tbx \in0\().16b, {v20.16b-v23.16b}, v8.16b
137 tbx \in1\().16b, {v20.16b-v23.16b}, v9.16b
138 sub v8.16b, v8.16b, v15.16b
139 tbx \in2\().16b, {v20.16b-v23.16b}, v10.16b
140 sub v9.16b, v9.16b, v15.16b
141 tbx \in3\().16b, {v20.16b-v23.16b}, v11.16b
142 sub v10.16b, v10.16b, v15.16b
143 tbx \in0\().16b, {v24.16b-v27.16b}, v8.16b
144 sub v11.16b, v11.16b, v15.16b
145 tbx \in1\().16b, {v24.16b-v27.16b}, v9.16b
146 sub v8.16b, v8.16b, v15.16b
147 tbx \in2\().16b, {v24.16b-v27.16b}, v10.16b
148 sub v9.16b, v9.16b, v15.16b
149 tbx \in3\().16b, {v24.16b-v27.16b}, v11.16b
150 sub v10.16b, v10.16b, v15.16b
151 tbx \in0\().16b, {v28.16b-v31.16b}, v8.16b
152 sub v11.16b, v11.16b, v15.16b
153 tbx \in1\().16b, {v28.16b-v31.16b}, v9.16b
154 tbx \in2\().16b, {v28.16b-v31.16b}, v10.16b
155 tbx \in3\().16b, {v28.16b-v31.16b}, v11.16b
159 sshr \tmp0\().16b, \in0\().16b, #7
160 shl \out0\().16b, \in0\().16b, #1
161 sshr \tmp1\().16b, \in1\().16b, #7
162 and \tmp0\().16b, \tmp0\().16b, \const\().16b
163 shl \out1\().16b, \in1\().16b, #1
164 and \tmp1\().16b, \tmp1\().16b, \const\().16b
165 eor \out0\().16b, \out0\().16b, \tmp0\().16b
166 eor \out1\().16b, \out1\().16b, \tmp1\().16b
170 ushr \tmp0\().16b, \in0\().16b, #6
171 shl \out0\().16b, \in0\().16b, #2
172 ushr \tmp1\().16b, \in1\().16b, #6
173 pmul \tmp0\().16b, \tmp0\().16b, \const\().16b
174 shl \out1\().16b, \in1\().16b, #2
175 pmul \tmp1\().16b, \tmp1\().16b, \const\().16b
176 eor \out0\().16b, \out0\().16b, \tmp0\().16b
177 eor \out1\().16b, \out1\().16b, \tmp1\().16b
182 /* Inverse MixColumns: pre-multiply by { 5, 0, 4, 0 } */
184 eor \in0\().16b, \in0\().16b, v8.16b
186 eor \in1\().16b, \in1\().16b, v9.16b
188 eor \in0\().16b, \in0\().16b, v8.16b
189 eor \in1\().16b, \in1\().16b, v9.16b
195 eor v10.16b, v10.16b, v8.16b
196 eor v11.16b, v11.16b, v9.16b
197 eor \in0\().16b, \in0\().16b, v10.16b
198 eor \in1\().16b, \in1\().16b, v11.16b
199 tbl \in0\().16b, {\in0\().16b}, v14.16b
200 tbl \in1\().16b, {\in1\().16b}, v14.16b
201 eor \in0\().16b, \in0\().16b, v10.16b
202 eor \in1\().16b, \in1\().16b, v11.16b
209 .La\@: eor \in0\().16b, \in0\().16b, v15.16b /* ^round key */
210 eor \in1\().16b, \in1\().16b, v15.16b /* ^round key */
211 eor \in2\().16b, \in2\().16b, v15.16b /* ^round key */
212 eor \in3\().16b, \in3\().16b, v15.16b /* ^round key */
213 movi v15.16b, #0x40
214 tbl \in0\().16b, {\in0\().16b}, v13.16b /* ShiftRows */
215 tbl \in1\().16b, {\in1\().16b}, v13.16b /* ShiftRows */
216 tbl \in2\().16b, {\in2\().16b}, v13.16b /* ShiftRows */
217 tbl \in3\().16b, {\in3\().16b}, v13.16b /* ShiftRows */
224 b .La\@
225 .Lb\@: eor \in0\().16b, \in0\().16b, v15.16b /* ^round key */
226 eor \in1\().16b, \in1\().16b, v15.16b /* ^round key */
227 eor \in2\().16b, \in2\().16b, v15.16b /* ^round key */
228 eor \in3\().16b, \in3\().16b, v15.16b /* ^round key */
239 #include "aes-modes.S"