diff options
author | sjg <sjg@FreeBSD.org> | 2015-05-27 01:19:58 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2015-05-27 01:19:58 +0000 |
commit | 65145fa4c81da358fcbc3b650156dab705dfa34e (patch) | |
tree | 55c065b6730aaac2afb6c29933ee6ec5fa4c4249 /lib/libthr/arch/powerpc/include/pthread_md.h | |
parent | 60ff4eb0dff94a04d75d0d52a3957aaaf5f8c693 (diff) | |
parent | e6b664c390af88d4a87208bc042ce503da664c3b (diff) | |
download | FreeBSD-src-65145fa4c81da358fcbc3b650156dab705dfa34e.zip FreeBSD-src-65145fa4c81da358fcbc3b650156dab705dfa34e.tar.gz |
Merge sync of head
Diffstat (limited to 'lib/libthr/arch/powerpc/include/pthread_md.h')
-rw-r--r-- | lib/libthr/arch/powerpc/include/pthread_md.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/libthr/arch/powerpc/include/pthread_md.h b/lib/libthr/arch/powerpc/include/pthread_md.h index 91102b4..544ee1c 100644 --- a/lib/libthr/arch/powerpc/include/pthread_md.h +++ b/lib/libthr/arch/powerpc/include/pthread_md.h @@ -55,29 +55,26 @@ struct tcb { struct pthread *tcb_thread; }; -struct tcb *_tcb_ctor(struct pthread *, int); -void _tcb_dtor(struct tcb *); - static __inline void _tcb_set(struct tcb *tcb) { #ifdef __powerpc64__ - register uint8_t *_tp __asm__("%r13"); + __asm __volatile("mr 13,%0" :: + "r"((uint8_t *)tcb + TP_OFFSET)); #else - register uint8_t *_tp __asm__("%r2"); -#endif - - __asm __volatile("mr %0,%1" : "=r"(_tp) : + __asm __volatile("mr 2,%0" :: "r"((uint8_t *)tcb + TP_OFFSET)); +#endif } static __inline struct tcb * _tcb_get(void) { + register uint8_t *_tp; #ifdef __powerpc64__ - register uint8_t *_tp __asm__("%r13"); + __asm __volatile("mr %0,13" : "=r"(_tp)); #else - register uint8_t *_tp __asm__("%r2"); + __asm __volatile("mr %0,2" : "=r"(_tp)); #endif return ((struct tcb *)(_tp - TP_OFFSET)); |