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: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
This commit is contained in:
Xi Ruoyao 2023-12-09 15:49:15 +08:00 committed by Huacai Chen
parent eea673e9d5
commit 8146c5b349

View File

@ -1098,12 +1098,11 @@
static __always_inline u64 drdtime(void)
{
int rID = 0;
u64 val = 0;
__asm__ __volatile__(
"rdtime.d %0, %1 \n\t"
: "=r"(val), "=r"(rID)
"rdtime.d %0, $zero\n\t"
: "=r"(val)
:
);
return val;