From 946e2543f878929752da9d16575dd5e96ac78532 Mon Sep 17 00:00:00 2001 From: Meng Zhuo Date: Tue, 6 Jul 2021 07:17:07 +0000 Subject: [PATCH] runtime: use RDCYCLE for cputicks on riscv64 Use RDCYCLE instruction instead of RDTIME emulation Change-Id: Id7b3de42a36d2d1b163c39cc79870eee7c840ad5 Reviewed-on: https://go-review.googlesource.com/c/go/+/332954 Trust: Meng Zhuo Reviewed-by: Cherry Mui --- 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 d7ab90d1abf..531b46927c9 100644 --- a/src/runtime/asm_riscv64.s +++ b/src/runtime/asm_riscv64.s @@ -81,7 +81,7 @@ TEXT setg_gcc<>(SB),NOSPLIT,$0-0 // func cputicks() int64 TEXT runtime·cputicks(SB),NOSPLIT,$0-8 - RDTIME A0 + RDCYCLE A0 MOV A0, ret+0(FP) RET