Lines Matching +full:4 +full:-
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
5 * https://tools.ietf.org/id/draft-ribose-cfrg-sm4-10.html
35 ld1 {v16.16b-v19.16b}, [x5], #64; \
36 ld1 {v20.16b-v23.16b}, [x5], #64; \
37 ld1 {v24.16b-v27.16b}, [x5], #64; \
38 ld1 {v28.16b-v31.16b}, [x5];
41 zip1 RTMP0.4s, s0.4s, s1.4s; \
42 zip1 RTMP1.4s, s2.4s, s3.4s; \
43 zip2 RTMP2.4s, s0.4s, s1.4s; \
44 zip2 RTMP3.4s, s2.4s, s3.4s; \
51 zip1 RTMP0.4s, s0.4s, s1.4s; \
52 zip1 RTMP1.4s, s2.4s, s3.4s; \
53 zip2 RTMP2.4s, s0.4s, s1.4s; \
54 zip2 RTMP3.4s, s2.4s, s3.4s; \
55 zip1 RTMP4.4s, s4.4s, s5.4s; \
56 zip1 RTMP5.4s, s6.4s, s7.4s; \
57 zip2 RTMP6.4s, s4.4s, s5.4s; \
58 zip2 RTMP7.4s, s6.4s, s7.4s; \
69 zip1 RTMP0.4s, s1.4s, s0.4s; \
70 zip2 RTMP1.4s, s1.4s, s0.4s; \
71 zip1 RTMP2.4s, s3.4s, s2.4s; \
72 zip2 RTMP3.4s, s3.4s, s2.4s; \
79 zip1 RTMP0.4s, s1.4s, s0.4s; \
80 zip1 RTMP2.4s, s3.4s, s2.4s; \
81 zip2 RTMP1.4s, s1.4s, s0.4s; \
82 zip2 RTMP3.4s, s3.4s, s2.4s; \
83 zip1 RTMP4.4s, s5.4s, s4.4s; \
84 zip1 RTMP6.4s, s7.4s, s6.4s; \
85 zip2 RTMP5.4s, s5.4s, s4.4s; \
86 zip2 RTMP7.4s, s7.4s, s6.4s; \
97 dup RX0.4s, RKEY.s[round]; \
103 /* sbox, non-linear part */ \
104 movi RTMP3.16b, #64; /* sizeof(sbox) / 4 */ \
105 tbl RTMP0.16b, {v16.16b-v19.16b}, RX0.16b; \
107 tbx RTMP0.16b, {v20.16b-v23.16b}, RX0.16b; \
109 tbx RTMP0.16b, {v24.16b-v27.16b}, RX0.16b; \
111 tbx RTMP0.16b, {v28.16b-v31.16b}, RX0.16b; \
114 shl RTMP1.4s, RTMP0.4s, #8; \
115 shl RTMP2.4s, RTMP0.4s, #16; \
116 shl RTMP3.4s, RTMP0.4s, #24; \
117 sri RTMP1.4s, RTMP0.4s, #(32-8); \
118 sri RTMP2.4s, RTMP0.4s, #(32-16); \
119 sri RTMP3.4s, RTMP0.4s, #(32-24); \
125 shl RTMP2.4s, RTMP1.4s, 2; \
126 sri RTMP2.4s, RTMP1.4s, #(32-2); \
133 4: \
134 ld1 {RKEY.4s}, [x0], #16; \
142 bne 4b; \
163 dup RX0.4s, RKEY.s[round]; \
172 /* sbox, non-linear part */ \
173 movi RTMP3.16b, #64; /* sizeof(sbox) / 4 */ \
174 tbl RTMP0.16b, {v16.16b-v19.16b}, RX0.16b; \
175 tbl RTMP1.16b, {v16.16b-v19.16b}, RX1.16b; \
178 tbx RTMP0.16b, {v20.16b-v23.16b}, RX0.16b; \
179 tbx RTMP1.16b, {v20.16b-v23.16b}, RX1.16b; \
182 tbx RTMP0.16b, {v24.16b-v27.16b}, RX0.16b; \
183 tbx RTMP1.16b, {v24.16b-v27.16b}, RX1.16b; \
186 tbx RTMP0.16b, {v28.16b-v31.16b}, RX0.16b; \
187 tbx RTMP1.16b, {v28.16b-v31.16b}, RX1.16b; \
190 shl RX0.4s, RTMP0.4s, #8; \
191 shl RX1.4s, RTMP1.4s, #8; \
192 shl RTMP2.4s, RTMP0.4s, #16; \
193 shl RTMP3.4s, RTMP1.4s, #16; \
194 sri RX0.4s, RTMP0.4s, #(32 - 8); \
195 sri RX1.4s, RTMP1.4s, #(32 - 8); \
196 sri RTMP2.4s, RTMP0.4s, #(32 - 16); \
197 sri RTMP3.4s, RTMP1.4s, #(32 - 16); \
204 shl RTMP2.4s, RTMP0.4s, #24; \
205 shl RTMP3.4s, RTMP1.4s, #24; \
206 sri RTMP2.4s, RTMP0.4s, #(32 - 24); \
207 sri RTMP3.4s, RTMP1.4s, #(32 - 24); \
210 shl RTMP2.4s, RX0.4s, #2; \
211 shl RTMP3.4s, RX1.4s, #2; \
212 sri RTMP2.4s, RX0.4s, #(32 - 2); \
213 sri RTMP3.4s, RX1.4s, #(32 - 2); \
232 ld1 {RKEY.4s}, [x0], #16; \
273 ld4 {v0.4s-v3.4s}, [x2], #64
274 ld4 {v4.4s-v7.4s}, [x2], #64
278 st1 {v0.16b-v3.16b}, [x1], #64
279 st1 {v4.16b-v7.16b}, [x1], #64
286 cmp w3, #4
289 sub w3, w3, #4
291 ld4 {v0.4s-v3.4s}, [x2], #64
295 st1 {v0.16b-v3.16b}, [x1], #64
340 ld4 {v0.4s-v3.4s}, [x2], #64
341 ld4 {v4.4s-v7.4s}, [x2]
353 ld1 {RTMP0.16b-RTMP3.16b}, [x2], #64
354 ld1 {RTMP4.16b-RTMP7.16b}, [x2], #64
366 st1 {v0.16b-v3.16b}, [x1], #64
367 st1 {v4.16b-v7.16b}, [x1], #64
374 cmp w4, #4
377 sub w4, w4, #4
379 ld1 {v0.16b-v3.16b}, [x2], #64
397 st1 {v4.16b-v7.16b}, [x1], #64
471 inc_le128(v4) /* +4 */
480 ld1 {RTMP0.16b-RTMP3.16b}, [x2], #64
481 ld1 {RTMP4.16b-RTMP7.16b}, [x2], #64
492 st1 {v0.16b-v3.16b}, [x1], #64
493 st1 {v4.16b-v7.16b}, [x1], #64
500 cmp w4, #4
503 sub w4, w4, #4
511 ld1 {v4.16b-v7.16b}, [x2], #64
522 st1 {v0.16b-v3.16b}, [x1], #64