Ticket #52041: sierra-clock_gettime.patch

File sierra-clock_gettime.patch, 1.1 KB (added by e-t-h-a-n, 8 years ago)

Patch for go-1.4.3 on Sierra

  • src/runtime/sys_darwin_386.s

    diff -U3 -r a/go/src/runtime/sys_darwin_386.s b/go/src/runtime/sys_darwin_386.s
     
    182182
    183183systime:
    184184        // Fall back to system call (usually first call in this thread)
    185         LEAL    12(SP), AX      // must be non-nil, unused
     185        LEAL    16(SP), AX      // must be non-nil, unused
    186186        MOVL    AX, 4(SP)
    187187        MOVL    $0, 8(SP)       // time zone pointer
     188        MOVL    $0, 12(SP)      // required as of Sierra; Issue 16570
    188189        MOVL    $116, AX
    189190        INT     $0x80
     191        CMPL    AX $0
     192        JNE     inreg
     193        MOVL    16(SP), AX
     194        MOVL    20(SP), DX
     195inreg:
    190196        // sec is in AX, usec in DX
    191197        // convert to DX:AX nsec
    192198        MOVL    DX, BX
  • src/runtime/sys_darwin_amd64.s

    diff -U3 -r a/go/src/runtime/sys_darwin_amd64.s b/go/src/runtime/sys_darwin_amd64.s
     
    143143        // Fall back to system call (usually first call in this thread).
    144144        MOVQ    SP, DI  // must be non-nil, unused
    145145        MOVQ    $0, SI
     146        MOVQ    $0, DX // required as of Sierra; Issue 16570
    146147        MOVL    $(0x2000000+116), AX
    147148        SYSCALL
    148149        // sec is in AX, usec in DX