Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 681C3606A320 for ; Tue, 1 Dec 2026 16:01:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=VBlgqcDl Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xYQIP-0007HH-Gi; Tue, 01 Dec 2026 11:01:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xYQI6-00077k-Nh for qemu-riscv@nongnu.org; Tue, 01 Dec 2026 11:01:21 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xYQI3-0006WO-E1 for qemu-riscv@nongnu.org; Tue, 01 Dec 2026 11:01:14 -0500 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-2f04244c3d0so92281365ad.3 for ; Tue, 01 Dec 2026 08:01:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1796140869; x=1796745669; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=WWPcFdgIhTOJyC/dHdnHqnNpgOQ6eySOqQTCQQAVFsw=; b=VBlgqcDlbT2v1NJ4XbvAlmQuL69jsLazgNvsQUCvRQO0qvyIdN3x4KV+X+r6fiYBn9 wnbhF08XnvaLNpo6UX9KfJeSC01OC9R5UVKuV0eAbFEtYh2XzUWGVVqgZLmhsAja7+HN ptY2VMawCF1I5HJtSTCGdkByg6ZfQZVUdttY2iHyOb+6OOJ0t6r1L1zDujUzpgA4OCCF VQC8PB/FWFhBffsqPvfF8GCAWzQBk0iwzUh4TXHXGSpH4ZhCBIfWki5WYT2xxMEB4QMZ yIY1/3wVHneV8sQ/wTUqusiabJMGN6pO0pvzhZ3dWoU+R32t38Bt4Rku7mA4U4e4Xp+J Tueg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796140869; x=1796745669; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=WWPcFdgIhTOJyC/dHdnHqnNpgOQ6eySOqQTCQQAVFsw=; b=s3ZLYEh2u618J8oWvX45BSJ5m9mH/0/SIXx3LL/mBb01qI4fpDplvMosxiK7u6gVSB UmVtLJfzkYSfDKxKmvUmBEcJKcH13F1A24usS39hku1NyJp1IeBs8N4ncuqbAR1LyUwT 2luHg3Be8Sh48W4MVCJV5Dxm3OPEUk54c/koYO1ELQ8DsvOoJ303t61X2IS628HMmMS3 83kQYBMVphY/m1vx5Pj0yzJCdwQ8Krb0Kokct884rXysfUqrVGoyNQiwm4f/wyoXdC90 oohUoY9yA3VKQrUFutFnesZ3J8kcdQPRyZm/7CRD1r69UfY6sF61i8ZUf2wtZnWbXh2V 2jYg== X-Forwarded-Encrypted: i=1; AL+hErF/B7kPI8Qv5rRUzT3pHdpbfPTfGuo+kE5y5MzOloXRytG9pvBcW/sMdUCsf1pDThCwFmpt9IZ/yRGK@nongnu.org X-Gm-Message-State: APuU4Z+1tT5Hwk7OL5Gg+w409jilXQ2fIE3IXJwg/r9JOfFgP30ahU92 AuQLXel2jcK67gk4WEH1QtJ6FTX4N2g+K0w7saODDu6zokWxTpQXl2U8Qr5pyGnllTY= X-Gm-Gg: AZFdTZeGtoGSzjkP1KtB0XVFbmrul5fdofo2GlwUhvnUOpIwg6cF2xXmODVSipKHg80 tEiMtnNkGREzklolbXjOGtJgY0L5Bbc96BEnnuKdI7R2SqShnnb4912EpCcMVaP2HVbrAs2e9JB k1hDch0rqxIIv0/mq8t04BffT9iYUpQFjd8kRrMJ//e9//DobH0VhzzkJk+1ZszK9u/1cap3xZd JguzgCziCpYZp5iioK1Yz1/bVNo3OHR1VvjeHPDvHf21qBIhNlj6AfLd20YTt7fXAFG2Q3FnZFo dr6KM8uehj4/0NBUtqRg9R2q9YTMWLK3Say5MShaGhMzUgd3Z7C4O3IU8qXXaDAILrso1Irl2A1 sNSfyd49TYcBzz2K0gb7azZTAHL6Q4wu/qndMXKjSnt7u2C/e7oqtkyIbB7uo1CnlACufTlrKgG v+jRN7qyvzf6O/EOvU9MNJjynya2aMtsGc9sEVht0zYevYzt2B7jSCGlbEvBp04rgrRivj1qvSS cMEaUklbQ7aQrm5wXZ9xwR7oAnN3pPJSAswUTVIPTYd9iu8gb4nPWDbQ7YsDKrGAKXBjg6aNQpt FQKDCnc2cmaDZWQ4x08nhVL3q0oGtcu4vjtPHelRTd92eQlQ9rhAlKHIYwlUBI9+rwdCDsZPklZ 9ta3vHSfJW0KfayLDOrv9Zy/biUjb9B5I+DtX1Bng/LSGJm+MzNQjAZnWS5pTTLBAC3uPnk4FRb gcM95HxlQTUEyIOg== X-Received: by 2002:a17:903:3d8d:b0:2f1:7129:3222 with SMTP id d9443c01a7336-2f171293693mr7570615ad.62.1796140868880; Tue, 01 Dec 2026 08:01:08 -0800 (PST) Received: from duncan.localdomain (114-35-142-126.hinet-ip.hinet.net. [114.35.142.126]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2f08d73dfe0sm149803225ad.69.2026.12.01.08.01.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 08:01:08 -0800 (PST) From: Max Chou To: qemu-devel@nongnu.org, qemu-riscv@nongnu.org Cc: Palmer Dabbelt , Alistair Francis , Daniel Henrique Barboza , Aurelien Jarno , Peter Maydell , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Weiwei Li , Liu Zhiwei , Chao Liu , Max Chou Subject: [PATCH v1 00/38] target/riscv: Add Zvdota/Zvbdota families of dot-product extensions Date: Wed, 2 Dec 2026 00:00:20 +0800 Message-ID: <20261201160100.1911581-1-max.chou@sifive.com> X-Mailer: git-send-email 2.43.0 X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=max.chou@sifive.com; helo=mail-pl1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_PASS,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 This patchset introduces the Zvdota/Zvbdota families of dot-product extensions based on the freeze ISA specification (https://github.com/riscv/riscv-isa-manual/releases/tag/zvdota-0.9 v0.9 freeze) - Zvdota: Zvqwdota8i/Zvqwdota16i/Zvfwdota16bf/Zvfqwdota8f - Zvbdota: Zvqwbdota8i/Zvqwbdota16i/Zvfwbdota16bf/Zvfqwbdota8f/Zvfbdota32f This patchset assigns the Zvdota/Zvbdota cpu properties as the experimental cpu isa extension properties. These experimental cpu isa extension properties will be replaced after the Zvdota/Zvbdota isa specification is ratified. The toolchains support Zvdota/Zvbdota families extensions: - LLVM (after 23.1.0) - Support v0.2 Zvdota/Zvbdota extensions - https://releases.llvm.org/23.1.0/docs/RISCVUsage.html - llvm/llvm-project#196467, commit d25ec4b84487, merged 2026-05-27. - https://github.com/llvm/llvm-project/pull/196467 - GCC (reviewing) - Upstream patchset: <20261014093604.829234-3-jiawei@iscas.ac.cn> Changes since RFC <20261104194155.679241-1-max.chou@sifive.com>: - Rebase on the latest riscv-to-apply.next branch (commit id: 4ac269e) - Fix the OFP8 checking functions patch description typo. - Use g_autofree for the temporary floating-point input arrays. - Simplify the RVBNA final accumulator addition exception flag handling. - Remove the unused FP16 RVBNA function and declaration. - Share the scalar and batched integer dot-product helper implementation. - Gather the broadcast vs1 input once for active batched fp outputs. - Share the batched translation setup and reuse the common scalar vector translation setup. - Consolidate the batched destination capacity and tail handling. - Add the review and test tags recorded in the v1 patches. References: - riscv-isa-manual tag: https://github.com/riscv/riscv-isa-manual/releases/tag/zvdota-0.9 rnax Max Chou (38): fpu/softfloat: Support OCP(Open Compute Project) OFP8 checking functions target/riscv: Introduce riscv_init_fp_status target/riscv: rvv: Introduce RVBNA algorithm for Zvdota/Zvbdota extensions target/riscv: Add cfg property for Zvqwdota8i extension target/riscv: Add implied rules for Zvqwdota8i extension target/riscv: rvv: Implement Zvqwdota8i instructions disas/riscv: Support Zvqwdota8i extension target/riscv: Add Zvqwdota16i cpu property target/riscv: Add Zvqwdota16i dependency imply rule target/riscv: rvv: Implement Zvqwdota16i instructions target/riscv: Add cfg property for Zvfwdota16bf extension target/riscv: Add implied rules for Zvfwdota16bf extension target/riscv: rvv: Implement Zvfwdota16bf instruction disas/riscv: Support Zvfwdota16bf extension target/riscv: Add cfg property for Zvfqwdota8f extension target/riscv: Add implied rules for Zvfqwdota8f extension target/riscv: rvv: Implement Zvfqwdota8f instructions disas/riscv: Support Zvfqwdota8f extension target/riscv: Add cfg property for Zvqwbdota8i extension target/riscv: Add implied rules for Zvqwbdota8i extension target/riscv: rvv: Implement Zvqwbdota8i instructions disas/riscv: Support Zvqwbdota8i extension target/riscv: Add cfg property for Zvqwbdota16i extension target/riscv: Add implied rules for Zvqwbdota16i extension target/riscv: rvv: Implement Zvqwbdota16i instructions target/riscv: Add cfg property for Zvfwbdota16bf extension target/riscv: Add implied rules for Zvfwbdota16bf extension target/riscv: rvv: Implement Zvfwbdota16bf instruction disas/riscv: Support Zvfwbdota16bf extension target/riscv: Add cfg property for Zvfqwbdota8f extension target/riscv: Add implied rules for Zvfqwbdota8f extension target/riscv: rvv: Implement Zvfqwbdota8f instructions disas/riscv: Support Zvfqwbdota8f extension target/riscv: Add cfg property for Zvfbdota32f extension target/riscv: Add implied rules for Zvfbdota32f extension target/riscv: rvv: Implement Zvfbdota32f instructions disas/riscv: Support Zvfbdota32f extension tests/tcg/riscv64: Add test for Zvdota/Zvbdota extensions MAINTAINERS | 6 + disas/riscv-op.c.inc | 12 + disas/riscv.c | 26 ++ disas/riscv.h | 2 + fpu/softfloat-specialize.c.inc | 55 ++++ include/fpu/softfloat.h | 70 ++++ target/riscv/cpu.c | 121 ++++++- target/riscv/cpu_cfg_fields.h.inc | 9 + target/riscv/helper.h | 29 ++ target/riscv/insn32.decode | 25 ++ target/riscv/tcg/insn_trans/trans_rvv.c.inc | 203 ++++++++++++ target/riscv/tcg/meson.build | 2 +- target/riscv/tcg/rvbna.c | 182 +++++++++++ target/riscv/tcg/rvbna.h | 37 +++ target/riscv/tcg/tcg-cpu.c | 45 +++ target/riscv/tcg/vector_helper.c | 288 +++++++++++++++- tests/tcg/riscv64/system/meson.build | 12 + tests/tcg/riscv64/test-zvdota.S | 343 ++++++++++++++++++++ 18 files changed, 1460 insertions(+), 7 deletions(-) create mode 100644 target/riscv/tcg/rvbna.c create mode 100644 target/riscv/tcg/rvbna.h create mode 100644 tests/tcg/riscv64/test-zvdota.S -- 2.43.0