[llvm] Declare TLSDESC clobbers for vector registers and CSRs per psABI (PR #205027)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 22 19:51:22 PDT 2026


LukeZhuang wrote:

> Overall, this patch looks like its in good shape, and aligns with what's in the RISC-V psABI. I do have one concern, which I've raised in-line that I think we may want to discuss further w/ the psABI and external communities. I don't see this concern as blocking, though I'd like to get at least a bit of alignment on the issue or clarification so that we can either bring these up w/ the psABI w/ concrete ideas or document why we don't see this as a problem.

Thanks @ilovepi  for raising this! And yes if so, I agree that it's worth discussing. In my humble opinion, as Kito also mentioned in psABI#496, one reason maybe that TLS code usually does not happen in V-code, so the downside maybe not so drastic. While yes, I guess we may need opinion from more experts :)

For now, May I ask what do you suggest we should do to this patch, add an option to disable V-clobbering or leave a TODO there, or wait till psABI discussion is all settled?

BTW I'm not quite familiar with Musl or Fuchsia, may I ask why don't they need the slow path? In my understanding, Musl has `dlopen` thus it needs dynamic TLS blocks, so I'm curious how it's got handled without the slow path (does it implement a "fully-inlined" `tls_get_addr` in tlsdesc handler?). Please correct me if I've misunderstood anything.

https://github.com/llvm/llvm-project/pull/205027


More information about the llvm-commits mailing list