1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ; Copyright(c) 2019-2021 Intel Corporation All rights reserved.
4 ; Redistribution and use in source and binary forms, with or without
5 ; modification, are permitted provided that the following conditions
7 ; * Redistributions of source code must retain the above copyright
8 ; notice, this list of conditions and the following disclaimer.
9 ; * Redistributions in binary form must reproduce the above copyright
10 ; notice, this list of conditions and the following disclaimer in
11 ; the documentation and/or other materials provided with the
13 ; * Neither the name of Intel Corporation nor the names of its
14 ; contributors may be used to endorse or promote products derived
15 ; from this software without specific prior written permission.
17 ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 ; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
30 %include "aes_common.asm"
31 %include "reg_sizes.asm"
33 %if (AS_FEATURE_LEVEL) >= 10
41 %define zBLK_8_11 zmm3
42 %define zBLK_12_15 zmm4
64 %ifidn __OUTPUT_FORMAT__, elf64
87 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
88 ;;; macro to preload keys
89 ;;; - uses ZKEY[0-14] registers (ZMM)
91 %define %%KEYS %1 ; [in] key pointer
92 %define %%NROUNDS %2 ; [in] numerical value, number of AES rounds
93 ; excluding 1st and last rounds.
94 ; Example: AES-128 -> value 9
98 vbroadcastf64x2 ZKEY %+ i, [%%KEYS + 16*i]
104 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
105 ;;; This macro is used to "cool down" pipeline after DECRYPT_16_PARALLEL macro
106 ;;; code as the number of final blocks is variable.
107 ;;; Processes the last %%num_final_blocks blocks (1 to 15, can't be 0)
109 %macro FINAL_BLOCKS 14
110 %define %%PLAIN_OUT %1 ; [in] output buffer
111 %define %%CIPH_IN %2 ; [in] input buffer
112 %define %%LAST_CIPH_BLK %3 ; [in/out] ZMM with IV/last cipher blk (in idx 3)
113 %define %%num_final_blocks %4 ; [in] numerical value (1 - 15)
114 %define %%CIPHER_PLAIN_0_3 %5 ; [out] ZMM next 0-3 cipher blocks
115 %define %%CIPHER_PLAIN_4_7 %6 ; [out] ZMM next 4-7 cipher blocks
116 %define %%CIPHER_PLAIN_8_11 %7 ; [out] ZMM next 8-11 cipher blocks
117 %define %%CIPHER_PLAIN_12_15 %8 ; [out] ZMM next 12-15 cipher blocks
118 %define %%ZT1 %9 ; [clobbered] ZMM temporary
119 %define %%ZT2 %10 ; [clobbered] ZMM temporary
120 %define %%ZT3 %11 ; [clobbered] ZMM temporary
121 %define %%ZT4 %12 ; [clobbered] ZMM temporary
122 %define %%IA0 %13 ; [clobbered] GP temporary
123 %define %%NROUNDS %14 ; [in] number of rounds; numerical value
125 ;; load plain/cipher text
127 ZMM_LOAD_BLOCKS_0_16_OFFSET %%num_final_blocks, %%CIPH_IN, \
128 OFFSET, %%CIPHER_PLAIN_0_3, %%CIPHER_PLAIN_4_7, \
129 %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_12_15
131 ZMM_LOAD_BLOCKS_0_16 %%num_final_blocks, %%CIPH_IN, 0, \
132 %%CIPHER_PLAIN_0_3, %%CIPHER_PLAIN_4_7, \
133 %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_12_15
135 ;; Prepare final cipher text blocks to
136 ;; be XOR'd later after AESDEC
137 valignq %%ZT1, %%CIPHER_PLAIN_0_3, %%LAST_CIPH_BLK, 6
138 %if %%num_final_blocks > 4
139 valignq %%ZT2, %%CIPHER_PLAIN_4_7, %%CIPHER_PLAIN_0_3, 6
141 %if %%num_final_blocks > 8
142 valignq %%ZT3, %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_4_7, 6
144 %if %%num_final_blocks > 12
145 valignq %%ZT4, %%CIPHER_PLAIN_12_15, %%CIPHER_PLAIN_8_11, 6
148 ;; Update IV with last cipher block
149 ;; to be used later in DECRYPT_16_PARALLEL
150 %if %%num_final_blocks == 1
151 valignq %%LAST_CIPH_BLK, %%CIPHER_PLAIN_0_3, %%CIPHER_PLAIN_0_3, 2
152 %elif %%num_final_blocks == 2
153 valignq %%LAST_CIPH_BLK, %%CIPHER_PLAIN_0_3, %%CIPHER_PLAIN_0_3, 4
154 %elif %%num_final_blocks == 3
155 valignq %%LAST_CIPH_BLK, %%CIPHER_PLAIN_0_3, %%CIPHER_PLAIN_0_3, 6
156 %elif %%num_final_blocks == 4
157 vmovdqa64 %%LAST_CIPH_BLK, %%CIPHER_PLAIN_0_3
158 %elif %%num_final_blocks == 5
159 valignq %%LAST_CIPH_BLK, %%CIPHER_PLAIN_4_7, %%CIPHER_PLAIN_4_7, 2
160 %elif %%num_final_blocks == 6
161 valignq %%LAST_CIPH_BLK, %%CIPHER_PLAIN_4_7, %%CIPHER_PLAIN_4_7, 4
162 %elif %%num_final_blocks == 7
163 valignq %%LAST_CIPH_BLK, %%CIPHER_PLAIN_4_7, %%CIPHER_PLAIN_4_7, 6
164 %elif %%num_final_blocks == 8
165 vmovdqa64 %%LAST_CIPH_BLK, %%CIPHER_PLAIN_4_7
166 %elif %%num_final_blocks == 9
167 valignq %%LAST_CIPH_BLK, %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_8_11, 2
168 %elif %%num_final_blocks == 10
169 valignq %%LAST_CIPH_BLK, %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_8_11, 4
170 %elif %%num_final_blocks == 11
171 valignq %%LAST_CIPH_BLK, %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_8_11, 6
172 %elif %%num_final_blocks == 12
173 vmovdqa64 %%LAST_CIPH_BLK, %%CIPHER_PLAIN_8_11
174 %elif %%num_final_blocks == 13
175 valignq %%LAST_CIPH_BLK, %%CIPHER_PLAIN_12_15, %%CIPHER_PLAIN_12_15, 2
176 %elif %%num_final_blocks == 14
177 valignq %%LAST_CIPH_BLK, %%CIPHER_PLAIN_12_15, %%CIPHER_PLAIN_12_15, 4
178 %elif %%num_final_blocks == 15
179 valignq %%LAST_CIPH_BLK, %%CIPHER_PLAIN_12_15, %%CIPHER_PLAIN_12_15, 6
185 ZMM_AESDEC_ROUND_BLOCKS_0_16 %%CIPHER_PLAIN_0_3, %%CIPHER_PLAIN_4_7, \
186 %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_12_15, \
187 ZKEY %+ j, j, no_data, no_data, no_data, no_data, \
188 %%num_final_blocks, %%NROUNDS
192 ;; XOR with decrypted blocks to get plain text
193 vpxorq %%CIPHER_PLAIN_0_3, %%CIPHER_PLAIN_0_3, %%ZT1
194 %if %%num_final_blocks > 4
195 vpxorq %%CIPHER_PLAIN_4_7, %%CIPHER_PLAIN_4_7, %%ZT2
197 %if %%num_final_blocks > 8
198 vpxorq %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_8_11, %%ZT3
200 %if %%num_final_blocks > 12
201 vpxorq %%CIPHER_PLAIN_12_15, %%CIPHER_PLAIN_12_15, %%ZT4
204 ;; write plain text back to output
206 ZMM_STORE_BLOCKS_0_16_OFFSET %%num_final_blocks, %%PLAIN_OUT, \
207 OFFSET, %%CIPHER_PLAIN_0_3, %%CIPHER_PLAIN_4_7, \
208 %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_12_15
210 ZMM_STORE_BLOCKS_0_16 %%num_final_blocks, %%PLAIN_OUT, 0, \
211 %%CIPHER_PLAIN_0_3, %%CIPHER_PLAIN_4_7, \
212 %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_12_15
215 %endmacro ; FINAL_BLOCKS
217 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
218 ;;; Main AES-CBC decrypt macro
219 ;;; - operates on single stream
220 ;;; - decrypts 16 blocks at a time
221 %macro DECRYPT_16_PARALLEL 14
222 %define %%PLAIN_OUT %1 ; [in] output buffer
223 %define %%CIPH_IN %2 ; [in] input buffer
224 %define %%LENGTH %3 ; [in/out] number of bytes to process
225 %define %%LAST_CIPH_BLK %4 ; [in/out] ZMM with IV (first block) or last cipher block (idx 3)
226 %define %%CIPHER_PLAIN_0_3 %5 ; [out] ZMM next 0-3 cipher blocks
227 %define %%CIPHER_PLAIN_4_7 %6 ; [out] ZMM next 4-7 cipher blocks
228 %define %%CIPHER_PLAIN_8_11 %7 ; [out] ZMM next 8-11 cipher blocks
229 %define %%CIPHER_PLAIN_12_15 %8 ; [out] ZMM next 12-15 cipher blocks
230 %define %%ZT1 %9 ; [clobbered] ZMM temporary
231 %define %%ZT2 %10 ; [clobbered] ZMM temporary
232 %define %%ZT3 %11 ; [clobbered] ZMM temporary
233 %define %%ZT4 %12 ; [clobbered] ZMM temporary
234 %define %%NROUNDS %13 ; [in] number of rounds; numerical value
235 %define %%IA0 %14 ; [clobbered] GP temporary
238 ZMM_LOAD_BLOCKS_0_16_OFFSET 16, %%CIPH_IN, OFFSET, \
239 %%CIPHER_PLAIN_0_3, %%CIPHER_PLAIN_4_7, \
240 %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_12_15
242 vmovdqu8 %%CIPHER_PLAIN_0_3, [%%CIPH_IN]
243 vmovdqu8 %%CIPHER_PLAIN_4_7, [%%CIPH_IN + 64]
244 vmovdqu8 %%CIPHER_PLAIN_8_11, [%%CIPH_IN + 128]
245 vmovdqu8 %%CIPHER_PLAIN_12_15, [%%CIPH_IN + 192]
247 ;; prepare first set of cipher blocks for later XOR'ing
248 valignq %%ZT1, %%CIPHER_PLAIN_0_3, %%LAST_CIPH_BLK, 6
249 valignq %%ZT2, %%CIPHER_PLAIN_4_7, %%CIPHER_PLAIN_0_3, 6
250 valignq %%ZT3, %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_4_7, 6
251 valignq %%ZT4, %%CIPHER_PLAIN_12_15, %%CIPHER_PLAIN_8_11, 6
253 ;; store last cipher text block to be used for next 16 blocks
254 vmovdqa64 %%LAST_CIPH_BLK, %%CIPHER_PLAIN_12_15
259 ZMM_AESDEC_ROUND_BLOCKS_0_16 %%CIPHER_PLAIN_0_3, %%CIPHER_PLAIN_4_7, \
260 %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_12_15, \
261 ZKEY %+ j, j, no_data, no_data, no_data, no_data, \
266 ;; XOR with decrypted blocks to get plain text
267 vpxorq %%CIPHER_PLAIN_0_3, %%CIPHER_PLAIN_0_3, %%ZT1
268 vpxorq %%CIPHER_PLAIN_4_7, %%CIPHER_PLAIN_4_7, %%ZT2
269 vpxorq %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_8_11, %%ZT3
270 vpxorq %%CIPHER_PLAIN_12_15, %%CIPHER_PLAIN_12_15, %%ZT4
272 ;; write plain text back to output
274 ZMM_STORE_BLOCKS_0_16_OFFSET 16, %%PLAIN_OUT, OFFSET, \
275 %%CIPHER_PLAIN_0_3, %%CIPHER_PLAIN_4_7, \
276 %%CIPHER_PLAIN_8_11, %%CIPHER_PLAIN_12_15
278 vmovdqu8 [%%PLAIN_OUT], %%CIPHER_PLAIN_0_3
279 vmovdqu8 [%%PLAIN_OUT + 64], %%CIPHER_PLAIN_4_7
280 vmovdqu8 [%%PLAIN_OUT + 128], %%CIPHER_PLAIN_8_11
281 vmovdqu8 [%%PLAIN_OUT + 192], %%CIPHER_PLAIN_12_15
283 ;; adjust input pointer and length
284 sub %%LENGTH, (16 * 16)
285 add %%CIPH_IN, (16 * OFFSET)
286 add %%PLAIN_OUT, (16 * OFFSET)
288 %endmacro ; DECRYPT_16_PARALLEL
290 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
291 ;;; AES_CBC_DEC macro decrypts given data.
293 ;;; - Decrypt all blocks (multiple of 16) up to final 1-15 blocks
294 ;;; - Decrypt final blocks (1-15 blocks)
295 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
297 %define %%CIPH_IN %1 ;; [in] pointer to input buffer
298 %define %%PLAIN_OUT %2 ;; [in] pointer to output buffer
299 %define %%KEYS %3 ;; [in] pointer to expanded keys
300 %define %%IV %4 ;; [in] pointer to IV
301 %define %%LENGTH %5 ;; [in/out] GP register with length in bytes
302 %define %%NROUNDS %6 ;; [in] Number of AES rounds; numerical value
303 %define %%TMP %7 ;; [clobbered] GP register
308 vinserti64x2 zIV, zIV, [%%IV], 3
311 LOAD_KEYS %%KEYS, %%NROUNDS
313 %%decrypt_16_parallel:
317 DECRYPT_16_PARALLEL %%PLAIN_OUT, %%CIPH_IN, %%LENGTH, zIV, \
318 zBLK_0_3, zBLK_4_7, zBLK_8_11, zBLK_12_15, \
319 zTMP0, zTMP1, zTMP2, zTMP3, %%NROUNDS, %%TMP
320 jmp %%decrypt_16_parallel
323 ;; get num final blocks
329 je %%final_num_blocks_is_8
330 jl %%final_blocks_is_1_7
334 je %%final_num_blocks_is_12
335 jl %%final_blocks_is_9_11
339 je %%final_num_blocks_is_15
341 je %%final_num_blocks_is_14
343 je %%final_num_blocks_is_13
345 %%final_blocks_is_9_11:
347 je %%final_num_blocks_is_11
349 je %%final_num_blocks_is_10
351 je %%final_num_blocks_is_9
353 %%final_blocks_is_1_7:
355 je %%final_num_blocks_is_4
356 jl %%final_blocks_is_1_3
360 je %%final_num_blocks_is_7
362 je %%final_num_blocks_is_6
364 je %%final_num_blocks_is_5
366 %%final_blocks_is_1_3:
368 je %%final_num_blocks_is_3
370 je %%final_num_blocks_is_2
371 jmp %%final_num_blocks_is_1
374 %%final_num_blocks_is_15:
375 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 15, zBLK_0_3, zBLK_4_7, \
376 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
380 %%final_num_blocks_is_14:
381 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 14, zBLK_0_3, zBLK_4_7, \
382 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
386 %%final_num_blocks_is_13:
387 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 13, zBLK_0_3, zBLK_4_7, \
388 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
392 %%final_num_blocks_is_12:
393 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 12, zBLK_0_3, zBLK_4_7, \
394 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
398 %%final_num_blocks_is_11:
399 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 11, zBLK_0_3, zBLK_4_7, \
400 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
404 %%final_num_blocks_is_10:
405 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 10, zBLK_0_3, zBLK_4_7, \
406 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
410 %%final_num_blocks_is_9:
411 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 9, zBLK_0_3, zBLK_4_7, \
412 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
416 %%final_num_blocks_is_8:
417 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 8, zBLK_0_3, zBLK_4_7, \
418 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
422 %%final_num_blocks_is_7:
423 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 7, zBLK_0_3, zBLK_4_7, \
424 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
428 %%final_num_blocks_is_6:
429 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 6, zBLK_0_3, zBLK_4_7, \
430 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
434 %%final_num_blocks_is_5:
435 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 5, zBLK_0_3, zBLK_4_7, \
436 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
440 %%final_num_blocks_is_4:
441 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 4, zBLK_0_3, zBLK_4_7, \
442 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
446 %%final_num_blocks_is_3:
447 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 3, zBLK_0_3, zBLK_4_7, \
448 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
452 %%final_num_blocks_is_2:
453 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 2, zBLK_0_3, zBLK_4_7, \
454 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
458 %%final_num_blocks_is_1:
459 FINAL_BLOCKS %%PLAIN_OUT, %%CIPH_IN, zIV, 1, zBLK_0_3, zBLK_4_7, \
460 zBLK_8_11, zBLK_12_15, zTMP0, zTMP1, zTMP2, zTMP3, \
466 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
467 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
468 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
473 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
474 ;; aes_cbc_dec_128_vaes_avx512(void *in, void *IV, void *keys, void *out, UINT64 num_bytes)
475 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
476 mk_global aes_cbc_dec_128_vaes_avx512,function,internal
477 aes_cbc_dec_128_vaes_avx512:
479 %ifidn __OUTPUT_FORMAT__, win64
480 mov num_bytes, [rsp + 8*5]
482 AES_CBC_DEC p_in, p_out, p_keys, p_IV, num_bytes, 9, tmp
486 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
487 ;; aes_cbc_dec_192_vaes_avx512(void *in, void *IV, void *keys, void *out, UINT64 num_bytes)
488 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
489 mk_global aes_cbc_dec_192_vaes_avx512,function,internal
490 aes_cbc_dec_192_vaes_avx512:
492 %ifidn __OUTPUT_FORMAT__, win64
493 mov num_bytes, [rsp + 8*5]
495 AES_CBC_DEC p_in, p_out, p_keys, p_IV, num_bytes, 11, tmp
499 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
500 ;; aes_cbc_dec_256_vaes_avx512(void *in, void *IV, void *keys, void *out, UINT64 num_bytes)
501 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
502 mk_global aes_cbc_dec_256_vaes_avx512,function,internal
503 aes_cbc_dec_256_vaes_avx512:
505 %ifidn __OUTPUT_FORMAT__, win64
506 mov num_bytes, [rsp + 8*5]
508 AES_CBC_DEC p_in, p_out, p_keys, p_IV, num_bytes, 13, tmp
514 %else ; Assembler doesn't understand these opcodes. Add empty symbol for windows.
515 %ifidn __OUTPUT_FORMAT__, win64
516 global no_aes_cbc_dec_256_vaes_avx512
517 no_aes_cbc_dec_256_vaes_avx512:
519 %endif ; (AS_FEATURE_LEVEL) >= 10