Date: Sun, 08 Dec 2002 13:24:49 +0100 From: Dag-Erling Smorgrav <des@ofug.org> To: sparc@freebsd.org Cc: peter@freebsd.org Subject: Re: libc_r Message-ID: <xzpwumkhf5a.fsf@flood.ping.uio.no> In-Reply-To: <xzpbs3xj2zy.fsf@flood.ping.uio.no> (Dag-Erling Smorgrav's message of "Sat, 07 Dec 2002 15:52:01 %2B0100") References: <xzpbs3xj2zy.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-= Dag-Erling Smorgrav <des@ofug.org> writes: > I haven't started on pthread_private.h yet, and I'm not sure I can > handle it on my own, but I hope this will inspire someone to tackle > it. Right, here's my attempt at making pthread_private.h work on sparc64. It builds, but I haven't tested it yet. DES -- Dag-Erling Smorgrav - des@ofug.org --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=pthread.diff Index: uthread/pthread_private.h =================================================================== RCS file: /home/ncvs/src/lib/libc_r/uthread/pthread_private.h,v retrieving revision 1.76 diff -u -r1.76 pthread_private.h --- uthread/pthread_private.h 13 Nov 2002 18:13:26 -0000 1.76 +++ uthread/pthread_private.h 8 Dec 2002 12:21:34 -0000 @@ -67,6 +67,7 @@ * address in a jmp_buf context. * * XXX - These need to be moved into architecture dependent support files. + * XXX - These need to be documented so porters know what's required. */ #if defined(__i386__) #define GET_STACK_JB(jb) ((unsigned long)((jb)[0]._jb[2])) @@ -101,6 +102,16 @@ (jb)[0]._jb[R_RA + 4] = (long)(ra); \ (jb)[0]._jb[R_T12 + 4] = (long)(ra); \ } while (0) +#elif defined(__sparc64__) +#define GET_STACK_JB(jb) ((unsigned long)((jb)[0]._jb[_JB_SP])) +#define GET_STACK_SJB(sjb) ((unsigned long)((sjb)[0]._sjb[_JB_SP])) +#define GET_STACK_UC(ucp) ((ucp)->uc_mcontext.mc_sp) +#define SET_STACK_JB(jb, stk) (jb)[0]._jb[_JB_SP] = (long)(stk) +#define SET_STACK_SJB(sjb, stk) (sjb)[0]._sjb[_JB_SP] = (long)(stk) +#define SET_STACK_UC(ucp, stk) (ucp)->uc_mcontext.mc_sp = (unsigned long)(stk) +#define FP_SAVE_UC(ucp) /* XXX */ +#define FP_RESTORE_UC(ucp) /* XXX */ +#define SET_RETURN_ADDR_JB(jb, ra) (jb)[0]._jb[_JB_PC] = (long)(ra) #else #error "Don't recognize this architecture!" #endif --=-=-=-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpwumkhf5a.fsf>