diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2023-08-17 14:19:15 +0200 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2023-08-17 14:39:46 +0200 |
commit | b7c50f68f26146e7038e9793b6c623ff4c4895d3 (patch) | |
tree | 2f26cfb119123da68cfc7190dc586364aa1b0ea3 /libgomp/allocator.c | |
parent | d07bce478f9d770de5acb0480a3f0cec2f8b72d8 (diff) | |
download | gcc-b7c50f68f26146e7038e9793b6c623ff4c4895d3.zip gcc-b7c50f68f26146e7038e9793b6c623ff4c4895d3.tar.gz gcc-b7c50f68f26146e7038e9793b6c623ff4c4895d3.tar.bz2 |
bpf: support `naked' function attributes in BPF targets
The kernel selftests and other BPF programs make extensive use of the
`naked' function attribute with bodies written using basic inline
assembly. This patch adds support for the attribute to
bpf-unkonwn-none, makes it to inhibit warnings due to lack of explicit
`return' statement, and updates documentation and testsuite
accordingly.
Tested in x86_64-linux-gnu host and bpf-unknown-none target.
gcc/ChangeLog
PR target/111046
* config/bpf/bpf.cc (bpf_attribute_table): Add entry for the
`naked' function attribute.
(bpf_warn_func_return): New function.
(TARGET_WARN_FUNC_RETURN): Define.
(bpf_expand_prologue): Add preventive comment.
(bpf_expand_epilogue): Likewise.
* doc/extend.texi (BPF Function Attributes): Document the `naked'
function attribute.
gcc/testsuite/ChangeLog
* gcc.target/bpf/naked-1.c: New test.
Diffstat (limited to 'libgomp/allocator.c')
0 files changed, 0 insertions, 0 deletions