From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 10C8F3853D59 for ; Mon, 28 Nov 2022 18:45:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 10C8F3853D59 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dabbelt.com Received: by mail-pf1-x432.google.com with SMTP id z17so6569759pff.1 for ; Mon, 28 Nov 2022 10:45:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=V4nsd8bRUIrICJrut3w+vfOgGmXXOERJlSjqOBVe2VE=; b=LC8uceQLr6Ks7QngSxkzWNfOTBbRaBxqSx4StMsrAlZVpSRoECy0qhv8RJ/N6wKPTK ufyJbEmpRZPFGd2QOjzvCw2Mn4q/5no4+UGKRZDBNLpoTcGuAokh/U82vxCw7isMCzve eyT9hm1qUEBOIqOutID6p1v17Mkji19QbuUVA3zeTcn0LOaym/Ozx3H7/hm01OC60WOM etXMFZ+GMR4OkYqWKdFfNPizdxdmg/RG56RIXsNI2u3Khx9u4C7u8rwkK0JgTHNhLkTE 8eRYy98tRFEen1T+jenRb+3KVsYKOOX29S5ocNetXEjXWBmDrfmV/fVuzoJ656bdq23t 55Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=V4nsd8bRUIrICJrut3w+vfOgGmXXOERJlSjqOBVe2VE=; b=ysNyM170k+DVc+lsHYwFEaUlOBN2KbavaU0pO2LIgWrNIAT1qmLLxBfzByecpsuATI 5o5rm5tOXBJcFaX/IKVvg2VDOluhAkNfPwIAvo3sXN/mcUIqtIMHf/o1XXnh2AmibqQn +QgNZGVuNnFEnQbFeMrrzOCnYVb8lz/QM1MKGNlXwhlt3/oXaeYedAWA0IFjKwA+aOmH M1ReQje7D5SZPWGOSoCBYJt1P4jE0T9r8R33eTUywR+c4NCHLy+fyVDG8UjlD7lJCKq6 IbgHSZsYPg+VcFSEntJPMpDAwMrZy7/tLpnuVRIK4XGtnUrWx2vI+bBhFdwSXSR27pBi J5GQ== X-Gm-Message-State: ANoB5pmPfZ+f0RvCwxxQIHAEN7zwNLOgYxY59K+OIxrj5+hYZ4sCdY4K gkgiENwSM2oEUeBDXs5MiHhpg2V8EiWWdQ== X-Google-Smtp-Source: AA0mqf741vRUzgiWuvQx53QSHrNr+veM54trFPhm6eU5bEwR4nbCJGB83ySxPO73nzylaa5onzr55g== X-Received: by 2002:a05:6a00:1624:b0:573:993b:ea6d with SMTP id e4-20020a056a00162400b00573993bea6dmr35176260pfc.10.1669661152283; Mon, 28 Nov 2022 10:45:52 -0800 (PST) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id ca7-20020a17090af30700b00219186abd7csm4938573pjb.16.2022.11.28.10.45.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 10:45:51 -0800 (PST) Date: Mon, 28 Nov 2022 10:45:51 -0800 (PST) X-Google-Original-Date: Mon, 28 Nov 2022 10:45:43 PST (-0800) Subject: Re: [PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate In-Reply-To: CC: gcc-patches@gcc.gnu.org From: Palmer Dabbelt To: Kito Cheng Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.9 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 List-Id: On Fri, 18 Nov 2022 09:01:08 PST (-0800), Palmer Dabbelt wrote: > On Thu, 17 Nov 2022 22:59:08 PST (-0800), Kito Cheng wrote: >> Wait, what's Xgnuzihintpausestate??? > > I just made it up, it's defined right next to the name like those > profile extensions are. I figured that's the most RISC-V way to define > something like this, but we could just drop it and run with the > definition -- IIRC we just stuck a comment in for Linux and QEMU, I > doubt anyone is actually going to implement the "doesn't touch PC" > version of pause. Just checking up on this one. I don't care a ton about the name, just that we document where we're intentionally violating the specs. > >> On Fri, Nov 18, 2022 at 12:30 PM Palmer Dabbelt wrote: >>> >>> gcc/ChangeLog: >>> >>> * doc/extend.texi (__builtin_riscv_pause): Imply >>> Xgnuzihintpausestate. >>> --- >>> gcc/doc/extend.texi | 4 +++- >>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi >>> index b1dd39e64b8..26f14e61bc8 100644 >>> --- a/gcc/doc/extend.texi >>> +++ b/gcc/doc/extend.texi >>> @@ -21103,7 +21103,9 @@ Returns the value that is currently set in the @samp{tp} register. >>> @end deftypefn >>> >>> @deftypefn {Built-in Function} void __builtin_riscv_pause (void) >>> -Generates the @code{pause} (hint) machine instruction. >>> +Generates the @code{pause} (hint) machine instruction. This implies the >>> +Xgnuzihintpausestate extension, which redefines the @code{pause} instruction to >>> +change architectural state. >>> @end deftypefn >>> >>> @node RX Built-in Functions >>> -- >>> 2.38.1 >>>