From 5f02073dedd5174db2e24ef1597f36606da9696b Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Thu, 14 Aug 2014 11:59:58 -0400 Subject: [PATCH] [dev.power64] runtime: fix time.now Was reading a uint64 field with a MOVW, which has endian issues. LGTM=rsc R=rsc, iant CC=golang-codereviews https://golang.org/cl/122550043 --- src/pkg/runtime/sys_linux_power64x.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pkg/runtime/sys_linux_power64x.s b/src/pkg/runtime/sys_linux_power64x.s index df808a83c3..1d985d1af1 100644 --- a/src/pkg/runtime/sys_linux_power64x.s +++ b/src/pkg/runtime/sys_linux_power64x.s @@ -83,7 +83,7 @@ TEXT runtime·read(SB),NOSPLIT,$-8-24 TEXT runtime·getrlimit(SB),NOSPLIT,$-8-24 MOVW 8(R1), R3 MOVD 16(R1), R4 - SYSCALL $SYS_ugetrlimit // ??? why not use SYS_getrlimit + SYSCALL $SYS_ugetrlimit RETURN TEXT runtime·usleep(SB),NOSPLIT,$-8-16 @@ -132,7 +132,7 @@ TEXT time·now(SB),NOSPLIT,$16 MOVD $0, R4 SYSCALL $SYS_gettimeofday MOVD 0(R1), R3 // sec - MOVW 8(R1), R5 // usec + MOVD 8(R1), R5 // usec MOVD $1000, R4 MULLD R4, R5 MOVD R3, sec+0(FP)