public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/108779] New: No option to change thread-pointer location on AArch64
@ 2023-02-13 19:56 zach-gcc at cs dot stanford.edu
  2023-02-13 20:00 ` [Bug target/108779] AARCH64 should add an option to change TLS register location to support EL1/EL2/EL3 system registers pinskia at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: zach-gcc at cs dot stanford.edu @ 2023-02-13 19:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108779

            Bug ID: 108779
           Summary: No option to change thread-pointer location on AArch64
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zach-gcc at cs dot stanford.edu
  Target Milestone: ---

On AArch64, GCC uses tpidr_el0 (user-mode accessible) to access the
thread-pointer for loading thread-local variables by default. There is no
option to change this to tpidr_el1 (or tpidr_el2/tpidr_el3), which is necessary
for using thread-local variables in kernel code (or any code that runs at a
higher privilege level). Clang has the `-mtp` option for AArch64
(https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-mtp)
that controls this, but it seems GCC does not. There is a GCC `-mtp` option for
ARM, but not AArch64.

See also the original gcc-help message I sent here:
https://gcc.gnu.org/pipermail/gcc-help/2023-February/142212.html

Thanks!

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-06-13  9:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-13 19:56 [Bug target/108779] New: No option to change thread-pointer location on AArch64 zach-gcc at cs dot stanford.edu
2023-02-13 20:00 ` [Bug target/108779] AARCH64 should add an option to change TLS register location to support EL1/EL2/EL3 system registers pinskia at gcc dot gnu.org
2023-02-14  9:45 ` ktkachov at gcc dot gnu.org
2023-02-14 13:07 ` ktkachov at gcc dot gnu.org
2023-02-14 20:05 ` pinskia at gcc dot gnu.org
2023-02-14 21:11 ` zach-gcc at cs dot stanford.edu
2023-02-26 23:53 ` zach-gcc at cs dot stanford.edu
2023-02-26 23:55 ` pinskia at gcc dot gnu.org
2023-02-27  0:17 ` zach-gcc at cs dot stanford.edu
2023-04-21 18:00 ` cvs-commit at gcc dot gnu.org
2023-04-21 18:01 ` ktkachov at gcc dot gnu.org
2023-06-13  9:17 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).