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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to