[PATCH] D109112: [darwin/x86] Model cxx_fast_tlscc as not preserving r11

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 13 06:26:51 PST 2022


hans added a comment.

Hmm, I think the potential problem here is that dropping R11 <https://reviews.llvm.org/source/libunwind/> from CSR_64_TLS_Darwin does not only change the calling code (which is what we want, and seems like a safe change), but will also change the callee, i.e. the TLS wrapper functions wherever they're generated, to no longer preserve R11 <https://reviews.llvm.org/source/libunwind/> (which they did before, although not when called through the dyld_stub_binder). That would cause a problem if the caller and callee are built by different compiler versions (e.g. an older program calling some newer (system?) library code). I don't know whether that could happen though?

(These registers are also tied up with "split CSRs" somehow, which was added by https://github.com/llvm/llvm-project/commit/abc7c1d1d2d44b4d7416c714a13239872d95a72e followed by AArch64-specific code in https://github.com/llvm/llvm-project/commit/cbe4f9417d1cbb0192173439501fedb782949bad and then x86_64 in https://github.com/llvm/llvm-project/commit/ed967f37520fec398aa419514de552e1a917c9ec
But I'm not sure how relevant that is..)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109112/new/

https://reviews.llvm.org/D109112



More information about the llvm-commits mailing list