-
- Downloads
bpf: allow exceeding max num of args in BPF when always_inline
BPF currently limits the number of registers used to pass arguments to functions to five registers. There is a check for this at function expansion time. However, if a function is guaranteed to be always inlined (and its body never generated) by virtue of the always_inline attribute, it can "receive" any number of arguments. Tested in host x86_64-linux-gnu and target bpf-unknown-none. gcc/ChangeLog * config/bpf/bpf.cc (bpf_function_arg_advance): Do not complain about too many arguments if function is always inlined. gcc/testsuite/ChangeLog * gcc.target/bpf/diag-funargs-inline-1.c: New test. * gcc.target/bpf/diag-funargs.c: Adapt test.
Showing
- gcc/config/bpf/bpf.cc 8 additions, 1 deletiongcc/config/bpf/bpf.cc
- gcc/testsuite/gcc.target/bpf/diag-funargs-inline-1.c 21 additions, 0 deletionsgcc/testsuite/gcc.target/bpf/diag-funargs-inline-1.c
- gcc/testsuite/gcc.target/bpf/diag-funargs.c 7 additions, 1 deletiongcc/testsuite/gcc.target/bpf/diag-funargs.c
Loading
Please register or sign in to comment