[clang] [RISCV][clang] Support XSfmm ABI attributes (PR #206260)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 14 14:51:15 PDT 2026
efriedma-quic wrote:
The names seem very similar to the Arm ones, but the semantics are subtly different. I guess the biggest difference is the treatment of `__riscv_new`: there is no mechanism for spilling, it's just a hard error if you use a "new" function, or an unmarked function.
This is potentially a bit messy for the backend: it implies the compiler can't introduce calls as part of lowering. Or maybe, the compiler can only introduce calls to `__riscv_preserves` functions. But we don't really know what `memcpy` does internally, besides assuming it follows normal C ABI rules.
It also implies certain functions implicitly called by the runtime linker, like `_dl_runtime_resolve`, also preserve these registers, but I'm not sure if that's likely to lead to practical problems.
I'm not sure how we want to model this restriction.
https://github.com/llvm/llvm-project/pull/206260
More information about the cfe-commits
mailing list