Module Name: src
Committed By: riz
Date: Mon Oct 1 17:53:44 UTC 2012
Modified Files:
src/lib/libc/arch/arm/gen [netbsd-6]: swapcontext.S
Log Message:
Pull up following revision(s) (requested by skrll in ticket #576):
lib/libc/arch/arm/gen/swapcontext.S: revision 1.7
Fixup the stack pointer in the ucontext returned by getcontext.
This fixes the following tests
lib/libc/sys/t_swapcontext.c
lib/libpthread/t_swapcontext.c
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.24.1 src/lib/libc/arch/arm/gen/swapcontext.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/arch/arm/gen/swapcontext.S
diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.5 src/lib/libc/arch/arm/gen/swapcontext.S:1.5.24.1
--- src/lib/libc/arch/arm/gen/swapcontext.S:1.5 Mon Apr 28 20:22:55 2008
+++ src/lib/libc/arch/arm/gen/swapcontext.S Mon Oct 1 17:53:44 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: swapcontext.S,v 1.5 2008/04/28 20:22:55 martin Exp $ */
+/* $NetBSD: swapcontext.S,v 1.5.24.1 2012/10/01 17:53:44 riz Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include "SYS.h"
#if defined(LIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: swapcontext.S,v 1.5 2008/04/28 20:22:55 martin Exp $")
+ RCSID("$NetBSD: swapcontext.S,v 1.5.24.1 2012/10/01 17:53:44 riz Exp $")
#endif /* LIBC_SCCS && !lint */
ENTRY(swapcontext)
@@ -41,6 +41,7 @@ ENTRY(swapcontext)
cmp r0, #0
ldmfd sp!, {r0-r1, lr}
RETc(ne)
+ str sp, [r0, #(36 + 13*4)] /* Adjust saved SP. */
str lr, [r0, #(36 + 15*4)] /* Adjust saved PC. */
#ifdef SOFTFLOAT
/* Ahem. */