public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/31372] _dl_tlsdesc_dynamic doesn't preserve vector registers
Date: Mon, 12 Feb 2024 13:10:43 +0000	[thread overview]
Message-ID: <bug-31372-131-1l27JOzHpY@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31372-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=31372

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Florian Weimer from comment #3)
> (In reply to Florian Weimer from comment #2)
> > I think we need more discussion what the ABI should be like.
> > 
> > The trampoline does not need to save argument registers.
> 
> Or maybe it does. We should have official ABI clarification.

It is explicitly documented:

https://www.fsfla.org/~lxoliva/writeups/TLS/RFC-TLSDESC-x86.txt

---
The functions defined above use custom calling conventions that
require them to preserve any registers they modify.  This penalizes
the case that requires dynamic TLS, since it must preserve (*) all
call-clobbered registers before calling __tls_get_addr(), but it is
optimized for the most common case of static TLS, and also for the
case in which the code generated by the compiler can be relaxed by the
linker to a more efficient access model: being able to assume no
registers are clobbered by the call tends to improve register
allocation.  Also, the function that handles the dynamic TLS case will
most often be able to avoid calling __tls_get_addr(), thus potentially
avoiding the need for preserving registers.
---

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2024-02-12 13:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-11 23:04 [Bug dynamic-link/31372] New: " hjl.tools at gmail dot com
2024-02-11 23:05 ` [Bug dynamic-link/31372] " hjl.tools at gmail dot com
2024-02-11 23:18 ` hjl.tools at gmail dot com
2024-02-12  6:59 ` fw at deneb dot enyo.de
2024-02-12  7:11 ` sam at gentoo dot org
2024-02-12 10:46 ` fweimer at redhat dot com
2024-02-12 13:10 ` hjl.tools at gmail dot com [this message]
2024-02-14 15:04 ` [Bug dynamic-link/31372] _dl_tlsdesc_dynamic doesn't preserve all caller-saved registers hjl.tools at gmail dot com
2024-02-14 21:09 ` ismail at i10z dot com
2024-02-15 12:13 ` hjl.tools at gmail dot com
2024-02-15 20:39 ` hjl.tools at gmail dot com
2024-02-15 20:40 ` sam at gentoo dot org
2024-02-15 20:44 ` hjl.tools at gmail dot com
2024-02-15 21:07 ` sam at gentoo dot org
2024-02-15 21:14 ` hjl.tools at gmail dot com
2024-02-28 17:05 ` cvs-commit at gcc dot gnu.org
2024-02-29 12:31 ` cvs-commit at gcc dot gnu.org
2024-03-20 15:37 ` fweimer at redhat dot com
2024-04-02 13:16 ` carlos at redhat dot com
2024-04-03 17:42 ` cvs-commit at gcc dot gnu.org
2024-04-03 17:43 ` cvs-commit at gcc dot gnu.org
2024-04-11 19:06 ` adhemerval.zanella at linaro dot 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-31372-131-1l27JOzHpY@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.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).