diff options
| author | Cherry Mui <cherryyz@google.com> | 2021-09-22 18:32:45 -0400 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2021-09-24 14:52:47 +0000 |
| commit | 217507eb035933bac6c990844f0d71d6000fd339 (patch) | |
| tree | 52f6e6218b248f92e0a2ad3f919143d16e5ea875 /src/runtime/sys_linux_ppc64x.s | |
| parent | fe8347b61a5e33506c9e3827877ec318c90377e6 (diff) | |
| download | go-217507eb035933bac6c990844f0d71d6000fd339.tar.xz | |
runtime: set vdsoSP to caller's SP consistently
m.vdsoSP should be set to the SP of the caller of nanotime1,
instead of the SP of nanotime1 itself, which matches m.vdsoPC.
Otherwise the unmatched vdsoPC and vdsoSP would make the stack
trace look like recursive.
We already do it correctly on AMD64, 386, and RISCV64. This CL
fixes the rest.
Fixes #47324.
Change-Id: I98b6fcfbe9fc6bdd28b8fe2a1299b7c505371dd4
Reviewed-on: https://go-review.googlesource.com/c/go/+/337590
Trust: Cherry Mui <cherryyz@google.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Diffstat (limited to 'src/runtime/sys_linux_ppc64x.s')
| -rw-r--r-- | src/runtime/sys_linux_ppc64x.s | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/runtime/sys_linux_ppc64x.s b/src/runtime/sys_linux_ppc64x.s index 005fa4d2b4..33b6a9409c 100644 --- a/src/runtime/sys_linux_ppc64x.s +++ b/src/runtime/sys_linux_ppc64x.s @@ -205,8 +205,9 @@ TEXT runtime·walltime(SB),NOSPLIT,$16-12 MOVD R5, 40(R1) MOVD LR, R14 + MOVD $ret-FIXED_FRAME(FP), R5 // caller's SP MOVD R14, m_vdsoPC(R21) - MOVD R15, m_vdsoSP(R21) + MOVD R5, m_vdsoSP(R21) MOVD m_curg(R21), R6 CMP g, R6 @@ -297,9 +298,10 @@ TEXT runtime·nanotime1(SB),NOSPLIT,$16-8 MOVD R4, 32(R1) MOVD R5, 40(R1) - MOVD LR, R14 // R14 is unchanged by C code + MOVD LR, R14 // R14 is unchanged by C code + MOVD $ret-FIXED_FRAME(FP), R5 // caller's SP MOVD R14, m_vdsoPC(R21) - MOVD R15, m_vdsoSP(R21) + MOVD R5, m_vdsoSP(R21) MOVD m_curg(R21), R6 CMP g, R6 |
