From 7d8a00561233be5c4ecfe188e55c8e3770012ae1 Mon Sep 17 00:00:00 2001 From: deischen Date: Mon, 20 Nov 2000 01:57:19 +0000 Subject: Fix MD macros to work for alpha. Without this fix, threads under alpha seem to be totally broke. MFC Candidate Submitted by: gallatin --- lib/libpthread/thread/thr_private.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/libpthread/thread/thr_private.h') diff --git a/lib/libpthread/thread/thr_private.h b/lib/libpthread/thread/thr_private.h index 9d6bc31..2c9a469 100644 --- a/lib/libpthread/thread/thr_private.h +++ b/lib/libpthread/thread/thr_private.h @@ -95,10 +95,10 @@ #define SET_STACK_UC(ucp, stk) (ucp)->uc_mcontext.mc_regs[R_SP] = (unsigned long)(stk) #define FP_SAVE_UC(ucp) #define FP_RESTORE_UC(ucp) -#define SET_RETURN_ADDR_JB(jb, ra) do { \ - (jb)[0]._jb[2] = (long)(ra); \ - (jb)[0]._jb[R_RA + 4] = 0; \ - (jb)[0]._jb[R_T12 + 4] = (long)(ra); \ +#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[R_T12 + 4] = (long)(ra); \ } while (0) #else #error "Don't recognize this architecture!" -- cgit v1.1