From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 933563858401; Mon, 24 Jul 2023 09:02:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 933563858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690189321; bh=3qYosEnNuwoG+lT4JAdiq5IdGMaAiSMcCu/4zUm8IDc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WqFG72iuWrS1uznMy63miCsyCpa4ZN6nGkoTup4KR4BTH7kUU6k+ixR3m3NrpQ4OS TrMQJt4RouENs04m2tAdz/OwMXnRcgWUZxAoLsY3WxAvv9LEKtKS5WHHLEBkDLBB0B IfMO6aUi1RpIsoEWxv2eMK2xpWpEJnNHGP3Q4THw= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110786] bpf: make use of the V4 byte swap instructions Date: Mon, 24 Jul 2023 09:02:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jemarch at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110786 --- Comment #1 from CVS Commits --- The master branch has been updated by Jose E. Marchesi : https://gcc.gnu.org/g:f1e34551e4d6e259ab3bd0c9aba4fa1f0c448214 commit r14-2741-gf1e34551e4d6e259ab3bd0c9aba4fa1f0c448214 Author: Jose E. Marchesi Date: Mon Jul 24 10:56:27 2023 +0200 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=3Dv4 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_V= 4. * 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=3Dv4 and -mbsw= ap. gcc/testsuite/ChangeLog PR target/110786 * gcc.target/bpf/bswap-1.c: Pass -mcpu=3Dv3 to build test. * gcc.target/bpf/bswap-2.c: New test.=