am 0ce92b96: am 1e304a3b: Merge "[MIPS] Support for TLS register"

* commit '0ce92b9625c5d0cc4e72047e6c8759c4cc079dcb':
  [MIPS] Support for TLS register
This commit is contained in:
Elliott Hughes 2012-08-02 18:48:04 -07:00 committed by Android Git Automerger
commit 9b6a453865

View File

@ -127,9 +127,20 @@ extern int __set_tls(void *ptr);
# define __get_tls() ( *((volatile void **) 0xffff0ff0) ) # define __get_tls() ( *((volatile void **) 0xffff0ff0) )
# endif # endif
# endif /* !LIBC_STATIC */ # endif /* !LIBC_STATIC */
#else /* !ARM */ #elif defined(__mips__)
# define __get_tls() \
({ register unsigned int __val asm("v1"); \
asm ( \
" .set push\n" \
" .set mips32r2\n" \
" rdhwr %0,$29\n" \
" .set pop\n" \
: "=r"(__val) \
); \
(volatile void*)__val; })
#else
extern void* __get_tls( void ); extern void* __get_tls( void );
#endif /* !ARM */ #endif
/* return the stack base and size, used by our malloc debugger */ /* return the stack base and size, used by our malloc debugger */
extern void* __get_stack_base(int *p_stack_size); extern void* __get_stack_base(int *p_stack_size);