summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2011-10-13 05:29:52 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2011-10-13 05:29:52 +0000
commitba0ca07557c34cd6389858f21be40f0aeaabd733 (patch)
treed28cb9d3ce2f120229de9cedfd7d2d9ab1a8f5a0
parent03762cbe5cbfea17475f1540395255f936157aab (diff)
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@
-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