summaryrefslogtreecommitdiffstats
path: root/lib/librthread/arch/sparc64
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2011-10-13 05:29:51 +0000
committerguenther <guenther@openbsd.org>2011-10-13 05:29:51 +0000
commit10943c4736904ee55593ad80cb13eb83629b84d6 (patch)
treef44dcbeafbde807d6925f043e25df394b6d32068 /lib/librthread/arch/sparc64
parentRemove support for systems that lack CPUs. (i.e., stop looking up (diff)
downloadwireguard-openbsd-10943c4736904ee55593ad80cb13eb83629b84d6.tar.xz
wireguard-openbsd-10943c4736904ee55593ad80cb13eb83629b84d6.zip
Increase the stack offset for the new rthread from (BIAS+128) to
(BIAD+CC64FSZ) so that there's sufficient space even when _rthread_start is compiled without optimization. Also, clear the frame pointer to help make gdb happier. ok kettenis@
Diffstat (limited to 'lib/librthread/arch/sparc64')
-rw-r--r--lib/librthread/arch/sparc64/rfork_thread.S9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/librthread/arch/sparc64/rfork_thread.S b/lib/librthread/arch/sparc64/rfork_thread.S
index f6b1788a8d5..9df22a351a0 100644
--- a/lib/librthread/arch/sparc64/rfork_thread.S
+++ b/lib/librthread/arch/sparc64/rfork_thread.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: rfork_thread.S,v 1.1 2005/12/25 16:21:01 miod Exp $ */
+/* $OpenBSD: rfork_thread.S,v 1.2 2011/10/13 05:29:51 guenther Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat
@@ -57,9 +57,10 @@ ENTRY(rfork_thread)
* In child process: switch stack, invoke function, then exit.
*/
- sub %o4, (BIAS + 128), %sp /* stack */
- call %o2 /* func */
- mov %o3, %o0 /* arg */
+ mov %g0, %fp /* clear frame pointer */
+ sub %o4, (BIAS + CC64FSZ), %sp /* stack */
+ call %o2 /* func */
+ mov %o3, %o0 /* arg */
mov SYS_threxit, %g1
clr %o0