Message ID | cover.1691634361.git.research_trasio@irq.a4lg.com |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp136584vqi; Wed, 9 Aug 2023 19:28:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFZO/qcbPIhaUF/BsGV6tijO1agDOw7r1I9eNW7VKeqBI3LT9k7si+C2Ihl4YyMtBRk7k7D X-Received: by 2002:a17:906:23e9:b0:992:9005:5ed5 with SMTP id j9-20020a17090623e900b0099290055ed5mr683232ejg.32.1691634519225; Wed, 09 Aug 2023 19:28:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691634519; cv=none; d=google.com; s=arc-20160816; b=DnEj3QrodSbAvaeLLhni57PvQBooNno0K7SaVSV8wNpoDEgN6Yum3Kzurkoe//fz6j Ma+qZqInAOyQd+vaD3TCRP5eYsoX6ms09/Dx/8KQvywWjP/odOu7VLqdASdzJ+cmARJA ZpeYY/4iAjWXLtF0Wq7Z2aAQQ8hsnwTcy6FIAz++Lqk39GnzEb8CYEK+AokdskOfKVCN l8C4kkWI28kO1Gv+hbx28+BDueS+rIKuWAjoJqjId87hs4FKSgl83rNsuZEx2yxS53YG bodrutd08W8V2frZ3nqzG8xAyElLPdkkfTifqeTeBF9tp/Gu08Ar+0Nwf5AaYrzHGE7H G+SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from: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:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=HKrOjhPtmtA8UW+fir1DMpdxJzsl+TCak6MPl4ef5Jg=; fh=+ZIkFo1I6igCs2Jp1h//NIIJ4JZvgs62lnbG3NFOoyY=; b=Fs0x+iukaoTluTEwk+BIZmWHQRCIsDBqp5uB4oRbHPjE+r17/u0K3ow62isZQnod3A 9C9wGn5DO0xP9j9P1dg0BphA891lJOSHnouQo8sKa5cBoT83mOBwlXrgrGAeT0MPhuV2 qcG16o+8gO6gX0p12JJEZ4P13CA52ekAXWG0dgi+n8LxUot3tEGQRrNxNlTx/TekyNKa inTHuCyb7BVx17MBMTVkc66CJXynh2vDZiqKFpeR0U+7nZvc/YKnrLV5IvAZm4IY1qdW G5mV2PAqM+FIHDVNHtb+fSZ/eYYnVkQjB8lqq5fekpcinyApKu7lrZikKfbFLpQbBmd6 7hrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=siCbai3p; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id qw1-20020a170906fca100b00988afd7e58asi509309ejb.350.2023.08.09.19.28.39 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 19:28:39 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=siCbai3p; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 82B463857738 for <ouuuleilei@gmail.com>; Thu, 10 Aug 2023 02:27:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82B463857738 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691634467; bh=HKrOjhPtmtA8UW+fir1DMpdxJzsl+TCak6MPl4ef5Jg=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=siCbai3pE2zIlTd1BElVqqEuNalYvtlsA7xOZ45fZ2XMOzYqFnhmQgEw/KjsJUsS2 /r8tyGzAS53GgjQlHf/3ec7Cp2XzrwlcJTVg3UmTrxouH8yc530PmwyAZKrbUznnO5 1+G9aghFhmlgahA526u9t15qA/y4OhwaOK57JmdI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 419283858020 for <gcc-patches@gcc.gnu.org>; Thu, 10 Aug 2023 02:26:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 419283858020 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 8BF5E300089; Thu, 10 Aug 2023 02:26:11 +0000 (UTC) To: Tsukasa OI <research_trasio@irq.a4lg.com>, Kito Cheng <kito.cheng@gmail.com>, Palmer Dabbelt <palmer@dabbelt.com>, Andrew Waterman <andrew@sifive.com>, Jim Wilson <jim.wilson.gcc@gmail.com>, Jeff Law <jeffreyalaw@gmail.com> Cc: gcc-patches@gcc.gnu.org Subject: [RFC PATCH 0/2] RISC-V: Make __builtin_riscv_pause 'Zihintpause' only Date: Thu, 10 Aug 2023 02:26:01 +0000 Message-ID: <cover.1691634361.git.research_trasio@irq.a4lg.com> In-Reply-To: <cover.1691561509.git.research_trasio@irq.a4lg.com> References: <cover.1691561509.git.research_trasio@irq.a4lg.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KAM_MANYTO, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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 <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> From: Tsukasa OI via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Tsukasa OI <research_trasio@irq.a4lg.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773807303361999323 X-GMAIL-MSGID: 1773807357583579337 |
Series |
RISC-V: Make __builtin_riscv_pause 'Zihintpause' only
|
|
Message
Tsukasa OI
Aug. 10, 2023, 2:26 a.m. UTC
**WARNING** Following patch sets are exclusive: 1. [RFC PATCH v2] RISC-V: __builtin_riscv_pause for all environment 2. [RFC PATCH] RISC-V: Make __builtin_riscv_pause 'Zihintpause' only (this) See <https://gcc.gnu.org/pipermail/gcc-patches/2023-August/626748.html> for the background of this patch set. Changes: (all environment) v1 -> ('Zihintpause'-only) v1 * Based on the feedback from Jeff Law, I made an alternative patch set which makes "__builtin_riscv_pause" 'Zihintpause'-only. Comparison: Patch sets [1] and [2] (this) * [1] completely preserves the compatibility with GCC 13 ([2] removes __builtin_riscv_pause if the 'Zihintpause' extension is absent, making a minor compatibility issue) * Because of the nature of the instrinsic, [2] is more natural ("pause" is defined in the 'Zihintpause' extension). Please consider those patch sets and decide which to apply. Sincerely, Tsukasa Tsukasa OI (2): RISC-V: Make __builtin_riscv_pause 'Zihintpause' only RISC-V: Fix documentation of __builtin_riscv_pause gcc/common/config/riscv/riscv-common.cc | 2 ++ gcc/config/riscv/riscv-builtins.cc | 4 ++-- gcc/config/riscv/riscv-opts.h | 2 ++ gcc/config/riscv/riscv.md | 2 +- gcc/doc/extend.texi | 6 +++--- gcc/testsuite/gcc.target/riscv/builtin_pause.c | 10 ---------- gcc/testsuite/gcc.target/riscv/zihintpause-1.c | 11 +++++++++++ gcc/testsuite/gcc.target/riscv/zihintpause-2.c | 11 +++++++++++ 8 files changed, 32 insertions(+), 16 deletions(-) delete mode 100644 gcc/testsuite/gcc.target/riscv/builtin_pause.c create mode 100644 gcc/testsuite/gcc.target/riscv/zihintpause-1.c create mode 100644 gcc/testsuite/gcc.target/riscv/zihintpause-2.c base-commit: 9b099a83b45b8fcdfc07d518e05d36ea741b2227