]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix wrong offset when calling ppc64x nanotime syscall
authorCarlos Eduardo Seo <cseo@linux.vnet.ibm.com>
Fri, 17 Jan 2020 20:59:59 +0000 (17:59 -0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 20 Jan 2020 15:06:42 +0000 (15:06 +0000)
There is a wrong offset when getting the results of a clock_gettime
syscall. Although the syscall will never be called in native ppc64x,
QEMU doesn't implement VDSO, so it will return wrong values.

Fixes #36592

Change-Id: Icf838075228dcdd62cf2c1279aa983e5993d66ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/215397
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
src/runtime/sys_linux_ppc64x.s

index de14418338af9d459adeac3c26229402f47b2d20..8629fe3233a187ebc61826c7f4ccc751aa63e3ea 100644 (file)
@@ -280,7 +280,7 @@ fallback:
        ADD     $32, R1, R4
        SYSCALL $SYS_clock_gettime
        MOVD    32(R1), R3
-       MOVD    48(R1), R5
+       MOVD    40(R1), R5
        JMP     finish
 
 TEXT runtime·rtsigprocmask(SB),NOSPLIT|NOFRAME,$0-28