Commit 8146c5b3 authored by Xi Ruoyao's avatar Xi Ruoyao Committed by Huacai Chen

LoongArch: Slightly clean up drdtime()

As we are just discarding the stable clock ID, simply write it into
$zero instead of allocating a temporary register.
Signed-off-by: default avatarXi Ruoyao <xry111@xry111.site>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent eea673e9
...@@ -1098,12 +1098,11 @@ ...@@ -1098,12 +1098,11 @@
static __always_inline u64 drdtime(void) static __always_inline u64 drdtime(void)
{ {
int rID = 0;
u64 val = 0; u64 val = 0;
__asm__ __volatile__( __asm__ __volatile__(
"rdtime.d %0, %1 \n\t" "rdtime.d %0, $zero\n\t"
: "=r"(val), "=r"(rID) : "=r"(val)
: :
); );
return val; return val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment