diff options
author | fangming.fang <fangming.fang@arm.com> | 2021-12-24 08:29:04 +0000 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-11-09 15:31:30 +0100 |
commit | 654490cebf8ee6bd0da1f801b10206607869e623 (patch) | |
tree | 84b86c4f5ceed06287bb3cc432e5eba8a3b40a40 /crypto/arm64cpuid.pl | |
parent | 4c4ac7c7ddb096ca55e231bdc4f70a868746f1e4 (diff) |
SM3 acceleration with SM3 hardware instruction on aarch64
SM3 hardware instruction is optional feature of crypto extension for
aarch64. This implementation accelerates SM3 via SM3 instructions. For
the platform not supporting SM3 instruction, the original C
implementation still works. Thanks to AliBaba for testing and reporting
the following perf numbers for Yitian710:
Benchmark on T-Head Yitian-710 2.75GHz:
Before:
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
sm3 49297.82k 121062.63k 223106.05k 283371.52k 307574.10k 309400.92k
After (33% - 74% faster):
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
sm3 65640.01k 179121.79k 359854.59k 481448.96k 534055.59k 538274.47k
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17454)
(cherry picked from commit 71396cd048072b69559b46d98cfebfd4474cd712)
Diffstat (limited to 'crypto/arm64cpuid.pl')
-rwxr-xr-x | crypto/arm64cpuid.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/arm64cpuid.pl b/crypto/arm64cpuid.pl index a86fa6073a..b30f505339 100755 --- a/crypto/arm64cpuid.pl +++ b/crypto/arm64cpuid.pl @@ -96,6 +96,14 @@ _armv8_cpuid_probe: ret .size _armv8_cpuid_probe,.-_armv8_cpuid_probe +.globl _armv8_sm3_probe +.type _armv8_sm3_probe,%function +_armv8_sm3_probe: + AARCH64_VALID_CALL_TARGET + .long 0xce63c004 // sm3partw1 v4.4s, v0.4s, v3.4s + ret +.size _armv8_sm3_probe,.-_armv8_sm3_probe + .globl OPENSSL_cleanse .type OPENSSL_cleanse,%function .align 5 |