public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/111046] New: bpf: support naked functions in BPF
@ 2023-08-17 10:51 jemarch at gcc dot gnu.org
  2023-08-17 12:40 ` [Bug target/111046] " cvs-commit at gcc dot gnu.org
  2023-08-17 12:47 ` jemarch at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: jemarch at gcc dot gnu.org @ 2023-08-17 10:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111046
           Summary: bpf: support naked functions in BPF
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jemarch at gcc dot gnu.org
  Target Milestone: ---

BPF programs make use of the `naked' function attribute.  This attribute is
supported by several targets in GCC but not currently by bpf targets.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/111046] bpf: support naked functions in BPF
  2023-08-17 10:51 [Bug target/111046] New: bpf: support naked functions in BPF jemarch at gcc dot gnu.org
@ 2023-08-17 12:40 ` cvs-commit at gcc dot gnu.org
  2023-08-17 12:47 ` jemarch at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-17 12:40 UTC (permalink / raw)
  To: gcc-bugs

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 <jemarch@gcc.gnu.org>:

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

commit r14-3284-gb7c50f68f26146e7038e9793b6c623ff4c4895d3
Author: Jose E. Marchesi <jose.marchesi@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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/111046] bpf: support naked functions in BPF
  2023-08-17 10:51 [Bug target/111046] New: bpf: support naked functions in BPF jemarch at gcc dot gnu.org
  2023-08-17 12:40 ` [Bug target/111046] " cvs-commit at gcc dot gnu.org
@ 2023-08-17 12:47 ` jemarch at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jemarch at gcc dot gnu.org @ 2023-08-17 12:47 UTC (permalink / raw)
  To: gcc-bugs

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

Jose E. Marchesi <jemarch at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Jose E. Marchesi <jemarch at gcc dot gnu.org> ---
Fixed with the above commit.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-17 12:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-17 10:51 [Bug target/111046] New: bpf: support naked functions in BPF jemarch at gcc dot gnu.org
2023-08-17 12:40 ` [Bug target/111046] " cvs-commit at gcc dot gnu.org
2023-08-17 12:47 ` jemarch at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).