aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/asm_arm64.s
diff options
context:
space:
mode:
authorElias Naur <elias.naur@gmail.com>2018-05-01 10:48:19 +0200
committerElias Naur <elias.naur@gmail.com>2018-05-21 20:35:00 +0000
commitc8d07295c55863c0246c2db3181eada3c9f4d63b (patch)
treedea8a4df477607d4fdaddb553df673f68e10cc55 /src/runtime/asm_arm64.s
parent467e15accc95d4e080a8088eaff0aaa28f572c7e (diff)
downloadgo-c8d07295c55863c0246c2db3181eada3c9f4d63b.tar.gz
go-c8d07295c55863c0246c2db3181eada3c9f4d63b.zip
cmd/link,runtime: move syscalls to libc on iOS
This CL is the darwin/arm and darwin/arm64 equivalent to CL 108679, 110215, 110437, 110438, 111258, 110655. Updates #17490 Change-Id: Ia95b27b38f9c3535012c566f17a44b4ed26b9db6 Reviewed-on: https://go-review.googlesource.com/111015 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/asm_arm64.s')
-rw-r--r--src/runtime/asm_arm64.s8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/runtime/asm_arm64.s b/src/runtime/asm_arm64.s
index 2319b82255..d1b90b056c 100644
--- a/src/runtime/asm_arm64.s
+++ b/src/runtime/asm_arm64.s
@@ -869,9 +869,12 @@ TEXT ·asmcgocall(SB),NOSPLIT,$0-20
// We get called to create new OS threads too, and those
// come in on the m->g0 stack already.
MOVD g_m(g), R8
+ MOVD m_gsignal(R8), R3
+ CMP R3, g
+ BEQ noswitch
MOVD m_g0(R8), R3
CMP R3, g
- BEQ g0
+ BEQ noswitch
MOVD R0, R9 // gosave<> and save_g might clobber R0
BL gosave<>(SB)
MOVD R3, g
@@ -881,11 +884,12 @@ TEXT ·asmcgocall(SB),NOSPLIT,$0-20
MOVD R9, R0
// Now on a scheduling stack (a pthread-created stack).
-g0:
+noswitch:
// Save room for two of our pointers /*, plus 32 bytes of callee
// save area that lives on the caller stack. */
MOVD RSP, R13
SUB $16, R13
+ BIC $0xf, R13 // alignment for gcc ABI
MOVD R13, RSP
MOVD R4, 0(RSP) // save old g on stack
MOVD (g_stack+stack_hi)(R4), R4