• Ian Lance Taylor's avatar
    runtime: fix nanotime for macOS Sierra · fad2bbdc
    Ian Lance Taylor authored
    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/24812Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    fad2bbdc
sys_darwin_amd64.s 11.8 KB