summaryrefslogtreecommitdiffstats
path: root/crypto/loongarch64cpuid.pl
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-11-26 19:49:48 +0800
committerTomas Mraz <tomas@openssl.org>2023-12-19 18:34:34 +0100
commita607546e6e4e2f96df707324fe892342594cd7ff (patch)
tree413ac8771ccc411fa1dbb036343152d483615bd6 /crypto/loongarch64cpuid.pl
parenta8df5651153e8e81fbaa8408dd1137232168997d (diff)
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 <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22823)
Diffstat (limited to 'crypto/loongarch64cpuid.pl')
-rw-r--r--crypto/loongarch64cpuid.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/loongarch64cpuid.pl b/crypto/loongarch64cpuid.pl
index d16a8e98f2..8a84caca92 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
___
}