aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_windows_386.s
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-10-31 17:27:16 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-11-02 12:50:03 +0000
commita1ee0a21cfd3d44f4585c1eb57698460abbfc7f1 (patch)
tree6e7c8995841135b34540f25eac5a4a08e18e34ce /src/runtime/sys_windows_386.s
parenta86f549703c107c8b4d83d8e7527521c9e215d9a (diff)
downloadgo-a1ee0a21cfd3d44f4585c1eb57698460abbfc7f1.tar.gz
go-a1ee0a21cfd3d44f4585c1eb57698460abbfc7f1.zip
runtime, time: refactor startNano handling
Move startNano from runtime to time package. In preparation for a subsequent change that speeds up Since and Until. This also makes code simpler as we have less assembly as the result, monotonic time handling is better localized in time package. This changes values returned from nanotime on windows (it does not account for startNano anymore), current comments state that it's important, but it's unclear how it can be important since no other OS does this. Update #25729 Change-Id: I2275d57b7b5ed8fd0d53eb0f19d55a86136cc555 Reviewed-on: https://go-review.googlesource.com/c/146340 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/sys_windows_386.s')
-rw-r--r--src/runtime/sys_windows_386.s7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/runtime/sys_windows_386.s b/src/runtime/sys_windows_386.s
index babd91c936..e6d774e66f 100644
--- a/src/runtime/sys_windows_386.s
+++ b/src/runtime/sys_windows_386.s
@@ -455,9 +455,7 @@ loop:
MULL CX
IMULL $100, DI
ADDL DI, DX
- // wintime*100 = DX:AX, subtract startNano and return
- SUBL runtime·startNano+0(SB), AX
- SBBL runtime·startNano+4(SB), DX
+ // wintime*100 = DX:AX
MOVL AX, ret_lo+0(FP)
MOVL DX, ret_hi+4(FP)
RET
@@ -482,9 +480,6 @@ loop:
IMULL $100, DI
ADDL DI, DX
// w*100 = DX:AX
- // subtract startNano and save for return
- SUBL runtime·startNano+0(SB), AX
- SBBL runtime·startNano+4(SB), DX
MOVL AX, mono+12(FP)
MOVL DX, mono+16(FP)