Message ID | 20240116162552.461635-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:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp369516dye; Tue, 16 Jan 2024 08:26:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHyYQ6sKElQH9r2y5aRHetBrmy7ojWlS0bF85cZxVXHU902PntJ95qv6TRCqhS2z+yxyFFg X-Received: by 2002:a9d:6458:0:b0:6dd:db4e:17a with SMTP id m24-20020a9d6458000000b006dddb4e017amr5252185otl.65.1705422417799; Tue, 16 Jan 2024 08:26:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705422417; cv=pass; d=google.com; s=arc-20160816; b=SpEZRjrWondVEuEuG6v5s/6jvIGrZhaS8yZXa72bZsLX0TQ8fm8/OxoiCPaRhXEeFC TUQgj6aB7HGbsmUn8hBwt4GwPgHIwvxzDmEUgU17989wEx/loQvEbI/Dwlft0GZezltH u7PUuBKR7OD1qxM8dSRQjiT7db7V3GEHH9xFe6s0UNftGRbLu/TRPihqSSSpTduHkm70 vFiPA65++EoKkmeUW4BRl1o38PaA4GGHiIWxMMf9YZBz1uuGLFRwdqMHmK5Ke6FT04j0 aJiR1Q+T8XjEfhUNnRyji4T+6k6Ruz2jvvm6p4j9VZzGp/vxybfTaMqMqN4hpUdoAZ5G caaw== 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=xxvt+UTGKulcJJwYpwUWXv6bs7p9WpYhldQIb5XjV5A=; fh=qiT4HZV9olO2fGAIgbF8w4l7HXh8ja5CJNGeguP7WSc=; b=YO7UtT8rI7uip74UwRwGU5ncoY0eDOWUTPeOKGRuEQ98aj3VPyP+Z+MBAqE8xdQAyf dQOWb0skcjN1K/3ieAuZ+jOFTodADhfq4Abwsgy+oJC24CBgnJjg/O1vu/1Hk6G2K0rf 8EFwwZi6jDjP2+fcslpurH5oVPPkslhQqyO7iugK7pDEGGxiaFWXdGwMzn+1XYrJnLRN 8FycAR8Xy2r/3oP0+b3gOpPPHDTidD3krsaVcwq6MbRDFqQM+JcVRcYZ7D63M6ZO/sZl QE/Qn36lt5g9ONveUC55PCqCcqPI7OXXqSChsXE0mHmYuXyj8M8zpP8T/vZw9LsNO1mS zalA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=eL4WEUdz; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id a11-20020a05622a064b00b00429d3632879si7372803qtb.108.2024.01.16.08.26.57 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 08:26:57 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=eL4WEUdz; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 81A7B3861842 for <ouuuleilei@gmail.com>; Tue, 16 Jan 2024 16:26:57 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id E12AA3858D38 for <gcc-patches@gcc.gnu.org>; Tue, 16 Jan 2024 16:26:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E12AA3858D38 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 E12AA3858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705422369; cv=none; b=vU2p1HC1GrZqm8iHJfdjLnobXKYBmaXb3R2Qb0mPhCXkpFMmlCH/dRmd9UtJrDDs3Q47OhVoiPwk8gFsHz7gUSbc9A7d5V/3qLbXjuk2oknf+I1ZI/aQuzTaklE0Yv8oV+PAsolnQK6XJZg3wahmWjpBoBM6d5hIxt7+aarlxdk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705422369; c=relaxed/simple; bh=iXVbD5n1zuWgUN2j3Gfp0WxLsAEpEcrUoNqryE/Bbyc=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=uhjKkj3/auX+X7QYAUb96kk1/xq3Q394UlgDwKqhFiLiAE/6pW3tt6MDTAM8fQFGOxT1wnP9VnXeBixM+vE2lszkpqOW5x5K9ooonOuIKgrBQ/n/c1/jyLP1cACJJXV0L1vBYascm4w6S8/W/y+iauabbVFyxTGPHe6UlF1XTU4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40e6f652eb8so32494425e9.1 for <gcc-patches@gcc.gnu.org>; Tue, 16 Jan 2024 08:26:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1705422366; x=1706027166; 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=xxvt+UTGKulcJJwYpwUWXv6bs7p9WpYhldQIb5XjV5A=; b=eL4WEUdzwt4YCLEdV+y/lyrztpgs4yBjFOUn+kmGx5gakSw0OgWIdt0cQrG1O/0RIf EEDIUSsicKiZ34Ljl83cH7SZcjOkiXy9qhLw1zNABFmjFxjD428yAGslq/dHmH/D56RT rBynfy8GPKxZZwn0IlqFPAPVZM/XYWC27BJpgU20WoYbkTpNkqWOoaXMu7vftihkJiNu Ps9GGj06nDsb6y9MZbMdHkkIoPWAaBQMeYobP5lFgNaWNziU7Yonzpfl57/1jOWYKZYH i7uLKzK4nUcDajRtF7Wp25DLXmpVkAmfKiAQKShLWYbT8+JDf5mUA7W50ubU+Be4/bpw dMSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705422366; x=1706027166; 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=xxvt+UTGKulcJJwYpwUWXv6bs7p9WpYhldQIb5XjV5A=; b=F6ho6EWyOTxTjBnV94ClWKur7COp1+96mZEpZ5COWCtmCesjNF5NaupW2jYxQ11oKu dUjI8X/JPbDlDtvoEPpllnBA+p2xgpZX95TvMc6UskCdL6qGz/6YiB37/aXxEVdAkyxd zXhYF3n3yZHSnsBBV1sopIaQgTCAXi/K5ryHFaPYO/MfLjB+GZ6XxL+ybX57eyBuEOV6 BFRoA+hP+PpJiTpzvsEZg26om4LIci5bhd5FaCx7UDfUwYOgdWB4Kc7ORVShnolQy4zm GbenIrGRvpK57LX2eymCtmczY3gYuak+NGfIULp77RsJCtZTunMp3kzESXO7PUS8rhXq h61Q== X-Gm-Message-State: AOJu0YyuSNge2ZvhMJwXux0iziQFmiV5pIlELCRu7VcxLOeSRahOMS07 rfj5bXxbUMVMrr4QwDqsZdgt+IUfAQEZY3gil/0VtJbvnZk= X-Received: by 2002:a05:600c:1d2a:b0:40e:4d1e:2d42 with SMTP id l42-20020a05600c1d2a00b0040e4d1e2d42mr3800490wms.170.1705422365522; Tue, 16 Jan 2024 08:26:05 -0800 (PST) Received: from troughton.lym.embecosm-corp.com ([212.69.42.53]) by smtp.gmail.com with ESMTPSA id m26-20020a7bca5a000000b0040e54381a85sm19170074wml.26.2024.01.16.08.26.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 08:26:04 -0800 (PST) From: Mary Bennett <mary.bennett@embecosm.com> To: gcc-patches@gcc.gnu.org Cc: mary.bennett@embecosm.com Subject: [PATCH v2 0/1] RISC-V: Support CORE-V XCVBITMAIP extension Date: Tue, 16 Jan 2024 16:25:51 +0000 Message-Id: <20240116162552.461635-1-mary.bennett@embecosm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231109105542.4013483-1-mary.bennett@embecosm.com^Cthread> References: <20231109105542.4013483-1-mary.bennett@embecosm.com^Cthread> 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: 1788265016949920698 X-GMAIL-MSGID: 1788265016949920698 |
Series |
RISC-V: Support CORE-V XCVBITMAIP extension
|
|
Message
Mary Bennett
Jan. 16, 2024, 4:25 p.m. UTC
v1 -> v2: * Updated rtl for bclr, bset, insert and extract[u]. 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 | 164 ++++++++++++++++++ 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, 791 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