public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Zach 1 <zach1.gcc@gmail.com>
To: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
Cc: "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 11:59:21 -0800	[thread overview]
Message-ID: <CAN0EEuSWree_61aFbaZ6oVqr6rtQ4oJyPciUfWuwRk2is_UdnQ@mail.gmail.com> (raw)
In-Reply-To: <PAXPR08MB69265DE4B2A4C0E1636CC4A793DD9@PAXPR08MB6926.eurprd08.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1437 bytes --]

Thanks, I have filed a Bugzilla report here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108779.

On Mon, Feb 13, 2023 at 4:43 AM Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
wrote:

> 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
>

      reply	other threads:[~2023-02-13 19:59 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
2023-02-13 19:59   ` Zach 1 [this message]

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=CAN0EEuSWree_61aFbaZ6oVqr6rtQ4oJyPciUfWuwRk2is_UdnQ@mail.gmail.com \
    --to=zach1.gcc@gmail.com \
    --cc=Kyrylo.Tkachov@arm.com \
    --cc=gcc-help@gcc.gnu.org \
    /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).