From: Xi Ruoyao Date: Sun, 26 Nov 2023 11:49:48 +0000 (+0800) Subject: LoongArch64 assembly pack: Really implement OPENSSL_rdtsc X-Git-Tag: openssl-3.3.0-alpha1~452 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a607546e6e4e2f96df707324fe892342594cd7ff;p=thirdparty%2Fopenssl.git LoongArch64 assembly pack: Really implement OPENSSL_rdtsc LoongArch [rdtimel.w][1] instruction reads the low 32 bits of the 64-bit stable counter, implement OPENSSL_rdtsc with it instead of always returning 0. [1]:https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#_rdtimelh_w_rdtime_d Reviewed-by: Hugo Landau Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/22823) --- diff --git a/crypto/loongarch64cpuid.pl b/crypto/loongarch64cpuid.pl index d16a8e98f22..8a84caca923 100644 --- a/crypto/loongarch64cpuid.pl +++ b/crypto/loongarch64cpuid.pl @@ -101,8 +101,8 @@ $code.=<<___; .globl OPENSSL_rdtsc .type OPENSSL_rdtsc,\@function OPENSSL_rdtsc: - move $a0,$zero - jr $ra + rdtimel.w $a0,$zero + jr $ra ___ }