|
1 | 1 | // This file is generated from a similarly-named Perl script in the BoringSSL
|
2 | 2 | // source tree. Do not edit by hand.
|
3 | 3 |
|
4 |
| -#include <openssl/asm_base.h> |
| 4 | +#if defined(__x86_64__) && defined(HAVE_AVX) && \ |
| 5 | + defined(HAVE_VAES) && defined(HAVE_VPCLMULQDQ) |
| 6 | + |
| 7 | +#define _ASM |
| 8 | +#include <sys/asm_linkage.h> |
| 9 | + |
| 10 | +/* Windows userland links with OpenSSL */ |
| 11 | +#if !defined (_WIN32) || defined (_KERNEL) |
| 12 | + |
| 13 | +#ifndef _CET_ENDBR |
| 14 | +#define _CET_ENDBR |
| 15 | +#endif |
5 | 16 |
|
6 |
| -#if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && defined(__ELF__) |
7 | 17 | .section .rodata
|
8 | 18 | .align 16
|
9 | 19 |
|
@@ -381,8 +391,8 @@ _CET_ENDBR
|
381 | 391 |
|
382 | 392 |
|
383 | 393 |
|
384 |
| - movl 240(%rcx),%r10d |
385 |
| - leal -20(,%r10,4),%r10d |
| 394 | + movl 504-128(%rcx),%r10d // ICP has a larger offset for rounds. |
| 395 | + leal -16(,%r10,4),%r10d // ICP uses 10,12,14 not 9,11,13 for rounds. |
386 | 396 |
|
387 | 397 |
|
388 | 398 |
|
@@ -917,8 +927,8 @@ _CET_ENDBR
|
917 | 927 |
|
918 | 928 |
|
919 | 929 |
|
920 |
| - movl 240(%rcx),%r10d |
921 |
| - leal -20(,%r10,4),%r10d |
| 930 | + movl 504-128(%rcx),%r10d // ICP has a larger offset for rounds. |
| 931 | + leal -16(,%r10,4),%r10d // ICP uses 10,12,14 not 9,11,13 for rounds. |
922 | 932 |
|
923 | 933 |
|
924 | 934 |
|
@@ -1315,4 +1325,12 @@ _CET_ENDBR
|
1315 | 1325 |
|
1316 | 1326 | .cfi_endproc
|
1317 | 1327 | .size aes_gcm_dec_update_vaes_avx2, . - aes_gcm_dec_update_vaes_avx2
|
| 1328 | + |
| 1329 | +#endif /* !_WIN32 || _KERNEL */ |
| 1330 | + |
| 1331 | +/* Mark the stack non-executable. */ |
| 1332 | +#if defined(__linux__) && defined(__ELF__) |
| 1333 | +.section .note.GNU-stack,"",%progbits |
1318 | 1334 | #endif
|
| 1335 | + |
| 1336 | +#endif /* defined(__x86_64__) && defined(HAVE_AVX) && defined(HAVE_AES) ... */ |
0 commit comments