diff --git a/lib/libc/mips/static_tls.h b/lib/libc/mips/static_tls.h --- a/lib/libc/mips/static_tls.h +++ b/lib/libc/mips/static_tls.h @@ -40,23 +40,17 @@ { uintptr_t tlsbase; -#if defined(__mips_n64) __asm__ __volatile__ ( ".set\tpush\n\t" +#if defined(__mips_n64) ".set\tmips64r2\n\t" - "rdhwr\t%0, $29\n\t" - ".set\tpop" - : "=r" (tlsbase)); - tlsbase -= TLS_TP_OFFSET + TLS_TCB_SIZE; #else /* mips 32 */ - __asm__ __volatile__ ( - ".set\tpush\n\t" ".set\tmips32r2\n\t" +#endif /* ! __mips_n64 */ "rdhwr\t%0, $29\n\t" ".set\tpop" : "=r" (tlsbase)); tlsbase -= TLS_TP_OFFSET + TLS_TCB_SIZE; -#endif /* ! __mips_n64 */ tlsbase += offset; return (tlsbase); }