1
0
mirror of https://github.com/golang/go synced 2024-11-22 20:24:47 -07:00

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 <mzh@golangcn.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
Meng Zhuo 2021-07-06 07:17:07 +00:00
parent 8e18428e38
commit 946e2543f8

View File

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