From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 14C8B38582BE; Mon, 24 Jul 2023 14:01:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14C8B38582BE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690207281; bh=jSKQijQ1UJF34QDTDJLAqCmX63heBs7vkO9IHrsEOdg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=X3R24MiBx8bxvxw4GyfWI7p19LdcytZWS3pbsIpZOAl/NyIh86PhQO+TQ/a9pGWUb DP2hXtS98ZO0QewPqXPCCMYqdi1pSDtXRKBiP7ktXvHofQGWTUoJ/ozf2ZJ0/tGg0c f09yc+sigG4gK8cIoxTScr5xnbogLgWogftKhcUY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110783] bpf; make sure of V4 signed division/modulus instructions Date: Mon, 24 Jul 2023 14:01:20 +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=3D110783 --- Comment #1 from CVS Commits --- The master branch has been updated by Jose E. Marchesi : https://gcc.gnu.org/g:4be3919fb75e3d2a4d2bb80ba33c14e0973bc08f commit r14-2749-g4be3919fb75e3d2a4d2bb80ba33c14e0973bc08f Author: Jose E. Marchesi Date: Mon Jul 24 15:57:05 2023 +0200 bpf: sdiv/smod are now part of BPF V4 We used to support signed division and signed modulus instructions in the XBPF GCC-specific extensions to BPF. However, BPF catched up by adding these instructions in the V4 of the ISA. This patch changes GCC in order to use sdiv/smod instructions when -mcpu=3Dv4 or higher. The testsuite and the manual have been updated accordingly. Tested in bpf-unknown-none. gcc/ChangeLog PR target/110783 * config/bpf/bpf.opt: New command-line option -msdiv. * config/bpf/bpf.md: Conditionalize sdiv/smod on bpf_has_sdiv. * config/bpf/bpf.cc (bpf_option_override): Initialize bpf_has_sdiv. * doc/invoke.texi (eBPF Options): Document -msdiv. gcc/testsuite/ChangeLog PR target/110783 * gcc.target/bpf/xbpf-sdiv-1.c: Renamed to sdiv-1.c * gcc.target/bpf/xbpf-smod-1.c: Renamed to smod-1.c * gcc.target/bpf/sdiv-1.c: Renamed from xbpf-sdiv-1.c, use -mcpu=3Dv4. * gcc.target/bpf/smod-1.c: Renamed from xbpf-smod-1.c, use -mcpu=3Dv4. * gcc.target/bpf/diag-sdiv.c: Use -mcpu=3Dv3. * gcc.target/bpf/diag-smod.c: Likewise.=