Add SM2 implementation in generic riscv64 asm

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/25918)
This commit is contained in:
geliyaz 2025-07-02 15:33:08 +08:00 committed by slontis
parent ddee212bab
commit 05301b100f
2 changed files with 1318 additions and 0 deletions

File diff suppressed because it is too large Load diff

View file

@ -59,6 +59,14 @@ IF[{- !$disabled{asm} -}]
$ECASM_c64xplus=
IF[{- !$disabled{'sm2'} -}]
$ECASM_riscv64=ecp_sm2p256.c ecp_sm2p256-riscv64.S
IF[{- !$disabled{'sm2-precomp'} -}]
$ECASM_riscv64=$ECASM_riscv64 ecp_sm2p256_table.c
ENDIF
$ECDEF_riscv64=ECP_SM2P256_ASM
ENDIF
# Now that we have defined all the arch specific variables, use the
# appropriate one, and define the appropriate macros
IF[$ECASM_{- $target{asm_arch} -}]
@ -139,3 +147,8 @@ IF[{- !$disabled{'sm2'} -}]
GENERATE[ecp_sm2p256-armv8.S]=asm/ecp_sm2p256-armv8.pl
INCLUDE[ecp_sm2p256-armv8.o]=..
ENDIF
IF[{- !$disabled{'sm2'} -}]
GENERATE[ecp_sm2p256-riscv64.S]=asm/ecp_sm2p256-riscv64.pl
INCLUDE[ecp_sm2p256-riscv64.o]=..
ENDIF