From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 2F4B73858D20 for ; Thu, 10 Aug 2023 02:25:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2F4B73858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id D110A300089; Thu, 10 Aug 2023 02:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1691634311; bh=AvROpH5Vox7fWD8ogax2iznnm9+GA+oiS8gXnP/fDjU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Mime-Version:Content-Transfer-Encoding; b=nXLiQ4Sadqjod1wm/Ch3qPPVyNz9eVd9MW7iw/2E1Ne8xHhOoBrVwFgJcs7qyyraL vIkaBTBJPtA6TULsfuYPOqvD99HrdQv4YdmIEZIt7mySfevaen3C/UZW7vIjjaGMRw qepSBiHJ648IOH/uv5aH9oZxm19ZouFAHTdZpIIk= From: Tsukasa OI To: Tsukasa OI , Kito Cheng , Palmer Dabbelt , Andrew Waterman , Jim Wilson , Jeff Law Cc: gcc-patches@gcc.gnu.org Subject: [RFC PATCH v2 0/2] RISC-V: __builtin_riscv_pause for all environment Date: Thu, 10 Aug 2023 02:25:05 +0000 Message-ID: In-Reply-To: References: 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 List-Id: **WARNING** Following patch sets are exclusive: 1. [RFC PATCH v2] RISC-V: __builtin_riscv_pause for all environment (this) 2. [RFC PATCH] RISC-V: Make __builtin_riscv_pause 'Zihintpause' only See for the background of this patch set. Changes: v1 -> v2 * Improve test case to test both RV32 and RV64 (+'Zihintpause'). Comparison: Patch sets [1] (this) and [2] * [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: __builtin_riscv_pause for all environment RISC-V: Fix documentation of __builtin_riscv_pause gcc/common/config/riscv/riscv-common.cc | 2 ++ gcc/config/riscv/riscv-builtins.cc | 6 ++++-- gcc/config/riscv/riscv-opts.h | 2 ++ gcc/config/riscv/riscv.md | 7 ++++++- 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 +++++++++++ gcc/testsuite/gcc.target/riscv/zihintpause-noarch.c | 12 ++++++++++++ 9 files changed, 51 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 create mode 100644 gcc/testsuite/gcc.target/riscv/zihintpause-noarch.c base-commit: 9b099a83b45b8fcdfc07d518e05d36ea741b2227 -- 2.41.0