diff options
author | Joel Sing <joel@sing.id.au> | 2020-05-05 03:15:58 +1000 |
---|---|---|
committer | Joel Sing <joel@sing.id.au> | 2020-08-16 13:55:00 +0000 |
commit | cf9b4f63a57b4360be700831781885fc6cf5a0b1 (patch) | |
tree | af4e8241bc0ffb35b64d31adb3d7c953dd4a79c5 /src/runtime/asm_riscv64.s | |
parent | b6ad2880323191713a5525bae5eb27d62c1d1c35 (diff) | |
download | go-cf9b4f63a57b4360be700831781885fc6cf5a0b1.tar.gz go-cf9b4f63a57b4360be700831781885fc6cf5a0b1.zip |
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 <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/asm_riscv64.s')
-rw-r--r-- | src/runtime/asm_riscv64.s | 2 |
1 files changed, 1 insertions, 1 deletions
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 |