[clang] [llvm] [Clang][BPF] Allow sign extension for call parameters with int types (PR #84874)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 16:37:05 PDT 2024


4ast wrote:

> Just uploaded a new revision which targets 'Int' type only, i.e, v1.

Looks like it's a bug in risc-v JIT. We never promised that kfunc call from bpf calling convention into native cpu calling convention will be free on all architectures. That's why we have btf_func_model and JITs suppose to use it when calling conventions don't match. It seems risc-v JIT needs to emit sign extension when 'int' argument is passed into kfunc.
Simple stuff, comparing to what we do in 32-bit x86 JIT where 64-bit bpf program can call into 32-bit x86 kfunc.

https://github.com/llvm/llvm-project/pull/84874


More information about the llvm-commits mailing list