From nobody Thu Dec 09 21:23:41 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9F6D718D0E00; Thu, 9 Dec 2021 21:23:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J96Tn4h2wz3JnP; Thu, 9 Dec 2021 21:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 20ACA5E4A; Thu, 9 Dec 2021 21:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1B9LNfZO047001; Thu, 9 Dec 2021 21:23:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B9LNfcZ047000; Thu, 9 Dec 2021 21:23:41 GMT (envelope-from git) Date: Thu, 9 Dec 2021 21:23:41 GMT Message-Id: <202112092123.1B9LNfcZ047000@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9952b82b3989 - main - mips _libc_get_static_tls_base: Narrow scope of #ifdef. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9952b82b398968a243909ee3854b1968c3cc8c12 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639085021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WOAvlpf6//cNb/HboxwjGCKmZz2EEFhQUWZgFMA0oUs=; b=JCjWWgpwerImlRYQz5aGV3TMaU0/Gaj7beoIQOVA4gsJas0AZAMfJhmaaVBQ2JwMDzSVnG L0l8+jf77J7Bz2CfFaTuqCAGh0zDIJmM1OIy8v3H3cT2xD/cX0pbG/mSbu4wsSyk1dDtOE PDp+AhRShIrW2ZD0RI0cMT6Z3sT5hblDhovF3CDOpk2Zd65wpb6xTU0g9H3gqDnx5jz1Dw BTDjowJJ16Om/oyVNj9gL0NQkcqziNfoF5xUssKPKcLxzDBGlC3SjjWBEoE2vYkel41M1B OuiXTd77uqz9AhXIw26cr4uyH+i61rtw5IJHXSC8A/p2FdRdp/+n9j9q2FBx5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639085021; a=rsa-sha256; cv=none; b=e9Xgl8TvWE/NP8erIBtrsAt9/8aXTW/74AAwzD3JpmgT8wH0P2b5zdDBVDZLMqbakZqIvQ SUHeF7tTK1Jed65tRC3003qyYOwmuaaK7UFG4ANiZGJLkafsjtb0yhacxMUNzkvL15HJAj Dg/hRI4Eeqeaoax/51x39tVodu5M8GIh7fb4+2TXm5KWWD+x9SYLYFmak96DB1XopD9rkV +H2gfGTwVkQ9qQJLMhlmo7GXx0eaSI2/VDtWN7us3X+czj4zF65SFvjo6BjZdALg5JMpDg CjB9BYEejoSnbS5V7RbGKXMUWXEWyU0TXCAQVhleSvHrdwL5LKkMUDwCqZdoNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9952b82b398968a243909ee3854b1968c3cc8c12 commit 9952b82b398968a243909ee3854b1968c3cc8c12 Author: John Baldwin AuthorDate: 2021-12-09 21:16:34 +0000 Commit: John Baldwin 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); }