Use the real function address (instead of function address + 8) for the

return address when modifying a jmp_buf to create a new thread context.
Also set t12 with the return address.

This should fix libc_r on alpha.

With much detective work by: Bernd Walter <ticso@cicely.de>
This commit is contained in:
Daniel Eischen 2001-12-22 06:11:06 +00:00
parent 8572518672
commit 2d170746c7
3 changed files with 6 additions and 6 deletions

View File

@ -96,8 +96,8 @@
#define FP_SAVE_UC(ucp)
#define FP_RESTORE_UC(ucp)
#define SET_RETURN_ADDR_JB(jb, ra) do { \
(jb)[0]._jb[2] = (unsigned long)(ra) + 8UL; \
(jb)[0]._jb[R_RA + 4] = 0; \
(jb)[0]._jb[2] = (long)(ra); \
(jb)[0]._jb[R_RA + 4] = (long)(ra); \
(jb)[0]._jb[R_T12 + 4] = (long)(ra); \
} while (0)
#else

View File

@ -96,8 +96,8 @@
#define FP_SAVE_UC(ucp)
#define FP_RESTORE_UC(ucp)
#define SET_RETURN_ADDR_JB(jb, ra) do { \
(jb)[0]._jb[2] = (unsigned long)(ra) + 8UL; \
(jb)[0]._jb[R_RA + 4] = 0; \
(jb)[0]._jb[2] = (long)(ra); \
(jb)[0]._jb[R_RA + 4] = (long)(ra); \
(jb)[0]._jb[R_T12 + 4] = (long)(ra); \
} while (0)
#else

View File

@ -96,8 +96,8 @@
#define FP_SAVE_UC(ucp)
#define FP_RESTORE_UC(ucp)
#define SET_RETURN_ADDR_JB(jb, ra) do { \
(jb)[0]._jb[2] = (unsigned long)(ra) + 8UL; \
(jb)[0]._jb[R_RA + 4] = 0; \
(jb)[0]._jb[2] = (long)(ra); \
(jb)[0]._jb[R_RA + 4] = (long)(ra); \
(jb)[0]._jb[R_T12 + 4] = (long)(ra); \
} while (0)
#else