aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_windows_arm.s
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2021-01-27 11:22:02 -0500
committerRuss Cox <rsc@golang.org>2021-02-19 00:03:59 +0000
commit91cc484ea914fc75e7321d23017d59c9751f5066 (patch)
treeec3ccc5ab95ee8fe55e06870e8cd68f1339a40ad /src/runtime/sys_windows_arm.s
parent38672d3dcf2eae297c45dc2a899c39528148f14b (diff)
downloadgo-91cc484ea914fc75e7321d23017d59c9751f5066.tar.gz
go-91cc484ea914fc75e7321d23017d59c9751f5066.zip
runtime: fix time on windows/arm under WINE
This code has clearly never run successfully, since one of the “tail calls" calls the wrong function, and both of them appear in functions with stack frames that are never going to be properly unwound. Probably there is no windows/arm under WINE at all. But might as well fix the code. Change-Id: I5fa62274b3661bc6bce098657b5bcf11d59655eb Reviewed-on: https://go-review.googlesource.com/c/go/+/288811 Trust: Russ Cox <rsc@golang.org> Trust: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/runtime/sys_windows_arm.s')
-rw-r--r--src/runtime/sys_windows_arm.s8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/runtime/sys_windows_arm.s b/src/runtime/sys_windows_arm.s
index a30d63513a..42278dcbe7 100644
--- a/src/runtime/sys_windows_arm.s
+++ b/src/runtime/sys_windows_arm.s
@@ -419,7 +419,7 @@ TEXT runtime·read_tls_fallback(SB),NOSPLIT|NOFRAME,$0
#define time_hi1 4
#define time_hi2 8
-TEXT runtime·nanotime1(SB),NOSPLIT,$0-8
+TEXT runtime·nanotime1(SB),NOSPLIT|NOFRAME,$0-8
MOVW $0, R0
MOVB runtime·useQPCTime(SB), R0
CMP $0, R0
@@ -443,9 +443,8 @@ loop:
RET
useQPC:
B runtime·nanotimeQPC(SB) // tail call
- RET
-TEXT time·now(SB),NOSPLIT,$0-20
+TEXT time·now(SB),NOSPLIT|NOFRAME,$0-20
MOVW $0, R0
MOVB runtime·useQPCTime(SB), R0
CMP $0, R0
@@ -519,8 +518,7 @@ wall:
MOVW R1,nsec+8(FP)
RET
useQPC:
- B runtime·nanotimeQPC(SB) // tail call
- RET
+ B runtime·nowQPC(SB) // tail call
// save_g saves the g register (R10) into thread local memory
// so that we can call externally compiled