[llvm] [BPF] Implement `canLowerReturn` for big returns (PR #174478)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 11 10:55:49 PST 2026
yonghong-song wrote:
> Is there a reason why instead of doing this, we don't return 128 bit values in two registers r0 and r1?
>
> > Could you illustrate how this could be used by internal functions? It would be great if you have more details on this in description above.
>
> This PR would allow rust function to return `u128`, which is a primitive type. But IMO we should implement that with two registers like many other backends do, instead of making the result indirect, so the caller doesn't need to reload from the stack.
The BPF ABI does not allow to return two registers. This will break linux kernel verifier.
https://github.com/llvm/llvm-project/pull/174478
More information about the llvm-commits
mailing list