aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_aix_ppc64.s
diff options
context:
space:
mode:
authorClément Chigot <clement.chigot@atos.net>2019-02-20 16:01:22 +0100
committerIan Lance Taylor <iant@golang.org>2019-03-05 20:55:00 +0000
commit8bad008cf50e64a7615d9dbd7aaa236eb727301e (patch)
treec11ec895d00f45833a3b6e187a4844a2ddee0feb /src/runtime/sys_aix_ppc64.s
parent340129e4c8c56a371859b7434de89478610cab81 (diff)
downloadgo-8bad008cf50e64a7615d9dbd7aaa236eb727301e.tar.xz
runtime: handle syscalls without g or m for aix/ppc64
With cgo, some syscalls will be called with g == nil or m == nil. SyscallX functions cannot handle them so they call an equivalent function in sys_aix_ppc64.s which will directly call this syscall. Change-Id: I6508ec772b304111330e6833e7db729200af547c Reviewed-on: https://go-review.googlesource.com/c/go/+/164001 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/sys_aix_ppc64.s')
-rw-r--r--src/runtime/sys_aix_ppc64.s32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/runtime/sys_aix_ppc64.s b/src/runtime/sys_aix_ppc64.s
index ea7fae0ce7..d691b76cc7 100644
--- a/src/runtime/sys_aix_ppc64.s
+++ b/src/runtime/sys_aix_ppc64.s
@@ -204,4 +204,36 @@ TEXT runtime·osyield1(SB),NOSPLIT,$0
MOVD R0, CTR
BL (CTR)
MOVD 40(R1), R2
+ BL runtime·reginit(SB)
+ RET
+
+
+// Runs on OS stack, called from runtime·sigprocmask.
+TEXT runtime·sigprocmask1(SB),NOSPLIT,$0-24
+ MOVD how+0(FP), R3
+ MOVD new+8(FP), R4
+ MOVD old+16(FP), R5
+ MOVD $libpthread_sigthreadmask(SB), R12
+ MOVD 0(R12), R12
+ MOVD R2, 40(R1)
+ MOVD 0(R12), R0
+ MOVD 8(R12), R2
+ MOVD R0, CTR
+ BL (CTR)
+ MOVD 40(R1), R2
+ BL runtime·reginit(SB)
+ RET
+
+// Runs on OS stack, called from runtime·usleep.
+TEXT runtime·usleep1(SB),NOSPLIT,$0-8
+ MOVW us+0(FP), R3
+ MOVD $libc_usleep(SB), R12
+ MOVD 0(R12), R12
+ MOVD R2, 40(R1)
+ MOVD 0(R12), R0
+ MOVD 8(R12), R2
+ MOVD R0, CTR
+ BL (CTR)
+ MOVD 40(R1), R2
+ BL runtime·reginit(SB)
RET