From patchwork Sat Nov 12 21:29:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Tomsich X-Patchwork-Id: 60490 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C1DA23895FF3 for ; Sat, 12 Nov 2022 21:30:11 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id 5C209385841E for ; Sat, 12 Nov 2022 21:29:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5C209385841E 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-lj1-x236.google.com with SMTP id u11so8364218ljk.6 for ; Sat, 12 Nov 2022 13:29:50 -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=LzHdUHTecZ9iXLGEZMicojcbCnUM+cTwTJW2ChrRsek=; b=DTPAazE2CjXWUZOPQFt0nNNXZ0U2wtJ7fJQWWuxbRXkKpeEUurlxDfNvDgVy9sMBFQ yzyj3lRUTS1dCq6HH2RXe8gorLxT4Z8Jfe63ZH9X9K/ukHIPDL++6Oydv2+UumeYsAkK B7I7DvBl3Cde9u031KtnknKnQ2axM5QHDfoOiUk9T28P5JNy6wcRJm39ADPtPTKXnxFN CxW2xipEdtQDhTtUIUIYUsovCoCx4jkNFJfO0851Cksffmg3ZrqpNnE5zztru4Up8DqM BCbjcj9CnApt5CBd1gIv40zZhRAZ+l7yHUZRD3Fk/8khqi+7l9a2Bm8vUQ84ph7qFDHW 6Vkg== 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=LzHdUHTecZ9iXLGEZMicojcbCnUM+cTwTJW2ChrRsek=; b=k1TBReBm0YVZpXZvT1YL/hcYroDddynE0YG0/+kZLZRRqseJaP4zNUK7lPdco6eXaw imHhhe4daVBWYi6qphN1C8KoszJUpZ8To1cmdvG0qxBQa4ov4nKngL+QbTcBiWOK0pVo IY7HcSqhqa8NVvS+IQ0IlBD4fBVIC751QWu7Dk0sgd2Qxb37Xoum1+lezN/nt4pfGE5l tvSr/YSfIQoCCOorlW7XH3rHjRJ1VNbwIlNvJ/HulEGiHMxdKng+yWFVpIZqaAyDgWcu weuJK+WfOrUBIZVfVdUWA6J9LGCQYsuizj46Nu2GQaejah4QqPPBPT5K7rcdu1g0i9Ph Dr/Q== X-Gm-Message-State: ANoB5plBGpbjFduOTdTbiKLNx1yY2K+CMuQg+eUQhSczV4cQ3Ne/OBA3 pNr+iNKCv3ktw7wuCu68W5soHrv1TY+m7rry X-Google-Smtp-Source: AA0mqf6Kj6fHl0nRxoqi915qGbUW9Pj6VTRHTJXcRBOqOE1t2ISLCC6SAlJ9j+bZCuYjor9NFFt+uQ== X-Received: by 2002:a2e:8e2b:0:b0:278:f572:c9ac with SMTP id r11-20020a2e8e2b000000b00278f572c9acmr1045112ljk.73.1668288588622; Sat, 12 Nov 2022 13:29:48 -0800 (PST) Received: from ubuntu-focal.. ([2a01:4f9:3a:1e26::2]) by smtp.gmail.com with ESMTPSA id b9-20020a0565120b8900b004a4251c7f75sm1042967lfv.202.2022.11.12.13.29.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Nov 2022 13:29:47 -0800 (PST) From: Philipp Tomsich To: gcc-patches@gcc.gnu.org Cc: Vineet Gupta , Palmer Dabbelt , Christoph Muellner , Kito Cheng , Jeff Law , Philipp Tomsich Subject: [PATCH 1/7] RISC-V: Recognize xventanacondops extension Date: Sat, 12 Nov 2022 22:29:37 +0100 Message-Id: <20221112212943.3068249-2-philipp.tomsich@vrull.eu> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221112212943.3068249-1-philipp.tomsich@vrull.eu> References: <20221112212943.3068249-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+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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-cores.def (RISCV_CORE): Enable "xventanacondops" by default for "ventana-vt1". * config/riscv/riscv-opts.h (MASK_XVENTANACONDOPS): Define. (TARGET_XVENTANACONDOPS): Define. * config/riscv/riscv.opt: Add "riscv_xventanacondops". Signed-off-by: Philipp Tomsich --- 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 25fd85b09b1..84c987626bc 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):