https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111046

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jose E. Marchesi <jema...@gcc.gnu.org>:

https://gcc.gnu.org/g:b7c50f68f26146e7038e9793b6c623ff4c4895d3

commit r14-3284-gb7c50f68f26146e7038e9793b6c623ff4c4895d3
Author: Jose E. Marchesi <jose.march...@oracle.com>
Date:   Thu Aug 17 14:19:15 2023 +0200

    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.

Reply via email to