[llvm] [BPF] Implement `canLowerReturn` for big returns (PR #174478)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 14 16:07:33 PST 2026
eddyz87 wrote:
> > stop-gap
>
> as soon as we make llvm not-fail on i128 it becomes public abi that we need to agree on with GCC folks and document in Documentation/bpf/standardization/abi.rst which is trending to be an IETF draft. To define it we have to implement kernel and verifier support too. There is no 'stop-gap solution'. Either we do it all or none of it. If we do it we should define small struct return (less than 16 bytes) too. I say, both should use r0,r1 to return.
`r0`, `r1` for small struct return sounds good. However, I disagree that we opt for an ABI with the current series as-is. Compilers are free to lower code all they want. If Rust BPF backend opts to lower `i128` parameters as stack allocated entities and a pointer, so what?
Anyway, `r0` / `r1` is more elegant, but someone needs to work on verifier support. @LucasSte, are you willing to?
https://github.com/llvm/llvm-project/pull/174478
More information about the llvm-commits
mailing list