diff --git a/crypto/fipsmodule/bn/asm/rsaz-2k-avx512.pl b/crypto/fipsmodule/bn/asm/rsaz-2k-avx512.pl index 9cd78cd374..bf62fc19f0 100644 --- a/crypto/fipsmodule/bn/asm/rsaz-2k-avx512.pl +++ b/crypto/fipsmodule/bn/asm/rsaz-2k-avx512.pl @@ -82,10 +82,10 @@ ############################################################################### # void rsaz_amm52x20_x1_ifma256(BN_ULONG *res, -# const BN_ULONG *a, -# const BN_ULONG *b, -# const BN_ULONG *m, -# BN_ULONG k0); +# const BN_ULONG *a, +# const BN_ULONG *b, +# const BN_ULONG *m, +# BN_ULONG k0); ############################################################################### { # input parameters @@ -289,6 +289,7 @@ sub amm52x20_x1_norm { } $code.=<<___; +#ifndef MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX .text .globl rsaz_amm52x20_x1_ifma256 @@ -675,8 +676,13 @@ sub amm52x20_x1_norm { .byte 9,0,0,0 .rva rsaz_def_handler .rva .Lrsaz_amm52x20_x2_ifma256_body,.Lrsaz_amm52x20_x2_ifma256_epilogue + +#endif ___ +} else { +$code.="#endif"; } + }}} else {{{ # fallback for old assembler $code.=<<___; .text @@ -690,6 +696,8 @@ sub amm52x20_x1_norm { .byte 0x0f,0x0b # ud2 ret .size rsaz_amm52x20_x1_ifma256, .-rsaz_amm52x20_x1_ifma256 + +#endif ___ }}} diff --git a/crypto/fipsmodule/bn/asm/rsaz-3k-avx512.pl b/crypto/fipsmodule/bn/asm/rsaz-3k-avx512.pl index cf62e1e972..6539e3a823 100644 --- a/crypto/fipsmodule/bn/asm/rsaz-3k-avx512.pl +++ b/crypto/fipsmodule/bn/asm/rsaz-3k-avx512.pl @@ -80,10 +80,10 @@ ############################################################################### # void rsaz_amm52x30_x1_ifma256(BN_ULONG *res, -# const BN_ULONG *a, -# const BN_ULONG *b, -# const BN_ULONG *m, -# BN_ULONG k0); +# const BN_ULONG *a, +# const BN_ULONG *b, +# const BN_ULONG *m, +# BN_ULONG k0); ############################################################################### { # input parameters @@ -352,6 +352,7 @@ sub amm52x30_x1_norm { } $code.=<<___; +#ifndef MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX .text .globl rsaz_amm52x30_x1_ifma256 @@ -484,10 +485,10 @@ sub amm52x30_x1_norm { ############################################################################### # void rsaz_amm52x30_x2_ifma256(BN_ULONG out[2][32], -# const BN_ULONG a[2][32], -# const BN_ULONG b[2][32], -# const BN_ULONG m[2][32], -# const BN_ULONG k0[2]); +# const BN_ULONG a[2][32], +# const BN_ULONG b[2][32], +# const BN_ULONG m[2][32], +# const BN_ULONG k0[2]); ############################################################################### $code.=<<___; @@ -630,8 +631,8 @@ sub amm52x30_x1_norm { ############################################################################### # void extract_multiplier_2x30_win5(BN_ULONG *red_Y, -# const BN_ULONG red_table[1 << EXP_WIN_SIZE][2][32], -# int red_table_idx1, int red_table_idx2); +# const BN_ULONG red_table[1 << EXP_WIN_SIZE][2][32], +# int red_table_idx1, int red_table_idx2); # ############################################################################### { @@ -829,8 +830,13 @@ sub amm52x30_x1_norm { .byte 9,0,0,0 .rva rsaz_avx_handler .rva .Lrsaz_amm52x30_x2_ifma256_body,.Lrsaz_amm52x30_x2_ifma256_epilogue + +#endif ___ +} else { +$code.="#endif"; } + }}} else {{{ # fallback for old assembler $code.=<<___; .text @@ -845,6 +851,8 @@ sub amm52x30_x1_norm { .byte 0x0f,0x0b # ud2 ret .size rsaz_amm52x30_x1_ifma256, .-rsaz_amm52x30_x1_ifma256 + +#endif ___ }}} diff --git a/crypto/fipsmodule/bn/asm/rsaz-4k-avx512.pl b/crypto/fipsmodule/bn/asm/rsaz-4k-avx512.pl index 1580aff1ed..c8c773af6a 100644 --- a/crypto/fipsmodule/bn/asm/rsaz-4k-avx512.pl +++ b/crypto/fipsmodule/bn/asm/rsaz-4k-avx512.pl @@ -80,10 +80,10 @@ ############################################################################### # void rsaz_amm52x40_x1_ifma256(BN_ULONG *res, -# const BN_ULONG *a, -# const BN_ULONG *b, -# const BN_ULONG *m, -# BN_ULONG k0); +# const BN_ULONG *a, +# const BN_ULONG *b, +# const BN_ULONG *m, +# BN_ULONG k0); ############################################################################### { # input parameters @@ -394,6 +394,7 @@ sub amm52x40_x1_norm { } $code.=<<___; +#ifndef MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX .text .globl rsaz_amm52x40_x1_ifma256 @@ -528,10 +529,10 @@ sub amm52x40_x1_norm { ############################################################################### # void rsaz_amm52x40_x2_ifma256(BN_ULONG out[2][40], -# const BN_ULONG a[2][40], -# const BN_ULONG b[2][40], -# const BN_ULONG m[2][40], -# const BN_ULONG k0[2]); +# const BN_ULONG a[2][40], +# const BN_ULONG b[2][40], +# const BN_ULONG m[2][40], +# const BN_ULONG k0[2]); ############################################################################### $code.=<<___; @@ -682,8 +683,8 @@ sub amm52x40_x1_norm { ############################################################################### # void extract_multiplier_2x40_win5(BN_ULONG *red_Y, -# const BN_ULONG red_table[1 << EXP_WIN_SIZE][2][40], -# int red_table_idx1, int red_table_idx2); +# const BN_ULONG red_table[1 << EXP_WIN_SIZE][2][40], +# int red_table_idx1, int red_table_idx2); # ############################################################################### { @@ -891,8 +892,13 @@ () .byte 9,0,0,0 .rva rsaz_avx_handler .rva .Lrsaz_amm52x40_x2_ifma256_body,.Lrsaz_amm52x40_x2_ifma256_epilogue + +#endif ___ +} else { +$code.="#endif"; } + }}} else {{{ # fallback for old assembler $code.=<<___; .text @@ -907,6 +913,8 @@ () .byte 0x0f,0x0b # ud2 ret .size rsaz_amm52x40_x1_ifma256, .-rsaz_amm52x40_x1_ifma256 + +#endif ___ }}} diff --git a/generated-src/linux-x86_64/crypto/fipsmodule/rsaz-2k-avx512.S b/generated-src/linux-x86_64/crypto/fipsmodule/rsaz-2k-avx512.S index 87aa497a08..063b176bf5 100644 --- a/generated-src/linux-x86_64/crypto/fipsmodule/rsaz-2k-avx512.S +++ b/generated-src/linux-x86_64/crypto/fipsmodule/rsaz-2k-avx512.S @@ -4,6 +4,7 @@ #include #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && defined(__ELF__) +#ifndef MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX .text .globl rsaz_amm52x20_x1_ifma256 @@ -893,3 +894,4 @@ extract_multiplier_2x20_win5: .quad 0,0,0,0 .text #endif +#endif diff --git a/generated-src/linux-x86_64/crypto/fipsmodule/rsaz-3k-avx512.S b/generated-src/linux-x86_64/crypto/fipsmodule/rsaz-3k-avx512.S index 77f57ef9d5..3658c0df43 100644 --- a/generated-src/linux-x86_64/crypto/fipsmodule/rsaz-3k-avx512.S +++ b/generated-src/linux-x86_64/crypto/fipsmodule/rsaz-3k-avx512.S @@ -4,6 +4,7 @@ #include #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && defined(__ELF__) +#ifndef MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX .text .globl rsaz_amm52x30_x1_ifma256 @@ -1320,3 +1321,4 @@ extract_multiplier_2x30_win5: .quad 0,0,0,0 .text #endif +#endif diff --git a/generated-src/linux-x86_64/crypto/fipsmodule/rsaz-4k-avx512.S b/generated-src/linux-x86_64/crypto/fipsmodule/rsaz-4k-avx512.S index bf8f90acda..4ea2e7fb35 100644 --- a/generated-src/linux-x86_64/crypto/fipsmodule/rsaz-4k-avx512.S +++ b/generated-src/linux-x86_64/crypto/fipsmodule/rsaz-4k-avx512.S @@ -4,6 +4,7 @@ #include #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && defined(__ELF__) +#ifndef MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX .text .globl rsaz_amm52x40_x1_ifma256 @@ -1363,3 +1364,4 @@ extract_multiplier_2x40_win5: .quad 0,0,0,0 .text #endif +#endif diff --git a/generated-src/mac-x86_64/crypto/fipsmodule/rsaz-2k-avx512.S b/generated-src/mac-x86_64/crypto/fipsmodule/rsaz-2k-avx512.S index 9346cc93b9..ca665b1b84 100644 --- a/generated-src/mac-x86_64/crypto/fipsmodule/rsaz-2k-avx512.S +++ b/generated-src/mac-x86_64/crypto/fipsmodule/rsaz-2k-avx512.S @@ -4,6 +4,7 @@ #include #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && defined(__APPLE__) +#ifndef MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX .text .globl _rsaz_amm52x20_x1_ifma256 @@ -881,3 +882,4 @@ L$zeros: .quad 0,0,0,0 .text #endif +#endif diff --git a/generated-src/mac-x86_64/crypto/fipsmodule/rsaz-3k-avx512.S b/generated-src/mac-x86_64/crypto/fipsmodule/rsaz-3k-avx512.S index 9ec398245c..6107ac5f7a 100644 --- a/generated-src/mac-x86_64/crypto/fipsmodule/rsaz-3k-avx512.S +++ b/generated-src/mac-x86_64/crypto/fipsmodule/rsaz-3k-avx512.S @@ -4,6 +4,7 @@ #include #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && defined(__APPLE__) +#ifndef MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX .text .globl _rsaz_amm52x30_x1_ifma256 @@ -1308,3 +1309,4 @@ L$zeros: .quad 0,0,0,0 .text #endif +#endif diff --git a/generated-src/mac-x86_64/crypto/fipsmodule/rsaz-4k-avx512.S b/generated-src/mac-x86_64/crypto/fipsmodule/rsaz-4k-avx512.S index 7cd78de975..93e1fee01d 100644 --- a/generated-src/mac-x86_64/crypto/fipsmodule/rsaz-4k-avx512.S +++ b/generated-src/mac-x86_64/crypto/fipsmodule/rsaz-4k-avx512.S @@ -4,6 +4,7 @@ #include #if !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86_64) && defined(__APPLE__) +#ifndef MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX .text .globl _rsaz_amm52x40_x1_ifma256 @@ -1351,3 +1352,4 @@ L$zeros: .quad 0,0,0,0 .text #endif +#endif diff --git a/generated-src/win-x86_64/crypto/fipsmodule/rsaz-2k-avx512.asm b/generated-src/win-x86_64/crypto/fipsmodule/rsaz-2k-avx512.asm index 94ba2d6f79..8fb1c9d724 100644 --- a/generated-src/win-x86_64/crypto/fipsmodule/rsaz-2k-avx512.asm +++ b/generated-src/win-x86_64/crypto/fipsmodule/rsaz-2k-avx512.asm @@ -9,6 +9,7 @@ default rel %define _CET_ENDBR %include "openssl/boringssl_prefix_symbols_nasm.inc" +%ifndef MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX section .text code align=64 @@ -1021,6 +1022,8 @@ $L$SEH_info_rsaz_amm52x20_x2_ifma256: DB 9,0,0,0 DD rsaz_def_handler wrt ..imagebase DD $L$rsaz_amm52x20_x2_ifma256_body wrt ..imagebase,$L$rsaz_amm52x20_x2_ifma256_epilogue wrt ..imagebase + +%endif %else ; Work around https://bugzilla.nasm.us/show_bug.cgi?id=3392738 ret diff --git a/generated-src/win-x86_64/crypto/fipsmodule/rsaz-3k-avx512.asm b/generated-src/win-x86_64/crypto/fipsmodule/rsaz-3k-avx512.asm index 68b2e7e831..bf8bc7d9c2 100644 --- a/generated-src/win-x86_64/crypto/fipsmodule/rsaz-3k-avx512.asm +++ b/generated-src/win-x86_64/crypto/fipsmodule/rsaz-3k-avx512.asm @@ -9,6 +9,7 @@ default rel %define _CET_ENDBR %include "openssl/boringssl_prefix_symbols_nasm.inc" +%ifndef MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX section .text code align=64 @@ -1499,6 +1500,8 @@ $L$SEH_info_rsaz_amm52x30_x2_ifma256: DB 9,0,0,0 DD rsaz_avx_handler wrt ..imagebase DD $L$rsaz_amm52x30_x2_ifma256_body wrt ..imagebase,$L$rsaz_amm52x30_x2_ifma256_epilogue wrt ..imagebase + +%endif %else ; Work around https://bugzilla.nasm.us/show_bug.cgi?id=3392738 ret diff --git a/generated-src/win-x86_64/crypto/fipsmodule/rsaz-4k-avx512.asm b/generated-src/win-x86_64/crypto/fipsmodule/rsaz-4k-avx512.asm index aab641adee..08523a304e 100644 --- a/generated-src/win-x86_64/crypto/fipsmodule/rsaz-4k-avx512.asm +++ b/generated-src/win-x86_64/crypto/fipsmodule/rsaz-4k-avx512.asm @@ -9,6 +9,7 @@ default rel %define _CET_ENDBR %include "openssl/boringssl_prefix_symbols_nasm.inc" +%ifndef MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX section .text code align=64 @@ -1542,6 +1543,8 @@ $L$SEH_info_rsaz_amm52x40_x2_ifma256: DB 9,0,0,0 DD rsaz_avx_handler wrt ..imagebase DD $L$rsaz_amm52x40_x2_ifma256_body wrt ..imagebase,$L$rsaz_amm52x40_x2_ifma256_epilogue wrt ..imagebase + +%endif %else ; Work around https://bugzilla.nasm.us/show_bug.cgi?id=3392738 ret