]> Cypherpunks repositories - gostls13.git/commit
runtime: fix nanotime for macOS Sierra
authorIan Lance Taylor <iant@golang.org>
Thu, 7 Jul 2016 23:41:29 +0000 (16:41 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 8 Jul 2016 03:17:18 +0000 (03:17 +0000)
commitfad2bbdc6a686a20174d2e73cf78f1659722bb39
treeeed2eda9865f784bd6804e51e4e44458da68bc0d
parent84bb9e62f06dbb62279241fa0bd7a6c8846271ac
runtime: fix nanotime for macOS Sierra

In the beta version of the macOS Sierra (10.12) release, the
gettimeofday system call changed on x86. Previously it always returned
the time in the AX/DX registers. Now, if AX is returned as 0, it means
that the system call has stored the values into the memory pointed to by
the first argument, just as the libc gettimeofday function does. The
libc function handles both cases, and we need to do so as well.

Fixes #16272.

Change-Id: Ibe5ad50a2c5b125e92b5a4e787db4b5179f6b723
Reviewed-on: https://go-review.googlesource.com/24812
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/sys_darwin_386.s
src/runtime/sys_darwin_amd64.s