diff options
author | Ian Lance Taylor <iant@golang.org> | 2016-01-08 16:56:02 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2016-01-11 18:46:54 +0000 |
commit | c02aa463db0c5867a4ae1adfc2f98c436cb751b0 (patch) | |
tree | 7dd1817f44f3aa006dc8a895cbde41ce4cee08c1 /src/runtime/asm_arm64.s | |
parent | 9439fa107829b6626eb6cef2a3549b1fc9a6f974 (diff) | |
download | go-c02aa463db0c5867a4ae1adfc2f98c436cb751b0.tar.gz go-c02aa463db0c5867a4ae1adfc2f98c436cb751b0.zip |
runtime: fix arm/arm64/ppc64/mips64 to dropm when necessary
Fixes #13881.
Change-Id: Idff77db381640184ddd2b65022133bb226168800
Reviewed-on: https://go-review.googlesource.com/18449
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/asm_arm64.s')
-rw-r--r-- | src/runtime/asm_arm64.s | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/runtime/asm_arm64.s b/src/runtime/asm_arm64.s index 732abe13af..ab5d5b5e5f 100644 --- a/src/runtime/asm_arm64.s +++ b/src/runtime/asm_arm64.s @@ -586,7 +586,13 @@ nocgo: // lots of space, but the linker doesn't know. Hide the call from // the linker analysis by using an indirect call. CMP $0, g - BNE havem + BEQ needm + + MOVD g_m(g), R8 + MOVD R8, savedm-8(SP) + B havem + +needm: MOVD g, savedm-8(SP) // g is zero, so is m. MOVD $runtime·needm(SB), R0 BL (R0) @@ -608,8 +614,6 @@ nocgo: MOVD R0, (g_sched+gobuf_sp)(R3) havem: - MOVD g_m(g), R8 - MOVD R8, savedm-8(SP) // Now there's a valid m, and we're running on its m->g0. // Save current m->g0->sched.sp on stack and then set it to SP. // Save current sp in m->g0->sched.sp in preparation for |