Merge "don't hardcode register r0/v1 when reading the TLS"
This commit is contained in:
commit
5995bf880e
@ -84,20 +84,17 @@ extern int __set_tls(void* ptr);
|
||||
/* get the TLS */
|
||||
#if defined(__arm__)
|
||||
# define __get_tls() \
|
||||
({ register unsigned int __val asm("r0"); \
|
||||
asm ("mrc p15, 0, r0, c13, c0, 3" : "=r"(__val) ); \
|
||||
(volatile void*)__val; })
|
||||
({ register unsigned int __val; \
|
||||
asm ("mrc p15, 0, %0, c13, c0, 3" : "=r"(__val)); \
|
||||
(volatile void*) __val; })
|
||||
#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; })
|
||||
({ register unsigned int __val; \
|
||||
asm (" .set push\n" \
|
||||
" .set mips32r2\n" \
|
||||
" rdhwr %0,$29\n" \
|
||||
" .set pop\n" : "=r"(__val)); \
|
||||
(volatile void*) __val; })
|
||||
#elif defined(__i386__)
|
||||
# define __get_tls() \
|
||||
({ register void* __val; \
|
||||
|
Loading…
Reference in New Issue
Block a user