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

via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 12 12:54:40 PDT 2024


yonghong-song wrote:

@efriedma-quic Thanks for your comments. BPF llvm backend and kernel BPF jit try to make BPF<->other_architecture compatible. riscv started to support BPF starting in 2020 and probably BPF has limited usage so the bug is exposed until now.
Yes, BPFTargetLowering::LowerCall  does do sign-extend arguments marked "signext", and this can help BPF<->other_architecture too. Previously only for char/short (to cover architectures which only have 32bit subregister). Now we found int type also needs support.
BPF community will continuously monitor any potential inter-arch incompatibility issue and once found will address them promptly.

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


More information about the cfe-commits mailing list