From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id C8608384F96A for ; Fri, 16 Dec 2022 16:48:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C8608384F96A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pj1-x102f.google.com with SMTP id v13-20020a17090a6b0d00b00219c3be9830so2909112pjj.4 for ; Fri, 16 Dec 2022 08:48:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-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=Qg6/XBfwEpFiexh40tCM5yqrMDxbzXflUo0b2chaRYI=; b=LCvuqL059RwogTz87if62+puuQp+j1xzfAhp3YHCgwg3zHWopIgH2UnmwYiDmg8DUz GdFPSQgxwf2eUttdsWEkZqZmr/IVhq68Wyh7YXLNvdTOT4B9zTp1k5hJs8HPhaV8ijGJ 1OEQd+dNgO4QB+r0BkCldD/tqQdUYF2+xUUSo70yyUGBVgyCbg/c4qlp0LGwJRwoH5+Z QiAO3sk+D2fj5ifDj1vDcIginO3Ya74qU+qPW7LqkbuhwaR62b4XZWkiiMpgrSrCds4Z i15QySoiwur06VrKQhrhIzgMXLKxCTfqTZiJG76bxVGvdyq4bCCm+xYyS5lrq3MeY9PW lOhg== 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=Qg6/XBfwEpFiexh40tCM5yqrMDxbzXflUo0b2chaRYI=; b=MF4v8zEex5N5DaCsIaCFysrHnU9GlXJ+FHhnG6tZM7zmMjaThtgXg+gDXJtguw6Sl4 zR2RzbUaa2GIhJCX4Al99cDukbeGRNneuZUET50Cr4//N5MDp+VioC5jOlFFdxPjKs0e DbBwuc1Qser1c5sqbw23XtlrURfXISglRWGckcEvjcwNAsLJUYg710T1XLIyZv03V/ss H5YgD9X46uRnc206Hv0xzRMU2F4hbHGT6J9kvRMho1qkrYSO7HyqXWknvnCkjf8hWmry pxO+AKuQnHry9V1txQezPpOvmoaaHnuBqS6KSmXz0I82Gwd/B++VuA+Md+GBfHtPsqkY Wc4A== X-Gm-Message-State: ANoB5pmY2HnGD+BHwoDyx4Wun4gcOXtizGaQyrVUSW5NhnbUouLhxuvc 0NXUI3dEbxEBnVpoZeZBktjkj8taUZ62WJhZ X-Google-Smtp-Source: AA0mqf76iRB2m8y/qluxx3XOvq2jF2x3we2nCctQP96z36hj7V2gKLEKfLfT0sMyAhlYL9O67fz8jQ== X-Received: by 2002:a17:90a:34c1:b0:219:3a95:5b04 with SMTP id m1-20020a17090a34c100b002193a955b04mr41718986pjf.25.1671209308423; Fri, 16 Dec 2022 08:48:28 -0800 (PST) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id mi14-20020a17090b4b4e00b0020d67a726easm5049024pjb.10.2022.12.16.08.48.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 08:48:27 -0800 (PST) Date: Fri, 16 Dec 2022 08:48:27 -0800 (PST) X-Google-Original-Date: Fri, 16 Dec 2022 08:47:35 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=-11.8 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 Mon, 28 Nov 2022 10:45:51 PST (-0800), Palmer Dabbelt wrote: > 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. I'm just committing this one, no big deal if you want to change the wording. I just want it out of my queue. > >> >>> 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 >>>>