From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6EC10382E042; Wed, 15 Jul 2020 19:13:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6EC10382E042 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1594840430; bh=L9rG1V3Uul/7LlKX5NtcWzrJ8l/Tj7I4sIiOttLTnYs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nI6KLic47d4YO0eb/COPNcjJXHmny61Rg0UqbDIfipcbm4ylrIOB+hR2s4Z/AmwUE JH1DxUVwGZAIYlFtueW3wAfzYAzN73GJFre94Ptu+lz0aCzIUaCGRk8RtsKUavzmr3 welB+iuMaGcAwz9Jpcx2gCxnoPx9S1ldpca22bvQ= From: "carlos at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/96200] Implement __builtin_thread_pointer() and __builtin_set_thread_pointer() if TLS is supported Date: Wed, 15 Jul 2020 19:13:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carlos at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 19:13:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96200 --- Comment #2 from Carlos O'Donell --- (In reply to Florian Weimer from comment #1) > __builtin_set_thread_pointer has little value from a glibc perspective > because when used in application code, it will always result in undefined > behavior. Correct, but it's useful for a C library implemetnation. In glibc the aarch= 64 tls.h is made quite clean by the use of __builtin_thread_pointer and __builtin_set_thread_pointer.=