The stack pointer is the 0th element in the jmp_buf.
authorwtc
Thu, 07 May 1998 01:52:43 +0000
changeset 94 a9bdc4f521b44402f532ef07f6e29ab6fc11fd75
parent 93 167712b61eae9b2bfba071589885743a5de1978c
child 97 5be9ccabb37eed7f2a6ff59407a25e088363ff04
push idunknown
push userunknown
push dateunknown
The stack pointer is the 0th element in the jmp_buf.
pr/include/md/_darwin.h
pr/include/md/_rhapsody.h
--- a/pr/include/md/_darwin.h
+++ b/pr/include/md/_darwin.h
@@ -45,17 +45,17 @@
 #define USE_SETJMP
 
 #include <setjmp.h>
 
 #define PR_CONTEXT_TYPE	jmp_buf
 
 #define CONTEXT(_th) ((_th)->md.context)
 
-#define _MD_GET_SP(_th)    (_th)->md.context[2]
+#define _MD_GET_SP(_th)    (_th)->md.context[0]
 #define PR_NUM_GCREGS	_JBLEN
 
 /*
 ** Initialize a thread context to run "_main()" when started
 */
 #define _MD_INIT_CONTEXT(_thread, _sp, _main, status)  \
 {  \
     *status = PR_TRUE;  \
--- a/pr/include/md/_rhapsody.h
+++ b/pr/include/md/_rhapsody.h
@@ -45,17 +45,17 @@
 #define USE_SETJMP
 
 #include <setjmp.h>
 
 #define PR_CONTEXT_TYPE	jmp_buf
 
 #define CONTEXT(_th) ((_th)->md.context)
 
-#define _MD_GET_SP(_th)    (_th)->md.context[2]
+#define _MD_GET_SP(_th)    (_th)->md.context[0]
 #define PR_NUM_GCREGS	_JBLEN
 
 /*
 ** Initialize a thread context to run "_main()" when started
 */
 #define _MD_INIT_CONTEXT(_thread, _sp, _main, status)  \
 {  \
     *status = PR_TRUE;  \