diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2023-07-24 10:56:27 +0200 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2023-07-24 11:01:35 +0200 |
commit | f1e34551e4d6e259ab3bd0c9aba4fa1f0c448214 (patch) | |
tree | f2e5953e8ea087dc908bf5d45f0b7b72f8acebd2 /gcc/tree-vectorizer.h | |
parent | 8390a2af1397ba86ea2cf80d58007b8b69a9a6eb (diff) | |
download | gcc-f1e34551e4d6e259ab3bd0c9aba4fa1f0c448214.zip gcc-f1e34551e4d6e259ab3bd0c9aba4fa1f0c448214.tar.gz gcc-f1e34551e4d6e259ab3bd0c9aba4fa1f0c448214.tar.bz2 |
bpf: make use of the bswap{16,32,64} V4 BPF instruction
This patch makes the BPF backend to use the new V4 bswap{16,32,64}
instructions in order to implement the __builtin_bswap{16,32,64}
built-ins. It also adds support for -mcpu=v4 and -m[no]bswap
command-line options. Tests and doc updates are includes.
Tested in bpf-unknown-none.
gcc/ChangeLog
PR target/110786
* config/bpf/bpf.opt (mcpu): Add ISA_V4 and make it the default.
(mbswap): New option.
* config/bpf/bpf-opts.h (enum bpf_isa_version): New value ISA_V4.
* config/bpf/bpf.cc (bpf_option_override): Set bpf_has_bswap.
* config/bpf/bpf.md: Use bswap instructions if available for
bswap* insn, and fix constraint.
* doc/invoke.texi (eBPF Options): Document -mcpu=v4 and -mbswap.
gcc/testsuite/ChangeLog
PR target/110786
* gcc.target/bpf/bswap-1.c: Pass -mcpu=v3 to build test.
* gcc.target/bpf/bswap-2.c: New test.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions