From: Carlos Eduardo Seo Date: Fri, 17 Jan 2020 20:59:59 +0000 (-0300) Subject: [release-branch.go1.13] runtime: fix wrong offset when calling ppc64x nanotime syscall X-Git-Tag: go1.13.10~3 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b79c36dc9949177aa6e2e33fe5af61d4461676a4;p=gostls13.git [release-branch.go1.13] runtime: fix wrong offset when calling ppc64x nanotime syscall 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. For #36592 Fixes #38236 Change-Id: Icf838075228dcdd62cf2c1279aa983e5993d66ee Reviewed-on: https://go-review.googlesource.com/c/go/+/215397 Reviewed-by: Tobias Klauser (cherry picked from commit 71239b4f491698397149868c88d2c851de2cd49b) Reviewed-on: https://go-review.googlesource.com/c/go/+/227179 Reviewed-by: Carlos Eduardo Seo Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot --- diff --git a/src/runtime/sys_linux_ppc64x.s b/src/runtime/sys_linux_ppc64x.s index 13d23156bd..435cc2809a 100644 --- a/src/runtime/sys_linux_ppc64x.s +++ b/src/runtime/sys_linux_ppc64x.s @@ -251,7 +251,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