From: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
To: Zach 1 <zach1.gcc@gmail.com>,
"gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: RE: Using the kernel thread pointer on aarch64 (tpidr_el1)
Date: Mon, 13 Feb 2023 12:42:50 +0000 [thread overview]
Message-ID: <PAXPR08MB69265DE4B2A4C0E1636CC4A793DD9@PAXPR08MB6926.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CAN0EEuRCjL01rUa5L=3hM3npczZo0EJy=ap2_bOCTWqEh6Y9Kw@mail.gmail.com>
Hello,
> -----Original Message-----
> From: Gcc-help <gcc-help-bounces+kyrylo.tkachov=arm.com@gcc.gnu.org>
> On Behalf Of Zach 1 via Gcc-help
> Sent: Monday, February 13, 2023 2:04 AM
> To: gcc-help@gcc.gnu.org
> Subject: Using the kernel thread pointer on aarch64 (tpidr_el1)
>
> Hi,
>
> On AArch64, GCC seems to use tpidr_el0 (user-mode accessible) to access
> the
> thread pointer for loading thread-local variables by default. I can't find
> any option to change this to tpidr_el1 (or tpidr_el2/tpidr_el3). This is
> necessary for using thread-local variables in kernel code. 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? Does any such option exist,
> and if not is there any chance to add support for it? Thanks for any help.
Looks like this exists for AArch32 (the arm port of GCC):
https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
AArch64 doesn't support but I suppose it wouldn't be hard to add given arm supports it and clang as well.
Could you file a bug report in Bugzilla to keep track of the request please?
Thanks,
Kyrill
>
> Zach
next prev parent reply other threads:[~2023-02-13 12:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 2:03 Zach 1
2023-02-13 12:42 ` Kyrylo Tkachov [this message]
2023-02-13 19:59 ` Zach 1
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PAXPR08MB69265DE4B2A4C0E1636CC4A793DD9@PAXPR08MB6926.eurprd08.prod.outlook.com \
--to=kyrylo.tkachov@arm.com \
--cc=gcc-help@gcc.gnu.org \
--cc=zach1.gcc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).