aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_windows_386.s
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-08-24 17:13:33 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-08-29 13:57:31 +0000
commitb4ad49f9f70f5aa973c10db251bef55132e66ca8 (patch)
tree071790568604ad95a1e8a7d69a7d5a43e973d368 /src/runtime/sys_windows_386.s
parent8f79ca1d1ae78d3cc8025f0901540c45848347ab (diff)
downloadgo-b4ad49f9f70f5aa973c10db251bef55132e66ca8.tar.gz
go-b4ad49f9f70f5aa973c10db251bef55132e66ca8.zip
runtime: remove slow time compatibility hacks for wine
A few years ago, Wine-specific detection was added as an ugly hack to work around shortcomings in the emulation layer. Probably it's best to not special case this emulator versus that emulator versus the real deal, but there were two arguments presented in the hack's favor: 1. Wine is useful and developers will appreciate being able to debug stuff with it. 2. The existing KUSER_SHARED_DATA technique for gathering time is undocumented, and we shouldn't be relying on it anyway, since Microsoft might remove it without notice. As it turns out, neither one of these are, at the time of writing, true. (1) has been handled for some time by Wine with the introduction of the commit entitled "ntdll: Create thread to update user_shared_data time values when necessary". And (2) is in fact documented: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ntddk/ns-ntddk-kuser_shared_data https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/-kuser It's in use so widely by both third-party software (such as games, a massive market segment) and by Microsoft binaries that removing it from the operating system will basically never happen. So with both issues taken care of, this commit simply gets rid of the old hack. Change-Id: I80093f50e0d10d53648128d0f9dd76b1b92a119e Reviewed-on: https://go-review.googlesource.com/c/go/+/191759 Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Diffstat (limited to 'src/runtime/sys_windows_386.s')
-rw-r--r--src/runtime/sys_windows_386.s10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/runtime/sys_windows_386.s b/src/runtime/sys_windows_386.s
index 761da8eaef..b8a8ad865b 100644
--- a/src/runtime/sys_windows_386.s
+++ b/src/runtime/sys_windows_386.s
@@ -445,8 +445,6 @@ TEXT runtime·switchtothread(SB),NOSPLIT,$0
#define time_hi2 8
TEXT runtime·nanotime(SB),NOSPLIT,$0-8
- CMPB runtime·useQPCTime(SB), $0
- JNE useQPC
loop:
MOVL (_INTERRUPT_TIME+time_hi1), AX
MOVL (_INTERRUPT_TIME+time_lo), CX
@@ -463,13 +461,8 @@ loop:
MOVL AX, ret_lo+0(FP)
MOVL DX, ret_hi+4(FP)
RET
-useQPC:
- JMP runtime·nanotimeQPC(SB)
- RET
TEXT time·now(SB),NOSPLIT,$0-20
- CMPB runtime·useQPCTime(SB), $0
- JNE useQPC
loop:
MOVL (_INTERRUPT_TIME+time_hi1), AX
MOVL (_INTERRUPT_TIME+time_lo), CX
@@ -538,6 +531,3 @@ wall:
MOVL AX, sec+0(FP)
MOVL DX, sec+4(FP)
RET
-useQPC:
- JMP runtime·nowQPC(SB)
- RET