diff options
author | Cupertino Miranda <cupertino.miranda@oracle.com> | 2023-11-23 22:28:01 +0000 |
---|---|---|
committer | Cupertino Miranda <cupertino.miranda@oracle.com> | 2023-11-28 12:54:19 +0000 |
commit | faf5b148588bd7fbb60ec669aefa704044037cdc (patch) | |
tree | e2d1eaf343522a6382b1b488caa2dc07f68ab622 /gcc/tree.cc | |
parent | f5f885dd29846a7aa3e3551b74e2f8d68241e4a0 (diff) | |
download | gcc-faf5b148588bd7fbb60ec669aefa704044037cdc.zip gcc-faf5b148588bd7fbb60ec669aefa704044037cdc.tar.gz gcc-faf5b148588bd7fbb60ec669aefa704044037cdc.tar.bz2 |
This patch enables errors when external calls are created.
When architectural limitations or usage of builtins implies the compiler
to create function calls to external libraries that implement the
functionality, GCC will now report an error claiming that this function
calls are not compatible with eBPF target.
Examples of those are the usage of __builtin_memmove and a sign division
in BPF ISA v3 or below that will require to call __divdi3.
This is currently an eBPF limitation which does not support linking of
object files but rather "raw" non linked ones. Those object files are
loaded and relocated by libbpf and the kernel.
gcc/ChangeLog:
* config/bpf/bpf.cc (bpf_output_call): Report error in case the
function call is for a builtin.
(bpf_external_libcall): Added target hook to detect and report
error when other external calls that are not builtins.
gcc/testsuite/ChangeLog:
* gcc.target/bpf/atomic-cmpxchg-2.c: Adapted.
* gcc.target/bpf/atomic-fetch-op-3.c: Adapted.
* gcc.target/bpf/atomic-op-3.c: Adapted.
* gcc.target/bpf/atomic-xchg-2.c: Adapted.
* gcc.target/bpf/diag-sdiv.c: Adapted.
* gcc.target/bpf/diag-smod.c: Adapted.
Diffstat (limited to 'gcc/tree.cc')
0 files changed, 0 insertions, 0 deletions