Message ID | 20231109105542.4013483-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:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp350926vqs; Thu, 9 Nov 2023 02:56:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0Y8RLLSEABxhg+3VBzai5h6B4MQi6kSboVY19wbtl9mP0SXx17fnsSxFTI3YruTfJdmuu X-Received: by 2002:ac8:5545:0:b0:40a:fc6a:e87b with SMTP id o5-20020ac85545000000b0040afc6ae87bmr4013774qtr.22.1699527393336; Thu, 09 Nov 2023 02:56:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699527393; cv=pass; d=google.com; s=arc-20160816; b=MxDUqWAXE7FJwkIwHtUgFz+wMUdKR0XT0Ny/itzo3Mob8OE8s3j/2Pg7x02H0pdS4A JwAOCebSt6AF+dA9jO/RIPJD6qPlv8fQYgabJ8GKyxxMrn9S8f3iNZ8Hc9+qM8PI1zPN Hq2CAV5nLZpnxgBdUeUKIVAnehy4NCLC/ieuhOGC6KoPRf+9WdqOdpBjwt9uFzal2/PA 6+iArMM72QkmeHUv6676RaNamFyetPjzVmCd3wW0xFavuur6Tb/T/41+jomjk9u1zjiN wD43NDACez6zTr33k7uosKNb5C+YemUMqeHkc96MG+g4nmW+qtwT/rjzoqxWOdg3qDtW cXxQ== 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:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=jOJx26g1STVUOVjen/4pc73EZlL31qLZaRxt4YVMZpM=; fh=qiT4HZV9olO2fGAIgbF8w4l7HXh8ja5CJNGeguP7WSc=; b=d+9muX7AzbY8L1qnT8uc/lTgpSRyYtnsav/5JZOUSsc4yn5aa2KtCbQEPJ+dSzorp/ VFugo0RPa+AnfS9IdTnkRl7LxOX3mwnhvLsfmmsVYtXo30LuF7uB54pshdkvpZ8D36Ca QhUomZDDyk3CyQTN5M85dAv5qQGjNMOXYxs8DoZo94wBMPY+AeVgYiV/W7RDeMZQ3rBy petM0pS/5c4WJ39rrfNT3JqtnT9cY0armPSZ+bhMPkSEqODzprCxR5lImF11QZi2wuq1 etG5veq7elLPpuIRRiIQnT+HCrFw8a5tXPGtHoJC1nT/nESdAq/JNvFJ65LityULcHo/ UHDg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=MlPyfjl9; 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 h12-20020ac85e0c000000b0040fd9f98527si2668528qtx.754.2023.11.09.02.56.33 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 02:56:33 -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=MlPyfjl9; 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 19E45385B52A for <ouuuleilei@gmail.com>; Thu, 9 Nov 2023 10:56:33 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id 804F03858C01 for <gcc-patches@gcc.gnu.org>; Thu, 9 Nov 2023 10:56:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 804F03858C01 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 804F03858C01 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::330 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699527369; cv=none; b=loLF8nRevNmabJUudfMrfQP+323GvwH1wEn7F8luNNxaUd1dXhwWXNRi7vIguGu130lEDAmAuy0dCsrj5stJcGltLqdGICBfNNNt/G5vn6UhI+v2RvxIb60rUJHA9O4Xgd/nXec72la+9R/jmsT+5kLAwAPyi6TQDN83vAxDiLg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699527369; c=relaxed/simple; bh=0dFQG2sIuPquCgcYc0x8O5kfwsSSU+Y9PYTkZ7PnzN0=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=kLfSB6SSxezRCq8dtPlgJUsOB2ZGA1fVRlxmqTiMj4ZL4sZmMUZ6TcyZKCeNIlX36KmGJy1dgOCN4bTIeM74YMrnLyuw2EjCURFKUGzAHh+Ntcx5jm1FRIyDmkU2l5KzBcYTUciYAz9FidgnoedlKggW514Xi8W4r0vl+fGTuhA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-408002b5b9fso4867745e9.3 for <gcc-patches@gcc.gnu.org>; Thu, 09 Nov 2023 02:56:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1699527364; x=1700132164; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jOJx26g1STVUOVjen/4pc73EZlL31qLZaRxt4YVMZpM=; b=MlPyfjl9j0qhHAYrP492hLIGJwWWcfUKwolZ/mb5YTr3+ACVxL1Y99QflQAOs2eLlv g2soSFeav7HYqBW1FuVsARhHf0JidHUntOfjBTn7ixsnIOk6mdtuVxA7CRSk8mtnNKOE PYA5ts6WxyBPYBG6SsajbGgKKSM5el4xqKoKO750iHEBbamEGaFBLgRJJ963WLnRoy0d kE8sRN60xjK66NCtb4SIfj+RY+mjIjWWvkGt3wirEw45pqocLHBrZ85RGDfVqMZ3wxjW h6cj30jrX0tCzZODZa5UOKK4IvOP+XpEwGwJrNv7MNfWHxAeDsTAhcpxfltegxLcDBrx D+XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699527364; x=1700132164; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jOJx26g1STVUOVjen/4pc73EZlL31qLZaRxt4YVMZpM=; b=k02AjNnmM4mO48BtkeLq1xtpGVLSDnB6Ayr5oSga5qh8EzO4T9Hp9eRrnJHt4UHy9p g5/Gh0l+/kGiB6j0Gi2XBW4pw3CE8oj76d2JvYOX3SDHYk1devBSqC5qDOFg1bRk4L/8 8XBSYhLNGMGEQlOt4Ve8sEG4GCUM/XtO3wWD1daDMZoFSAuSCOLcmF4pbPqnVLxdXcAP aYjrjKxMqdKkRdMdhDWAp3V9ux8m7m9iA63VTpeaPUXOIWjrpoCWVP0yDo1rl0AodakD cZDU+6jk91xZykcST722wGuEs3OYSg5siEdsBNO1d6GGuZs2Ft0HYErrjA4hBhJD73pl g3zg== X-Gm-Message-State: AOJu0YzpzGl0e7WbjFyg1f6oMl3oZG/jQn+oRpsk50JJxcYPxCVZ/SS7 e7jMJHg+m+IUrUadpRXbmgeEG0IU5sy9npnHZZ1wkw== X-Received: by 2002:a05:600c:1f8e:b0:409:79cb:1e15 with SMTP id je14-20020a05600c1f8e00b0040979cb1e15mr4174722wmb.37.1699527364379; Thu, 09 Nov 2023 02:56:04 -0800 (PST) Received: from troughton.sou.embecosm-corp.com ([212.69.42.53]) by smtp.gmail.com with ESMTPSA id p22-20020a05600c359600b004080f0376a0sm1706307wmq.42.2023.11.09.02.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 02:56:03 -0800 (PST) From: Mary Bennett <mary.bennett@embecosm.com> To: gcc-patches@gcc.gnu.org Cc: mary.bennett@embecosm.com Subject: [PATCH 0/1] RISC-V: Support CORE-V XCVBITMAIP extension Date: Thu, 9 Nov 2023 10:55:41 +0000 Message-Id: <20231109105542.4013483-1-mary.bennett@embecosm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.3 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: 1782083636074091247 X-GMAIL-MSGID: 1782083636074091247 |
Series |
RISC-V: Support CORE-V XCVBITMAIP extension
|
|
Message
Mary Bennett
Nov. 9, 2023, 10:55 a.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 | 5 + gcc/config/riscv/corev.def | 13 + gcc/config/riscv/corev.md | 342 ++++++++++++++++++ gcc/config/riscv/predicates.md | 16 + gcc/config/riscv/riscv-builtins.cc | 1 + gcc/config/riscv/riscv-ftypes.def | 5 + 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 | 22 ++ gcc/testsuite/lib/target-supports.exp | 13 + 33 files changed, 942 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