From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
To: David Faust via Gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 0/3] bpf: add -mcpu and related feature options
Date: Fri, 10 Sep 2021 16:11:57 +0200 [thread overview]
Message-ID: <878s04seoi.fsf@oracle.com> (raw)
In-Reply-To: <20210909213645.11605-1-david.faust@oracle.com> (David Faust via Gcc-patches's message of "Thu, 9 Sep 2021 14:36:42 -0700")
Hi David.
> New instructions have been added over time to the eBPF ISA, but
> previously there has been no good method to select which version to
> target in GCC.
>
> This patch adds the following options to the BPF backend:
>
> -mcpu={v1, v2, v3}
> Select which version of the eBPF ISA to target. This enables or
> disables generation of certain instructions. The default is v3.
>
> -mjmpext
> Enable extra conditional branch instructions.
> Enabled for CPU v2 and above.
>
> -mjmp32
> Enable 32-bit jump/branch instructions.
> Enabled for CPU v3 and above.
>
> -malu32
> Enable 32-bit ALU instructions.
> Enabled for CPU v3 and above.
>
> Negative versions of -mjmpext, -mjmp32, and -malu32 options are also
> supported.
The series is OK.
Thanks!
>
> David Faust (3):
> bpf: add -mcpu and related feature options
> bpf testsuite: add tests for new feature options
> doc: document BPF -mcpu and related options
>
> gcc/config/bpf/bpf-opts.h | 7 ++++
> gcc/config/bpf/bpf-protos.h | 1 +
> gcc/config/bpf/bpf.c | 41 ++++++++++++++++++++
> gcc/config/bpf/bpf.md | 44 +++++++++++----------
> gcc/config/bpf/bpf.opt | 29 ++++++++++++++
> gcc/doc/invoke.texi | 39 ++++++++++++++++++-
> gcc/testsuite/gcc.target/bpf/alu-1.c | 56 +++++++++++++++++++++++++++
> gcc/testsuite/gcc.target/bpf/jmp-1.c | 57 ++++++++++++++++++++++++++++
> 8 files changed, 253 insertions(+), 21 deletions(-)
> create mode 100644 gcc/testsuite/gcc.target/bpf/alu-1.c
> create mode 100644 gcc/testsuite/gcc.target/bpf/jmp-1.c
prev parent reply other threads:[~2021-09-10 14:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-09 21:36 David Faust
2021-09-09 21:36 ` [PATCH 1/3] " David Faust
2021-09-09 21:36 ` [PATCH 2/3] bpf testsuite: add tests for new " David Faust
2021-09-09 21:36 ` [PATCH 3/3] doc: document BPF -mcpu and related options David Faust
2021-09-10 14:11 ` Jose E. Marchesi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878s04seoi.fsf@oracle.com \
--to=jose.marchesi@oracle.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).