summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2020-06-30 11:12:07 +0000
committerkettenis <kettenis@openbsd.org>2020-06-30 11:12:07 +0000
commitf0038c0c4032d0a105af67d0cc052c3c89e606fe (patch)
tree7199edfaedb67745a5d4352e69015c39f58ee110 /lib/libc
parentdon't warn on entry to drm_fb_helper_set_suspend_unlocked() (diff)
downloadwireguard-openbsd-f0038c0c4032d0a105af67d0cc052c3c89e606fe.tar.xz
wireguard-openbsd-f0038c0c4032d0a105af67d0cc052c3c89e606fe.zip
Add missing comparison instruction. Load %r12 with the indirect branch
address to load the correct TOC address.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/arch/powerpc64/sys/tfork_thread.S4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/arch/powerpc64/sys/tfork_thread.S b/lib/libc/arch/powerpc64/sys/tfork_thread.S
index 0968077b847..ba64ca63b4e 100644
--- a/lib/libc/arch/powerpc64/sys/tfork_thread.S
+++ b/lib/libc/arch/powerpc64/sys/tfork_thread.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: tfork_thread.S,v 1.1 2020/06/25 02:38:28 drahn Exp $ */
+/* $OpenBSD: tfork_thread.S,v 1.2 2020/06/30 11:12:07 kettenis Exp $ */
/*
* Copyright (c) 2005 Tim Wiess <tim@nop.cx>
@@ -22,6 +22,7 @@ ENTRY(__tfork_thread)
/* call __tfork */
li %r0, SYS___tfork
sc
+ cmpwi %r0, 0
bne 1f
/* check if we are parent or child */
@@ -29,6 +30,7 @@ ENTRY(__tfork_thread)
bnelr
/* child */
+ mr %r12, %r5
mtlr %r5 /* fp */
mr %r3, %r6 /* arg */
subi %r1, %r1, 32 /* fixup sp to get headroom */