Message ID | 20240125140957.1513119-1-mary.bennett@embecosm.com |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6359:bb0:b0:176:abc2:f11e with SMTP id gf48csp259379rwb; Thu, 25 Jan 2024 06:11:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqrb6gaW0sAfdGkMIhJIQXanFITco/lDgp4/flAeiwFohwgLzldBTaKE11swMqpPrGrWnw X-Received: by 2002:ac8:4e19:0:b0:42a:6e58:6746 with SMTP id c25-20020ac84e19000000b0042a6e586746mr482846qtw.81.1706191900021; Thu, 25 Jan 2024 06:11:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706191900; cv=pass; d=google.com; s=arc-20160816; b=RGf+1qC4LTgiSeppXRAWVGhMYdiNJH/E2iqyZXp05sHLNEsNpEi2jLBTbI6nZA4qXU 2py9Hy023a4KBRUj1rKruZcmnvV988FikIZRqRB18tF5JW7/OsGApHh0i9G1P+w3hBAM HsY6eh8yjqWKxNoisC6nvZq2b8I0sRVSy0/X7/Kc+yfp26/WZBtna5UecLhpJaFqlqYk aVlEF2tj1P/lC04QhvoWeXoOY+G/T8ETc/+9qW4v3T5TNm/xUpRRCCmdJ4XE1aUmwvj1 XfUM0px0StcDen98Cwm2w63g+7d0OzVbCs2eS5GzaLGSPOvI5pC3lL4eghWwFXAKldIM elPQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=ndGoyXgVUgzeuYaOQSoduQSse9yT6gbeWLSGGIhPED4=; fh=qiT4HZV9olO2fGAIgbF8w4l7HXh8ja5CJNGeguP7WSc=; b=oab+fZNHO27kNQKSIR/GGlLv373dO6F6Y71zJ4rT+tjAztlKt1le04IhKL/nAWhKlR tvLLOxIEJsPIbNGIAHDEJgr2UVjL7nc/Cz2qGaaMJpMicBTEQ+PKd4uOGP5VB4I0AUX9 i1j71APFNOZc+yifz3yhJuxhpCWehdOrtCsoBoLb01BHHbuMOCKkJw+3s0B1v4Atx7pi Er5vADGRkNDili+4yYGj6cp2NsF1lSfD1SjNm2UQB35cIsXDTyRO/S7Hxdl213gZJDox ae3nTCVwaLiLrP026dyebgfdyNYtvchhfYYq5RzzknU/NfvN5EvsVEUBbkyBwzzIhnY2 vQWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=P4wg5cpq; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id a21-20020ac85b95000000b0042a5d5b3304si3931470qta.282.2024.01.25.06.11.39 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 06:11:40 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=P4wg5cpq; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B8E973857C66 for <ouuuleilei@gmail.com>; Thu, 25 Jan 2024 14:11:39 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id A75EA3858C60 for <gcc-patches@gcc.gnu.org>; Thu, 25 Jan 2024 14:10:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A75EA3858C60 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A75EA3858C60 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706191835; cv=none; b=vaLoFzvSCkTlA2NLZOXtAv7c0+VX3OeqJga08QpwaiABy2io66SA7TNfRl3y4fehe91GnfxyizeUczG+aqxSSUsuy+l1ZCdW+sJdtDw6868D0+Y02gFqPLwvEFdQE34AH1mIGejOxmmJYX90ERH5kn8jbtRZw4rJRlTgojLi4hU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706191835; c=relaxed/simple; bh=lOAtxsL+Qjt2Jh0oHDAVLPOaQxRzR4PbK2Wyud+8VzA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=bHfF1k+7y0WGhDF4fXAa29Qxkkcxon3jphDjwHm6nArRp4FhRBaf9UfXlrPzegR53+ODYztOZvSeQ9tfGp2M1GGt+9QLXq+TWH1lCqrLAG8NG6L6QCplQykv5oZHy2pmnpDwuH7IK7ZopS0il76LKi3AxWZ5z6qYtH/PMTivKwo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40e5afc18f5so72847145e9.3 for <gcc-patches@gcc.gnu.org>; Thu, 25 Jan 2024 06:10:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1706191822; x=1706796622; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ndGoyXgVUgzeuYaOQSoduQSse9yT6gbeWLSGGIhPED4=; b=P4wg5cpqTPm/et1QDFuwKwQfXq6ysn/SsahRMLag+ALIxDstq9g3Le+F6je9BRGD2i HTK1IiKZTdBJfZadP6g9TA5/W2htsj0HO7axzAP0QdE5igOT4y7Bpa16clqF6ycFI3zz vloIQtDqz8x6BgNgk/8kz5gXibJqzKtzReDBtHUPNtYEkMLItN8kcZqua1malV2xpMI6 cvJ9bGFQrlSMNX/WwFH5rIOhUSMyTMeEGhV2qp+eTxNzWqQ2jCQ/KS84tV53HnTgv0R/ 8QD8xSxf4PWhpkMpT9Pvdk3DhdefLv4EHa6czHdux9otH/GorFHrGpvZ+0KzOA82JR7w XQvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706191822; x=1706796622; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ndGoyXgVUgzeuYaOQSoduQSse9yT6gbeWLSGGIhPED4=; b=UVIyszBeU772HaxescIZBeXTsfG8ltG9BcCuVTNUCu4dYWXshaD+AXJ/RCVba3iRtD BQlmw7vcMqwnUY27Uan2RGaR22tgbsF6cHiSGiUahxU2dxBpmP11Pa7177HlBKEciGJO zp1wDLS2RgOgBrf4Kmip5Bpya8MuGVMyv2bPA9JrAqdVUlk0FJGuBvZLxg2gt5Ka/ebA za9TwnGPGS8ptpd9cLXvd3f1GOTqZf801q3X6vLiC+phZG5/Fb9DaQNbyR4SE5D1w9lt CfZNaJV1+3s+l3+pgHAJ5SuCOghnC98q7EuRE2ju2hTy6zEkx0o3Qwgggu0gA3Abr4wa yi8Q== X-Gm-Message-State: AOJu0Yyl9Jz9Nimbh2nKZZWCsMofbIu96rCn5Z44ozipug/jmaqjrmsZ RdqO7nAGd+cI/HZu6rp6Nvvfifrl0brTimQy9HbRDvjtBFYs0m+cMdY4WMStDZ+mhzmpyRFxqHG FbR0= X-Received: by 2002:a05:600c:5249:b0:40d:5575:a197 with SMTP id fc9-20020a05600c524900b0040d5575a197mr642382wmb.12.1706191821863; Thu, 25 Jan 2024 06:10:21 -0800 (PST) Received: from troughton.lym.embecosm-corp.com ([212.69.42.53]) by smtp.gmail.com with ESMTPSA id iv10-20020a05600c548a00b0040e9d507424sm2722016wmb.5.2024.01.25.06.10.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 06:10:21 -0800 (PST) From: Mary Bennett <mary.bennett@embecosm.com> To: gcc-patches@gcc.gnu.org Cc: mary.bennett@embecosm.com Subject: [PATCH v4 0/1] RISC-V: Support CORE-V XCVBITMAIP extension Date: Thu, 25 Jan 2024 14:09:56 +0000 Message-Id: <20240125140957.1513119-1-mary.bennett@embecosm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240122171503.807456-2-mary.bennett@embecosm.com> References: <20240122171503.807456-2-mary.bennett@embecosm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789071877873867490 X-GMAIL-MSGID: 1789071877873867490 |
Series |
RISC-V: Support CORE-V XCVBITMAIP extension
|
|
Message
Mary Bennett
Jan. 25, 2024, 2:09 p.m. UTC
This patch series presents the comprehensive implementation of the BITMANIP extension for CORE-V. Tested with riscv-gnu-toolchain on binutils, ld, gas and gcc testsuites to ensure its correctness and compatibility with the existing codebase. However, your input, reviews, and suggestions are invaluable in making this extension even more robust. The CORE-V builtins are described in the specification [1] and work can be found in the OpenHW group's Github repository [2]. [1] github.com/openhwgroup/core-v-sw/blob/master/specifications/corev-builtin-spec.md [2] github.com/openhwgroup/corev-gcc Contributors: Mary Bennett <mary.bennett@embecosm.com> Nandni Jamnadas <nandni.jamnadas@embecosm.com> Pietra Ferreira <pietra.ferreira@embecosm.com> Charlie Keaney Jessica Mills Craig Blackmore <craig.blackmore@embecosm.com> Simon Cook <simon.cook@embecosm.com> Jeremy Bennett <jeremy.bennett@embecosm.com> Helene Chelin <helene.chelin@embecosm.com> RISC-V: Add support for XCVbitmanip extension in CV32E40P gcc/common/config/riscv/riscv-common.cc | 2 + gcc/config/riscv/constraints.md | 16 ++ gcc/config/riscv/corev.def | 13 ++ gcc/config/riscv/corev.md | 182 ++++++++++++++++++ gcc/config/riscv/predicates.md | 16 ++ gcc/config/riscv/riscv-builtins.cc | 1 + gcc/config/riscv/riscv-ftypes.def | 5 + gcc/config/riscv/riscv.cc | 13 ++ gcc/config/riscv/riscv.opt | 2 + gcc/doc/extend.texi | 53 +++++ gcc/doc/sourcebuild.texi | 3 + .../riscv/cv-bitmanip-compile-bclr.c | 27 +++ .../riscv/cv-bitmanip-compile-bclrr.c | 18 ++ .../riscv/cv-bitmanip-compile-bitrev.c | 30 +++ .../riscv/cv-bitmanip-compile-bset.c | 27 +++ .../riscv/cv-bitmanip-compile-bsetr.c | 18 ++ .../riscv/cv-bitmanip-compile-clb.c | 18 ++ .../riscv/cv-bitmanip-compile-cnt.c | 18 ++ .../riscv/cv-bitmanip-compile-extract.c | 27 +++ .../riscv/cv-bitmanip-compile-extractr.c | 18 ++ .../riscv/cv-bitmanip-compile-extractu.c | 27 +++ .../riscv/cv-bitmanip-compile-extractur.c | 18 ++ .../riscv/cv-bitmanip-compile-ff1.c | 18 ++ .../riscv/cv-bitmanip-compile-fl1.c | 18 ++ .../riscv/cv-bitmanip-compile-insert.c | 24 +++ .../riscv/cv-bitmanip-compile-insertr.c | 18 ++ .../riscv/cv-bitmanip-compile-ror.c | 18 ++ .../riscv/cv-bitmanip-fail-compile-bclr.c | 25 +++ .../riscv/cv-bitmanip-fail-compile-bitrev.c | 23 +++ .../riscv/cv-bitmanip-fail-compile-bset.c | 25 +++ .../riscv/cv-bitmanip-fail-compile-extract.c | 25 +++ .../riscv/cv-bitmanip-fail-compile-extractu.c | 25 +++ .../riscv/cv-bitmanip-fail-compile-insert.c | 25 +++ gcc/testsuite/lib/target-supports.exp | 13 ++ 34 files changed, 809 insertions(+) create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-bclr.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-bclrr.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-bitrev.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-bset.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-bsetr.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-clb.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-cnt.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-extract.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-extractr.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-extractu.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-extractur.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-ff1.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-fl1.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-insert.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-insertr.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-compile-ror.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-fail-compile-bclr.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-fail-compile-bitrev.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-fail-compile-bset.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-fail-compile-extract.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-fail-compile-extractu.c create mode 100644 gcc/testsuite/gcc.target/riscv/cv-bitmanip-fail-compile-insert.c