From 71239b4f491698397149868c88d2c851de2cd49b Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Seo Date: Fri, 17 Jan 2020 17:59:59 -0300 Subject: [PATCH] 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. Fixes #36592 Change-Id: Icf838075228dcdd62cf2c1279aa983e5993d66ee Reviewed-on: https://go-review.googlesource.com/c/go/+/215397 Reviewed-by: Tobias Klauser --- src/runtime/sys_linux_ppc64x.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/sys_linux_ppc64x.s b/src/runtime/sys_linux_ppc64x.s index de14418338a..8629fe3233a 100644 --- a/src/runtime/sys_linux_ppc64x.s +++ b/src/runtime/sys_linux_ppc64x.s @@ -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