The branch main has been updated by jhb:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=9952b82b398968a243909ee3854b1968c3cc8c12

commit 9952b82b398968a243909ee3854b1968c3cc8c12
Author:     John Baldwin <[email protected]>
AuthorDate: 2021-12-09 21:16:34 +0000
Commit:     John Baldwin <[email protected]>
CommitDate: 2021-12-09 21:16:34 +0000

    mips _libc_get_static_tls_base: Narrow scope of #ifdef.
    
    Reviewed by:    kib, emaste, jrtc27
    Sponsored by:   The University of Cambridge, Google Inc.
    Differential Revision:  https://reviews.freebsd.org/D33348
---
 lib/libc/mips/static_tls.h | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/lib/libc/mips/static_tls.h b/lib/libc/mips/static_tls.h
index 67ee8afe14c6..b823a34eaf8b 100644
--- a/lib/libc/mips/static_tls.h
+++ b/lib/libc/mips/static_tls.h
@@ -40,23 +40,17 @@ _libc_get_static_tls_base(size_t offset)
 {
        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);
 }

Reply via email to