From ee551846fa015a04aaa55e44e8d9b6647156e301 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Fri, 17 May 2019 01:25:55 +1000 Subject: [PATCH] runtime: correct netbsd/amd64 assembly for timespec handling A timespec on netbsd/amd64 is int64/int64, not int64/int32. This bug appears to have been introduced in 7777bac6e45. Spotted by Cherry Zhang while reviewing https://go-review.googlesource.com/c/go/+/177120. Change-Id: I163c55d926965defd981bdbfd2511de7d9d4c542 Reviewed-on: https://go-review.googlesource.com/c/go/+/177637 Reviewed-by: Benny Siegert Reviewed-by: Cherry Zhang Run-TryBot: Benny Siegert --- src/runtime/sys_netbsd_amd64.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/sys_netbsd_amd64.s b/src/runtime/sys_netbsd_amd64.s index 77dc00dc60..5fc47aefd3 100644 --- a/src/runtime/sys_netbsd_amd64.s +++ b/src/runtime/sys_netbsd_amd64.s @@ -218,7 +218,7 @@ TEXT runtime·walltime(SB), NOSPLIT, $32 MOVL $SYS___clock_gettime50, AX SYSCALL MOVQ 8(SP), AX // sec - MOVL 16(SP), DX // nsec + MOVQ 16(SP), DX // nsec // sec is in AX, nsec in DX MOVQ AX, sec+0(FP) @@ -231,7 +231,7 @@ TEXT runtime·nanotime(SB),NOSPLIT,$32 MOVL $SYS___clock_gettime50, AX SYSCALL MOVQ 8(SP), AX // sec - MOVL 16(SP), DX // nsec + MOVQ 16(SP), DX // nsec // sec is in AX, nsec in DX // return nsec in AX -- 2.50.0