]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.17] runtime: on windows, read nanotime with one instruction or...
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 3 Nov 2021 17:19:04 +0000 (18:19 +0100)
committerHeschi Kreinick <heschi@google.com>
Wed, 24 Nov 2021 19:33:56 +0000 (19:33 +0000)
commite347c89598d502dd82a3dbfc93c7d004e6d91f9d
tree1fd1324f9d40b213c7741e509b82e98febfecde1
parent1c05b9b02441f95cce82bed971b7a2204e8bbf6d
[release-branch.go1.17] runtime: on windows, read nanotime with one instruction or issue barrier

On 64-bit, this is more efficient, and on ARM64, this prevents the time
from moving backwards due to the weaker memory model. On ARM32 due to
the weaker memory model, we issue a memory barrier.

Updates #48072.
Updates #49369.

Change-Id: If4695716c3039d8af14e14808af217f5c99fc93a
Reviewed-on: https://go-review.googlesource.com/c/go/+/361057
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/361475
Reviewed-by: Patrik Nyblom <pnyb@google.com>
src/runtime/sys_windows_amd64.s
src/runtime/sys_windows_arm.s
src/runtime/sys_windows_arm64.s
src/runtime/time_windows.h
src/runtime/time_windows_amd64.s
src/runtime/time_windows_arm.s
src/runtime/time_windows_arm64.s