diff options
| author | qmuntal <quimmuntal@gmail.com> | 2023-02-24 18:15:32 +0100 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-03-13 14:20:41 +0000 |
| commit | b6f29d23654eba09209db00704ccef1f01a60c71 (patch) | |
| tree | fbf02d071ad1a82d7bd6a85d014881543a936070 /src/runtime/sys_windows_arm.s | |
| parent | b561ebab46124c3542ee2d67c68ca770b67cb8dc (diff) | |
| download | go-b6f29d23654eba09209db00704ccef1f01a60c71.tar.xz | |
runtime: implement high resolution timer on windows arm/arm64
This CL moves the usleep2HighRes from assembly to good old Go.
This is safe because since CL 288793 usleep is always called with
a g, else one wold have to call usleep_no_g. This condition was
not enforced when high resolution timers were first implemented
on Windows (CL 248699), so the implementation was done in assembly.
Other than removing a bunch of obscure assembly code, this CL makes
high resolution timers work on windows arm/arm64 by free, as the
system calls are the same in all windows platforms.
Change-Id: I41ecf78026fd7e11e85258a411ae074a77e8c7fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/471142
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
Diffstat (limited to 'src/runtime/sys_windows_arm.s')
| -rw-r--r-- | src/runtime/sys_windows_arm.s | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/runtime/sys_windows_arm.s b/src/runtime/sys_windows_arm.s index 0af19db352..67009df723 100644 --- a/src/runtime/sys_windows_arm.s +++ b/src/runtime/sys_windows_arm.s @@ -212,13 +212,6 @@ TEXT runtime·usleep2(SB),NOSPLIT|NOFRAME,$0-4 MOVM.IA.W (R13), [R4, R15] // pop {R4, pc} // Runs on OS stack. -// duration (in -100ns units) is in dt+0(FP). -// g is valid. -// TODO: needs to be implemented properly. -TEXT runtime·usleep2HighRes(SB),NOSPLIT|NOFRAME,$0-4 - B runtime·abort(SB) - -// Runs on OS stack. TEXT runtime·switchtothread(SB),NOSPLIT|NOFRAME,$0 MOVM.DB.W [R4, R14], (R13) // push {R4, lr} MOVW R13, R4 |
