From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 3C90F384F6C0 for ; Fri, 18 Nov 2022 17:01:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3C90F384F6C0 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-pf1-x429.google.com with SMTP id y203so5424031pfb.4 for ; Fri, 18 Nov 2022 09:01:11 -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=g9IEPQ1aKsEFGmIflIcwfG6uwYld/hzKuViSBW3uLNY=; b=glzmNVoeqqj9nfz4cDe6Cg+ukS3dCyuvI0lYI/K62/vYCT9rVP8aV8QYK1VinbTslf llwcoc7iSWn1Ao7rXe+WIVgLHK5SSZczqL/MvSMUocLqhSi8F15n2VGd5PplKxW/qM45 xvDbKrd652knVt4u2OeFUAJEVa+tXpQSq4jwkn64E+T6jdiq82+KH/1cfJ3PJ9/GkVnJ CcNIqFY9QF+J9E/p0CvZcGQHp+91etClxrhInDFvXuGR1I06BsgXd3eNspRC+BE67dRn tjxb8cyCyq6DFKBXWYBRSgQ6yKx17/KwijsYeCjQYKCKIH5HGICsF2BAQpEti1htqdl8 07nQ== 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=g9IEPQ1aKsEFGmIflIcwfG6uwYld/hzKuViSBW3uLNY=; b=GL5g9bnKPfUBCNY+dVTiwJ7ROuvTdNMBHHPyQ6GaJ4x6pj0+yxjURC5xtXsaybotUq UzPTDrHLD0WW1dsMewHy1RsVpquFMjJDrg47+70ZxCsr5XliITEBOL5nEy7QjU3y7Udf ywzhA06QtM6yMMvMYtwmqxIW6kXUOHVqj+eX7joKFZH9WVbmrnrPqvz2tfc5knztGhDQ UL+Nqr/WUB62UM6R6O6LV6Ihy2MiEmgm8GprDbHOCkzIhpBU6ZkkwOCvHkqwmn4fo8z9 beTYS2fLqra7xDD6NnwMeLu32XEXhGQLiXNLbpaMRZIZJlWGwGdXr5TIbFAoPNL9epIa ugug== X-Gm-Message-State: ANoB5pliDRbB9U+Dj7jpsioErG4K6vgc2vdHxlS5L5rB16ZE8ekKhT0Z N7pGgqiA+ZI5eRkbCNw4Jl4jIky4k2hhVg== X-Google-Smtp-Source: AA0mqf4GIF6JhM0VdOlUSLoHR7V2KPIYy5tv51lbvgduZ3/ZC1zwrstjO0xH+dPoD2Eql/MsqwBlZA== X-Received: by 2002:a63:444b:0:b0:46f:eb81:c997 with SMTP id t11-20020a63444b000000b0046feb81c997mr7389670pgk.379.1668790869551; Fri, 18 Nov 2022 09:01:09 -0800 (PST) Received: from localhost ([135.180.226.51]) by smtp.gmail.com with ESMTPSA id w68-20020a627b47000000b0057280487af1sm3344924pfc.206.2022.11.18.09.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 09:01:08 -0800 (PST) Date: Fri, 18 Nov 2022 09:01:08 -0800 (PST) X-Google-Original-Date: Fri, 18 Nov 2022 09:01:07 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 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. > 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 >>