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)
This commit is contained in:
Xi Ruoyao 2023-11-26 19:49:48 +08:00 committed by Tomas Mraz
parent a8df565115
commit a607546e6e

View File

@ -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
___
}