Date: Fri, 29 Apr 2022 20:55:11 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 5c1667e8be86 - stable/13 - mips _libc_get_static_tls_base: Narrow scope of #ifdef. Message-ID: <202204292055.23TKtB7H055313@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5c1667e8be86e9ca7d3111b67ca19abcace634a2 commit 5c1667e8be86e9ca7d3111b67ca19abcace634a2 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2021-12-09 21:16:34 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-04-29 20:50:05 +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 (cherry picked from commit 9952b82b398968a243909ee3854b1968c3cc8c12) --- 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204292055.23TKtB7H055313>