]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.6] runtime: fix nanotime for macOS Sierra
authorIan Lance Taylor <iant@golang.org>
Thu, 7 Jul 2016 23:41:29 +0000 (16:41 -0700)
committerChris Broadfoot <cbro@golang.org>
Mon, 18 Jul 2016 14:19:34 +0000 (14:19 +0000)
commit5164532ae0e9c3e87084638913029392ecc1af42
tree96a9d7b862f4971426f7b7f7ce6c4fd80766fd7e
parent57e459e02b4b01567f92542f92cd9afde209e193
[release-branch.go1.6] 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.
Fixes #16354.

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