From cf9b4f63a57b4360be700831781885fc6cf5a0b1 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Tue, 5 May 2020 03:15:58 +1000 Subject: [PATCH] runtime: use riscv64 RDTIME instruction Use the actual RDTIME instruction, rather than a WORD. Generated code is the same. Change-Id: I6f6f5a1836eae2d05af34d4a22db2ede4fdcb458 Reviewed-on: https://go-review.googlesource.com/c/go/+/231997 Reviewed-by: Cherry Zhang Run-TryBot: Cherry Zhang TryBot-Result: Gobot Gobot --- src/runtime/asm_riscv64.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/asm_riscv64.s b/src/runtime/asm_riscv64.s index d7c45a183d..8f6c8773eb 100644 --- a/src/runtime/asm_riscv64.s +++ b/src/runtime/asm_riscv64.s @@ -79,7 +79,7 @@ TEXT setg_gcc<>(SB),NOSPLIT,$0-0 // func cputicks() int64 TEXT runtime·cputicks(SB),NOSPLIT,$0-8 - WORD $0xc0102573 // rdtime a0 + RDTIME A0 MOV A0, ret+0(FP) RET -- 2.50.0