From patchwork Sun Nov 13 21:20:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Tomsich X-Patchwork-Id: 19453 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1836405wru; Sun, 13 Nov 2022 13:21:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf7k1uV6eZHcaeIwaKKs6kUX9flHpxjyX8TDZ6QD/KYz35e+5bngslunIDRMNUyebPpue+qD X-Received: by 2002:a17:907:d387:b0:7ad:9ada:f32e with SMTP id vh7-20020a170907d38700b007ad9adaf32emr8334866ejc.591.1668374513807; Sun, 13 Nov 2022 13:21:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668374513; cv=none; d=google.com; s=arc-20160816; b=RwzhErcsNMLxPE0gv3CswoXeM1PKb1B89H9CdAkWDlajsivSLFaag//wVlXgyeYTth 1J7geXwnw+MxuqazyRZ/0bYjosJo7syCoXam5+L7gkdnzRhEkgF76QJTO2xb2EWMCIVQ 8QXn9909aqWiARU1uUXEF4msnB0sb1+0M9uU0EFFLchJzxYtPM0OHJbUcj92p3aOm3vk R1M6wGgUlYbXIMQvwiOQ1kuLmUSnFQdM8OJdUtgFfIM9SX/Xu9JtVZNcLCvTHUYZECWo cB1orX2fX/OQ6F1IHwWkBR+fF+3UQdYiCeAEzhgsRxSMvjj/lB0JWGY9guxYq1HUkZUU 0zog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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:dmarc-filter:delivered-to; bh=xMAETwu5DqW48PO3rBFydiP/mYWqOvcAkv/VfaZBxfs=; b=mfrslo8sU4ydlDuJcuqzbXc3N/xHBwVefoTTMP9BybYMHTKocW0e9wf92x56hnQ3K7 tVYQtR9lTCWDEm4gb+cogtIexwYqFUgOPs+gW1SkxbvTSS2IGbHjKGpI5xQd0kcNMrhS sJ62Fx6iL48dDZRbAJUNum3oEIgt64K7vyRzpnVm36jfPN4AKj/xELO4TC8LO0sehAvn noVD6UeHC3G9i+OwmDM+SbyYCxMGYBj2Y6O8lLspNNx9bFAXp0ka5zT6q1+oe++P9Er/ CeveYxqVFju5ynV5S6FgMvd0qw3ypOxcfDZGdFQN2hgIU1PP02lOlHExDFE9WUQ8EiCB dkVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vrull.eu header.s=google header.b=JLJu98kz; 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 sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id gs8-20020a1709072d0800b0079dc9dcbbb6si7997109ejc.337.2022.11.13.13.21.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Nov 2022 13:21:53 -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=@vrull.eu header.s=google header.b=JLJu98kz; 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 75817389EC6A for ; Sun, 13 Nov 2022 21:21:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by sourceware.org (Postfix) with ESMTPS id DADE238425B8 for ; Sun, 13 Nov 2022 21:20:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DADE238425B8 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-lf1-x12c.google.com with SMTP id f37so16338765lfv.8 for ; Sun, 13 Nov 2022 13:20:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; 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=xMAETwu5DqW48PO3rBFydiP/mYWqOvcAkv/VfaZBxfs=; b=JLJu98kzAKoYkEDOGhPz0xakBmCCtnV84PhKnXaGFs5lzrs91pCaFwt2JB6DsJ4O9C BGEY7UJpMrwt8kQFsAFhpbZa3ihWzRTZkkf9lzvsUybclpxz3GKqap14t1byPn4AZlig 4STlEyXnOAqNxYlUxi+R9KcJWj027mhAzc08S4ZeVHtFEFCH9SjoUGOSQYRZ6Vsq5CcU JHfK4mlmAr58pqwJyaxQMZXN+kq3Y7k9urjcK1uHVCGjGBrq6zm4pzhPy74Ka0GGakZ4 zADHVLoPrn2kA/ByP63XM26AW2+9I5k5ASkLp74ql5RqykdyXtq84Ape70aAARVExz6b Qa8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=xMAETwu5DqW48PO3rBFydiP/mYWqOvcAkv/VfaZBxfs=; b=vB4FF6F0EDU62einpFA7HYSbO+7hynq2rNe0eFgBR9RMk8CDWVhLz7LIuNDgByEK1o 4CeBvQtM6YcIrXFsEMmQUUaKotv2mjOJIZCxk7ydS4+A0D+KEkLXJe1wJ19Zl7IqBTEl haqsHGaPHORqQOVpPK4ArHPft5mAJ1QdNrJcD6fKtpIUV8OV0zx2vfaFokutLo9waH/j xicoDkL6C3N2at5Z68QNtswEz1g/pwrABJXXJur2CRy1m5gdUabSn1e5oD6oXa3u9lFR +BbRNsXniJjFF4nOnOYjHvvrz9spbrWSvLafZUDNGBzmKw64CeZ/LW7Ot9NM7v0FFtET 1Btg== X-Gm-Message-State: ANoB5plPyp5athgKmC3z0ib33YJLQ62OUOOotAt2jmh8bvfVxAM1Zl4B QmoSSkMcS/QU4NjKnGdz74//2yrgjPHGzjLe X-Received: by 2002:a05:6512:b8c:b0:4a4:5f2e:49b3 with SMTP id b12-20020a0565120b8c00b004a45f2e49b3mr3256342lfv.148.1668374434101; Sun, 13 Nov 2022 13:20:34 -0800 (PST) Received: from ubuntu-focal.. ([2a01:4f9:3a:1e26::2]) by smtp.gmail.com with ESMTPSA id d5-20020a0565123d0500b004948ddb4e4dsm1529079lfv.301.2022.11.13.13.20.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Nov 2022 13:20:33 -0800 (PST) From: Philipp Tomsich To: gcc-patches@gcc.gnu.org Cc: Jeff Law , Vineet Gupta , Kito Cheng , Christoph Muellner , Palmer Dabbelt , Philipp Tomsich Subject: [PATCH v2 1/8] RISC-V: Recognize xventanacondops extension Date: Sun, 13 Nov 2022 22:20:22 +0100 Message-Id: <20221113212030.4078815-2-philipp.tomsich@vrull.eu> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221113212030.4078815-1-philipp.tomsich@vrull.eu> References: <20221113212030.4078815-1-philipp.tomsich@vrull.eu> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, JMQ_SPF_NEUTRAL, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749417474119410591?= X-GMAIL-MSGID: =?utf-8?q?1749417474119410591?= This adds the xventanacondops extension to the option parsing and as a default for the ventana-vt1 core: gcc/Changelog: * common/config/riscv/riscv-common.cc: Recognize "xventanacondops" as part of an architecture string. * config/riscv/riscv-opts.h (MASK_XVENTANACONDOPS): Define. (TARGET_XVENTANACONDOPS): Define. * config/riscv/riscv.opt: Add "riscv_xventanacondops". Signed-off-by: Philipp Tomsich --- Changes in v2: - Restore a (during rebase) dropped line to xventanacondops.md - Include the change to add xventanacondops to the VT1 code definition] as a separate patch. gcc/common/config/riscv/riscv-common.cc | 2 ++ gcc/config/riscv/riscv-opts.h | 3 +++ gcc/config/riscv/riscv.opt | 3 +++ 3 files changed, 8 insertions(+) diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc index 4b7f777c103..6b2bdda5feb 100644 --- a/gcc/common/config/riscv/riscv-common.cc +++ b/gcc/common/config/riscv/riscv-common.cc @@ -1247,6 +1247,8 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] = {"svinval", &gcc_options::x_riscv_sv_subext, MASK_SVINVAL}, {"svnapot", &gcc_options::x_riscv_sv_subext, MASK_SVNAPOT}, + {"xventanacondops", &gcc_options::x_riscv_xventanacondops, MASK_XVENTANACONDOPS}, + {NULL, NULL, 0} }; diff --git a/gcc/config/riscv/riscv-opts.h b/gcc/config/riscv/riscv-opts.h index 1be83b5107c..7962dbe5018 100644 --- a/gcc/config/riscv/riscv-opts.h +++ b/gcc/config/riscv/riscv-opts.h @@ -189,4 +189,7 @@ enum stack_protector_guard { ? 0 \ : 32 << (__builtin_popcount (riscv_zvl_flags) - 1)) +#define MASK_XVENTANACONDOPS (1 << 0) +#define TARGET_XVENTANACONDOPS ((riscv_xventanacondops & MASK_XVENTANACONDOPS) != 0) + #endif /* ! GCC_RISCV_OPTS_H */ diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt index 7c3ca48d1cc..9595078bdd4 100644 --- a/gcc/config/riscv/riscv.opt +++ b/gcc/config/riscv/riscv.opt @@ -233,6 +233,9 @@ int riscv_zm_subext TargetVariable int riscv_sv_subext +TargetVariable +int riscv_xventanacondops = 0 + Enum Name(isa_spec_class) Type(enum riscv_isa_spec_class) Supported ISA specs (for use with the -misa-spec= option):