public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "crazylht at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/96955] Implement __builtin_thread_pointer for x86 TLS
Date: Tue, 08 Sep 2020 08:15:02 +0000 [thread overview]
Message-ID: <bug-96955-4-OUQBjhJAGP@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96955-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96955
--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Jakub Jelinek from comment #1)
> And if possible, optimize, so that if one does say
> int *p = (int *)__builtin_thread_pointer ();
> return p[4];
> or
> return p[i];
> it will not read %fs:0 into a register and read 16(%reg), but rather read
> %fs:16
> etc. (of course only if not -mno-tls-direct-seg-refs) or not read
> 16(%reg,%regI,4) but %fs:16(,%regI,4) etc.
This optimization already exists in i386/x86-64 backend.
next prev parent reply other threads:[~2020-09-08 8:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-07 13:46 [Bug target/96955] New: Implement __builtin_thread_pointer hjl.tools at gmail dot com
2020-09-07 14:05 ` [Bug target/96955] Implement __builtin_thread_pointer for x86 TLS jakub at gcc dot gnu.org
2020-09-08 6:54 ` crazylht at gmail dot com
2020-09-08 8:15 ` crazylht at gmail dot com [this message]
2020-09-09 8:29 ` cvs-commit at gcc dot gnu.org
2020-09-09 8:40 ` crazylht at gmail dot com
2020-09-09 11:05 ` hjl.tools at gmail dot com
2020-09-09 17:44 ` cvs-commit at gcc dot gnu.org
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=bug-96955-4-OUQBjhJAGP@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).