From patchwork Tue Jul 9 17:44:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edwin Lu X-Patchwork-Id: 1958567 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=nPOZ/iuK; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WJT0g74gRz1xpd for ; Wed, 10 Jul 2024 03:45:23 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 203CA3841886 for ; Tue, 9 Jul 2024 17:45:22 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id C8EF03841FF4 for ; Tue, 9 Jul 2024 17:44:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C8EF03841FF4 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C8EF03841FF4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::435 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720547094; cv=none; b=BSGp3Oiznnezo6yJmtJFdmTiN5eP9EGITA2uZYKASWT+1lDKnlkWy+CZQ/wWp9OK1xYzicjMRoh+XE2bo8c5zaG+NatdRMdGLfmC2frTNi6388QDDjx7UQ/aHKIzz5Sfch9/Wdw2WIrMPVv55EHfyZo1y31WLIqZ/aqDaef0pss= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720547094; c=relaxed/simple; bh=6o76tFOS10XMTQAJtKl80Si47Y8MlWP9Qi5tiNd4eaE=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=ehG0quICWsqLy4v1ZVm9Xpby50K1V2+EbG9MkTD/G+zCkOY7a1psYx6tvj8sNeGl024v26hOT4ABz30Bgv+kymwu/y9NWLWO31xgjjvRBp1D61pcm2rGsiwr1ZJF+48bg4OS9uWkuviA7Y6RZS79f1Tx8KDYuJ2dSidSHA9POOY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-70aec66c936so3793945b3a.0 for ; Tue, 09 Jul 2024 10:44:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1720547090; x=1721151890; 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=M3mcc4aOVqcXs3gDaEHxPOAThja0b/OC2lGq54+W3/E=; b=nPOZ/iuKS5pEGNmKn/KXVUSbzT/b4s3mDgEjkvx1DAaj3v04T0VWD4sKG+jHDyiWK8 m9TneDd1luJtN7e1+wR4N59D0/ZMjQeH8GJTZqA8pCPaxpnLqOvm8Els9sAYca8A8WX+ AxrOERRAtUz+UJzO3CA/vFv6VmmrCz1AogWdo2km+Rf09QTfXHu/iGsXifm98N9iX9O6 d6q5POkdVWviKfezjby2InRtwkJSdL7K2IMxP3ULYwRzi+fu8J2O85p5EVplsWJHHcDq 0rVA+X84fswsjZnHjYJ4ZFt3PC54p8i1xxIGhQnHJuGcu1Ll1ax8P9pgyJRpm5uB3FjO Zr1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720547090; x=1721151890; 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=M3mcc4aOVqcXs3gDaEHxPOAThja0b/OC2lGq54+W3/E=; b=foccQQnRQiH7Kn4c/xUvDY623txynRUgSfUJWCEKo50X3aOO/cNjYZFegaybtMdvme SHvCPLHc0Adwr9nIV1frrm8XOWWlMmexxPULv+8Ode2aLHCb8i549vEkR4MUFdw9lfGJ v3Aham3ClIgabkBmlK+bChYgbCqDrsZ0oIftlGspZJC7EzRAowHH5zeRy88cQG5W+L5z pAOVVYLPC1QDiATG/+MsZGz22bRtADwZdFJdBECZT6b8Cxvrh/zmwZIHa7ln46+hMysD w0/Mr7QMvGswTRY+fi5UlL0R9Qsi4z2QEJFWdT87ILxO0ZupjupkDBygn1mCgBT3RcBU NWrA== X-Gm-Message-State: AOJu0Yz33w/C/iDokVzTzMZ1G07jG+ncc/p58dxXi7kH2Dg0b3no2tQr UNW1CPAhurjqRdo9Cuz4h13hNrk8LhfxsoM1UzjWGoHfzRFRQEsWxpkgjLyvFRghx0ZsCGUE60e x X-Google-Smtp-Source: AGHT+IHyKO5z8KzzGsYM/ZEv273tdI6vlR5KLrJ89DaEqCjPV+xe9sLIRxIBkiDf2Mjo6fucYE86ig== X-Received: by 2002:a05:6a20:da8f:b0:1c2:a696:6a44 with SMTP id adf61e73a8af0-1c2a6966b1emr867263637.46.1720547090385; Tue, 09 Jul 2024 10:44:50 -0700 (PDT) Received: from ewlu.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fbb6a2a72csm18946815ad.77.2024.07.09.10.44.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jul 2024 10:44:49 -0700 (PDT) From: Edwin Lu To: gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com, Edwin Lu Subject: [PATCH V2 1/2] RISC-V: Add support for B standard extension Date: Tue, 9 Jul 2024 10:44:44 -0700 Message-Id: <20240709174445.575936-2-ewlu@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240709174445.575936-1-ewlu@rivosinc.com> References: <20240709174445.575936-1-ewlu@rivosinc.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org This patch adds support for recognizing the B standard extension to be the collection of Zba, Zbb, Zbs extensions for consistency and conciseness across toolchains * https://github.com/riscv/riscv-b/tags gcc/ChangeLog: * common/config/riscv/riscv-common.cc: Add imply rules for B extension * config/riscv/arch-canonicalize: Ditto Signed-off-by: Edwin Lu --- V2: Add b to riscv_combine_info --- gcc/common/config/riscv/riscv-common.cc | 7 +++++++ gcc/config/riscv/arch-canonicalize | 1 + 2 files changed, 8 insertions(+) diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc index dab2e767965..b0a16f5bd30 100644 --- a/gcc/common/config/riscv/riscv-common.cc +++ b/gcc/common/config/riscv/riscv-common.cc @@ -84,6 +84,10 @@ static const riscv_implied_info_t riscv_implied_info[] = {"zabha", "zaamo"}, + {"b", "zba"}, + {"b", "zbb"}, + {"b", "zbs"}, + {"zdinx", "zfinx"}, {"zfinx", "zicsr"}, {"zdinx", "zicsr"}, @@ -245,6 +249,8 @@ static const struct riscv_ext_version riscv_ext_version_table[] = {"c", ISA_SPEC_CLASS_20190608, 2, 0}, {"c", ISA_SPEC_CLASS_2P2, 2, 0}, + {"b", ISA_SPEC_CLASS_NONE, 1, 0}, + {"h", ISA_SPEC_CLASS_NONE, 1, 0}, {"v", ISA_SPEC_CLASS_NONE, 1, 0}, @@ -405,6 +411,7 @@ static const struct riscv_ext_version riscv_ext_version_table[] = static const struct riscv_ext_version riscv_combine_info[] = { {"a", ISA_SPEC_CLASS_20191213, 2, 1}, + {"b", ISA_SPEC_CLASS_NONE, 1, 0}, {"zk", ISA_SPEC_CLASS_NONE, 1, 0}, {"zkn", ISA_SPEC_CLASS_NONE, 1, 0}, {"zks", ISA_SPEC_CLASS_NONE, 1, 0}, diff --git a/gcc/config/riscv/arch-canonicalize b/gcc/config/riscv/arch-canonicalize index 35a7fe4455a..2ea514dd986 100755 --- a/gcc/config/riscv/arch-canonicalize +++ b/gcc/config/riscv/arch-canonicalize @@ -45,6 +45,7 @@ IMPLIED_EXT = { "zabha" : ["zaamo"], "f" : ["zicsr"], + "b" : ["zba", "zbb", "zbs"], "zdinx" : ["zfinx", "zicsr"], "zfinx" : ["zicsr"], "zhinx" : ["zhinxmin", "zfinx", "zicsr"], From patchwork Tue Jul 9 17:44:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edwin Lu X-Patchwork-Id: 1958568 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=cTetmXYt; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WJT1t3stYz1xpd for ; Wed, 10 Jul 2024 03:46:26 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CB64E3841886 for ; Tue, 9 Jul 2024 17:46:24 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id BE9383841FEF for ; Tue, 9 Jul 2024 17:44:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BE9383841FEF Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BE9383841FEF Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720547098; cv=none; b=f/hPRTqzElNjX25TRIfj5Hm6SdETE9r+TFMa3VMuw5IdBeE12l/DxzqB1BtE7tQalNWw5iDgD9t8+DPFaaCyPBeZTPFmMnv3VnQmFcWyKgRtyt/D7sQBUKUjleU/hZlRXVxDNmZ1S6qqghxWkt6jGRd0BuZo2v9Q1HXXnbxe23k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720547098; c=relaxed/simple; bh=dljG0iXSmOonF7IlCXn1M/dsMunNF27Rq3KnJA3R8ac=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=lgsWPlJrar42oChZovSY4c79KHIlTAAksCE+bREXMFqHno/HX5JxCR2tQa09qHDK3KuWZDxIsPmvx0SGxAo/kEKKf706h+kd1FpJed34R5kbajQOyccj7nmaASZaNHvqfQDez+GorNnGDVHlrrGIO2s+DcnIpFDryujwYB8yhqM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1fbc0a1494dso4970775ad.3 for ; Tue, 09 Jul 2024 10:44:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1720547094; x=1721151894; 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=RQDh38wDWiGBijdkWLbjuSgL+ctFUsKkOFNliCMBE7Y=; b=cTetmXYtXExV43Nl6vJ+8UeqdqC5E8obPYB1XtUCLQDrS9Y1q3n7YwiQJ+KWSZaDkL F5E9SvZ82TxEjBeKvkuRkNwycGXf7GImv3tFmlCn6g9BGNDZdx3UTr47n+iTbBqJRzSE XnsnBJMbn2ClYjs8m7ozMkYXSEGHcYNXFFLRdcp0Srm6Uf/fIO3/JwvwbI1AS3W6rg1b jK2UNul26JXoGTbFfRLffLr3jPAebh+B3YHeJp4q/afHcu5yG90MDDBVUYHOnDJjh6ev K+6fXznptXcqDdgF3nzupoF2Olyoxts2Xf0C3w5ORuAtdyLsuSYsh19ehEi+01I76NWD tNnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720547094; x=1721151894; 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=RQDh38wDWiGBijdkWLbjuSgL+ctFUsKkOFNliCMBE7Y=; b=J4UTLGdPGgOaA/XWFTN+WXVfz//JjZdQipXIn8Xm01GABU8jyfKzbPI5swMsGZlS9H QpNaT3JwD2OJeRC/tT+VIpefQMowcUzopcqMea71wFQLlgtLrfS9b6BozadnT7EcUwmZ A0r9X4Todt/e199+wXjh1GTfZ8wX2APdoZhcMSC3HbY1y22/M/l98HRdx13aCMtElmNO fmes0NhH5+OPchU9u2gyytUNvttaDtZlOe4dYDvxkkx+4QtQOAsjDRAOLtFcNcNw68Eg kPgS4YL0EwSRoo6Sz5bWUaO4fGklHoscY23lVMFc+bI3jfeMj7IBch0e5Wgl91YZUHVe Y97g== X-Gm-Message-State: AOJu0YxhMrHB62dP+4Y2B1BNjd3saBa8BeLRFnsVwwsnFgQpid+R8JoX rPuE+OCbcFy7ldS8DZLV2AeHzZ4Zwo+XZSKJ18zngEB67wCfv1tKoaEriHmwcZzvpSYBt6Mcxk6 7 X-Google-Smtp-Source: AGHT+IFt8+boaZ916B8w8BpIXnj22yuC2fCQDy5fXh+pDsOsZsP0LNNDF3GqTbXlVQD4mKY76OTWiw== X-Received: by 2002:a17:902:d4cc:b0:1fb:719a:28cc with SMTP id d9443c01a7336-1fbb6d0b4eemr23357175ad.18.1720547094355; Tue, 09 Jul 2024 10:44:54 -0700 (PDT) Received: from ewlu.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fbb6a2a72csm18946815ad.77.2024.07.09.10.44.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jul 2024 10:44:53 -0700 (PDT) From: Edwin Lu To: gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com, Edwin Lu Subject: [PATCH V2 2/2] RISC-V: Update testsuite to use b Date: Tue, 9 Jul 2024 10:44:45 -0700 Message-Id: <20240709174445.575936-3-ewlu@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240709174445.575936-1-ewlu@rivosinc.com> References: <20240709174445.575936-1-ewlu@rivosinc.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_SHORT, LIKELY_SPAM_BODY, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Update all instances of zba_zbb_zbs in the testsuite to use b instead I doubt anything would happen but just re-running it through ci to make sure changes in first patch don't break anything here. gcc/testsuite/ChangeLog: * g++.target/riscv/redundant-bitmap-1.C: Use gcb instead of zba_zbb_zbs * g++.target/riscv/redundant-bitmap-2.C: Ditto * g++.target/riscv/redundant-bitmap-3.C: Ditto * g++.target/riscv/redundant-bitmap-4.C: Ditto * gcc.target/riscv/shift-add-1.c: Ditto * gcc.target/riscv/shift-add-2.c: Ditto * gcc.target/riscv/synthesis-1.c: Ditto * gcc.target/riscv/synthesis-2.c: Ditto * gcc.target/riscv/synthesis-3.c: Ditto * gcc.target/riscv/synthesis-4.c: Ditto * gcc.target/riscv/synthesis-5.c: Ditto * gcc.target/riscv/synthesis-6.c: Ditto * gcc.target/riscv/synthesis-7.c: Ditto * gcc.target/riscv/synthesis-8.c: Ditto * gcc.target/riscv/zba_zbs_and-1.c: Ditto * gcc.target/riscv/zbs-zext-3.c: Ditto * lib/target-supports.exp: Add b to riscv_get_arch Signed-off-by: Edwin Lu --- V2: no change --- gcc/testsuite/g++.target/riscv/redundant-bitmap-1.C | 2 +- gcc/testsuite/g++.target/riscv/redundant-bitmap-2.C | 2 +- gcc/testsuite/g++.target/riscv/redundant-bitmap-3.C | 2 +- gcc/testsuite/g++.target/riscv/redundant-bitmap-4.C | 2 +- gcc/testsuite/gcc.target/riscv/shift-add-1.c | 2 +- gcc/testsuite/gcc.target/riscv/shift-add-2.c | 2 +- gcc/testsuite/gcc.target/riscv/synthesis-1.c | 2 +- gcc/testsuite/gcc.target/riscv/synthesis-2.c | 2 +- gcc/testsuite/gcc.target/riscv/synthesis-3.c | 2 +- gcc/testsuite/gcc.target/riscv/synthesis-4.c | 2 +- gcc/testsuite/gcc.target/riscv/synthesis-5.c | 2 +- gcc/testsuite/gcc.target/riscv/synthesis-6.c | 2 +- gcc/testsuite/gcc.target/riscv/synthesis-7.c | 2 +- gcc/testsuite/gcc.target/riscv/synthesis-8.c | 2 +- gcc/testsuite/gcc.target/riscv/zba_zbs_and-1.c | 2 +- gcc/testsuite/gcc.target/riscv/zbs-zext-3.c | 4 ++-- gcc/testsuite/lib/target-supports.exp | 2 +- 17 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gcc/testsuite/g++.target/riscv/redundant-bitmap-1.C b/gcc/testsuite/g++.target/riscv/redundant-bitmap-1.C index 37066f10eea..62bb2ab7b67 100644 --- a/gcc/testsuite/g++.target/riscv/redundant-bitmap-1.C +++ b/gcc/testsuite/g++.target/riscv/redundant-bitmap-1.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=rv64gc_zba_zbb_zbs -mabi=lp64" } */ +/* { dg-options "-O2 -march=rv64gcb -mabi=lp64" } */ void setBit(char &a, int b) { char c = 0x1UL << b; diff --git a/gcc/testsuite/g++.target/riscv/redundant-bitmap-2.C b/gcc/testsuite/g++.target/riscv/redundant-bitmap-2.C index 86acaba298f..52204daecd1 100644 --- a/gcc/testsuite/g++.target/riscv/redundant-bitmap-2.C +++ b/gcc/testsuite/g++.target/riscv/redundant-bitmap-2.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=rv64gc_zba_zbb_zbs -mabi=lp64" } */ +/* { dg-options "-O2 -march=rv64gcb -mabi=lp64" } */ void setBit(char &a, int b) { char c = 0x1UL << b; diff --git a/gcc/testsuite/g++.target/riscv/redundant-bitmap-3.C b/gcc/testsuite/g++.target/riscv/redundant-bitmap-3.C index 16bd7c1785e..6745220f2f4 100644 --- a/gcc/testsuite/g++.target/riscv/redundant-bitmap-3.C +++ b/gcc/testsuite/g++.target/riscv/redundant-bitmap-3.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=rv64gc_zba_zbb_zbs -mabi=lp64" } */ +/* { dg-options "-O2 -march=rv64gcb -mabi=lp64" } */ void setBit(char &a, int b) { char c = 0x1UL << b; diff --git a/gcc/testsuite/g++.target/riscv/redundant-bitmap-4.C b/gcc/testsuite/g++.target/riscv/redundant-bitmap-4.C index f664ee01a01..5e351fe457e 100644 --- a/gcc/testsuite/g++.target/riscv/redundant-bitmap-4.C +++ b/gcc/testsuite/g++.target/riscv/redundant-bitmap-4.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=rv64gc_zba_zbb_zbs -mabi=lp64" } */ +/* { dg-options "-O2 -march=rv64gcb -mabi=lp64" } */ void setBit(char &a, int b) { char c = 0x1UL << b; diff --git a/gcc/testsuite/gcc.target/riscv/shift-add-1.c b/gcc/testsuite/gcc.target/riscv/shift-add-1.c index d98875c3271..db84a51a222 100644 --- a/gcc/testsuite/gcc.target/riscv/shift-add-1.c +++ b/gcc/testsuite/gcc.target/riscv/shift-add-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-march=rv64gc_zba_zbb_zbs -mabi=lp64" } */ +/* { dg-options "-march=rv64gcb -mabi=lp64" } */ /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */ int composeFromSurrogate(const unsigned short high) { diff --git a/gcc/testsuite/gcc.target/riscv/shift-add-2.c b/gcc/testsuite/gcc.target/riscv/shift-add-2.c index 87439858e59..ed95ced5b85 100644 --- a/gcc/testsuite/gcc.target/riscv/shift-add-2.c +++ b/gcc/testsuite/gcc.target/riscv/shift-add-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-march=rv64gc_zba_zbb_zbs -mabi=lp64" } */ +/* { dg-options "-march=rv64gcb -mabi=lp64" } */ /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */ int sub2(int a, long long b) { diff --git a/gcc/testsuite/gcc.target/riscv/synthesis-1.c b/gcc/testsuite/gcc.target/riscv/synthesis-1.c index 9176d5f4989..c50abb08330 100644 --- a/gcc/testsuite/gcc.target/riscv/synthesis-1.c +++ b/gcc/testsuite/gcc.target/riscv/synthesis-1.c @@ -5,7 +5,7 @@ and eliminates the usual sources of extraneous dead code that would throw off the counts. */ /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-O2" "-O3" "-Os" "-Oz" "-flto" } } */ -/* { dg-options "-march=rv64gc_zba_zbb_zbs" } */ +/* { dg-options "-march=rv64gcb" } */ /* Rather than test for a specific synthesis of all these constants or having thousands of tests each testing one variant, we just test the diff --git a/gcc/testsuite/gcc.target/riscv/synthesis-2.c b/gcc/testsuite/gcc.target/riscv/synthesis-2.c index b88374da3c4..82383408f77 100644 --- a/gcc/testsuite/gcc.target/riscv/synthesis-2.c +++ b/gcc/testsuite/gcc.target/riscv/synthesis-2.c @@ -5,7 +5,7 @@ and eliminates the usual sources of extraneous dead code that would throw off the counts. */ /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-O2" "-O3" "-Os" "-Oz" "-flto" } } */ -/* { dg-options "-march=rv64gc_zba_zbb_zbs" } */ +/* { dg-options "-march=rv64gcb" } */ /* All these cases have the same form. lui+slli.uw+addi /* { dg-final { scan-assembler-times "\\tadd" 367 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/synthesis-3.c b/gcc/testsuite/gcc.target/riscv/synthesis-3.c index 5d92ac8e309..88ef0e81203 100644 --- a/gcc/testsuite/gcc.target/riscv/synthesis-3.c +++ b/gcc/testsuite/gcc.target/riscv/synthesis-3.c @@ -5,7 +5,7 @@ and eliminates the usual sources of extraneous dead code that would throw off the counts. */ /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-O2" "-O3" "-Os" "-Oz" "-flto" } } */ -/* { dg-options "-march=rv64gc_zba_zbb_zbs" } */ +/* { dg-options "-march=rv64gcb" } */ /* Rather than test for a specific synthesis of all these constants or having thousands of tests each testing one variant, we just test the diff --git a/gcc/testsuite/gcc.target/riscv/synthesis-4.c b/gcc/testsuite/gcc.target/riscv/synthesis-4.c index 328a55b9e6e..54d25e2681f 100644 --- a/gcc/testsuite/gcc.target/riscv/synthesis-4.c +++ b/gcc/testsuite/gcc.target/riscv/synthesis-4.c @@ -5,7 +5,7 @@ and eliminates the usual sources of extraneous dead code that would throw off the counts. */ /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-O2" "-O3" "-Os" "-Oz" "-flto" } } */ -/* { dg-options "-march=rv64gc_zba_zbb_zbs" } */ +/* { dg-options "-march=rv64gcb" } */ /* Rather than test for a specific synthesis of all these constants or having thousands of tests each testing one variant, we just test the diff --git a/gcc/testsuite/gcc.target/riscv/synthesis-5.c b/gcc/testsuite/gcc.target/riscv/synthesis-5.c index 4d81565b563..4ed07e4def5 100644 --- a/gcc/testsuite/gcc.target/riscv/synthesis-5.c +++ b/gcc/testsuite/gcc.target/riscv/synthesis-5.c @@ -6,7 +6,7 @@ and eliminates the usual sources of extraneous dead code that would throw off the counts. */ /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-O2" "-O3" "-Os" "-Oz" "-flto" } } */ -/* { dg-options "-march=rv64gc_zba_zbb_zbs" } */ +/* { dg-options "-march=rv64gcb" } */ /* Rather than test for a specific synthesis of all these constants or having thousands of tests each testing one variant, we just test the diff --git a/gcc/testsuite/gcc.target/riscv/synthesis-6.c b/gcc/testsuite/gcc.target/riscv/synthesis-6.c index 65cf748f4b5..2304855fbd1 100644 --- a/gcc/testsuite/gcc.target/riscv/synthesis-6.c +++ b/gcc/testsuite/gcc.target/riscv/synthesis-6.c @@ -5,7 +5,7 @@ and eliminates the usual sources of extraneous dead code that would throw off the counts. */ /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-O2" "-O3" "-Os" "-Oz" "-flto" } } */ -/* { dg-options "-march=rv64gc_zba_zbb_zbs" } */ +/* { dg-options "-march=rv64gcb" } */ /* Rather than test for a specific synthesis of all these constants or having thousands of tests each testing one variant, we just test the diff --git a/gcc/testsuite/gcc.target/riscv/synthesis-7.c b/gcc/testsuite/gcc.target/riscv/synthesis-7.c index 1611c964758..5a69d2e5f21 100644 --- a/gcc/testsuite/gcc.target/riscv/synthesis-7.c +++ b/gcc/testsuite/gcc.target/riscv/synthesis-7.c @@ -5,7 +5,7 @@ and eliminates the usual sources of extraneous dead code that would throw off the counts. */ /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-O2" "-O3" "-Os" "-Oz" "-flto" } } */ -/* { dg-options "-march=rv64gc_zba_zbb_zbs" } */ +/* { dg-options "-march=rv64gcb" } */ /* Rather than test for a specific synthesis of all these constants or having thousands of tests each testing one variant, we just test the diff --git a/gcc/testsuite/gcc.target/riscv/synthesis-8.c b/gcc/testsuite/gcc.target/riscv/synthesis-8.c index 2bcdb4e774d..72fd7113321 100644 --- a/gcc/testsuite/gcc.target/riscv/synthesis-8.c +++ b/gcc/testsuite/gcc.target/riscv/synthesis-8.c @@ -5,7 +5,7 @@ and eliminates the usual sources of extraneous dead code that would throw off the counts. */ /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-O2" "-O3" "-Os" "-Oz" "-flto" } } */ -/* { dg-options "-march=rv64gc_zba_zbb_zbs" } */ +/* { dg-options "-march=rv64gcb" } */ /* Rather than test for a specific synthesis of all these constants or having thousands of tests each testing one variant, we just test the diff --git a/gcc/testsuite/gcc.target/riscv/zba_zbs_and-1.c b/gcc/testsuite/gcc.target/riscv/zba_zbs_and-1.c index 23fd769449e..ddff91a4e7c 100644 --- a/gcc/testsuite/gcc.target/riscv/zba_zbs_and-1.c +++ b/gcc/testsuite/gcc.target/riscv/zba_zbs_and-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-march=rv64gc_zba_zbb_zbs -mabi=lp64" } */ +/* { dg-options "-march=rv64gcb -mabi=lp64" } */ /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */ diff --git a/gcc/testsuite/gcc.target/riscv/zbs-zext-3.c b/gcc/testsuite/gcc.target/riscv/zbs-zext-3.c index 0239014e06b..8dc3f289778 100644 --- a/gcc/testsuite/gcc.target/riscv/zbs-zext-3.c +++ b/gcc/testsuite/gcc.target/riscv/zbs-zext-3.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-march=rv64gc_zba_zbb_zbs -mabi=lp64d" { target { rv64 } } } */ -/* { dg-options "-march=rv32gc_zba_zbb_zbs -mabi=ilp32" { target { rv32 } } } */ +/* { dg-options "-march=rv64gcb -mabi=lp64d" { target { rv64 } } } */ +/* { dg-options "-march=rv32gcb -mabi=ilp32" { target { rv32 } } } */ /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */ /* We need to adjust the constant so this works for rv32 and rv64. */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index d3edc7d839e..f001c28072f 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2140,7 +2140,7 @@ proc check_effective_target_riscv_v_misalign_ok { } { proc riscv_get_arch { } { set gcc_march "" # ??? do we neeed to add more extensions to the list below? - foreach ext { i m a f d q c v zicsr zifencei zfh zba zbb zbc zbs zvbb zvfh ztso zaamo zalrsc zabha } { + foreach ext { i m a f d q c b v zicsr zifencei zfh zba zbb zbc zbs zvbb zvfh ztso zaamo zalrsc zabha } { if { [check_no_compiler_messages riscv_ext_$ext assembly [string map [list DEF __riscv_$ext] { #ifndef DEF #error "Not DEF"