From: Joel Sing Date: Mon, 4 May 2020 17:15:58 +0000 (+1000) Subject: runtime: use riscv64 RDTIME instruction X-Git-Tag: go1.16beta1~1348 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=cf9b4f63a57b4360be700831781885fc6cf5a0b1;p=gostls13.git 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 --- 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