diff --git a/libc/private/bionic_tls.h b/libc/private/bionic_tls.h index 56a0ac283..225a617d0 100644 --- a/libc/private/bionic_tls.h +++ b/libc/private/bionic_tls.h @@ -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; \