public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/96955] New: Implement __builtin_thread_pointer
@ 2020-09-07 13:46 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
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2020-09-07 13:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96955
           Summary: Implement __builtin_thread_pointer
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: crazylht at gmail dot com, wwwhhhyyy333 at gmail dot com
            Blocks: 96200
  Target Milestone: ---
            Target: i386,x86-64

On Linux/x86-64, The %fs segment register is used to implement the thread
pointer. The linear address of the thread pointer is stored at offset 0
relative to the %fs segment register. The following code loads the thread
pointer in the %rax register:

movq %fs:0, %rax

On Linux/i386, the %gs segment register is used:

movl %gs:0, %eax

We need to

1. Implement __builtin_thread_pointer for Linux/x86.
2. Document its behavior.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96200
[Bug 96200] Implement __builtin_thread_pointer() and
__builtin_set_thread_pointer() if TLS is supported

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

end of thread, other threads:[~2020-09-09 17:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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