From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by sourceware.org (Postfix) with ESMTPS id E248F3858C54 for ; Sun, 13 Aug 2023 20:17:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E248F3858C54 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-790b95beeedso182857539f.0 for ; Sun, 13 Aug 2023 13:17:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1691957857; x=1692562657; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9o6LXg6Fi9lowx3YNnb0cYNqYiiS7OqSpIXcfTy/s2A=; b=Tqko5uFS5TL2HYaMPo7v9YfZib1RJAddmxoriQl44B8VU2blrq8hK6NZCJ32qJ1qL7 Pd3+xtnqiHPe5XF4X6KM7FZhScEylalYqPgStxSo/0xooF4bTdN0FPq1LTGjW/b7rMWZ 1K8Qhh0DIFRzgGUnLc0Lhk5pZttE22ZkwVR+uD0bZWY6gxdjfSsHBdLKnbOVencq+HrT aAJKg8qY8PqegxJLX7fPXS9NMlizMf2MEMu+T5KVfMefMHrqVfRBebptuAEVc/ga+B67 TY4hedBZmtvQLxBEcDp30ocb0an9tDqfKH3C0jCRGdP5PhACq+x8VZCbPJraDH8Al4e0 gvKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691957857; x=1692562657; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9o6LXg6Fi9lowx3YNnb0cYNqYiiS7OqSpIXcfTy/s2A=; b=eWyLDkbv34/nZjUaOp+tgOCBw74+VzSNpGLltNo4u4EFTeWwQ2xcAeCEbncxmdxOOb vB+eOij3j/r3NAnSOTlBQFCfs5ukbbjBY8sOKTEmwjm0ftNbqF+I/9QPLj38izHbPMKG tfpr5zr/DvugFVXrSAv9WjEfSv4zuarTHbYgKQtVasUPQLtYrEX+vetjRpUOmvnKrgwl la9bCpN/Jj9S1x900UrWrD6mGk1VyDFDJQqQ3h9SKSsoRqOiv/nbR9RpAiYZveIxdwdS XrRst16OyLIK59xhTuzoL11KS1ASRlHMZ3Uq1/QoeagVMzpS9TaJzwdjUpNSC+309hTG cpow== X-Gm-Message-State: AOJu0YxEnPloBwyz2gIu1scw39ToN6fFlm1dFEHPN2EOHkaPSXUEvPRw 1WDpb/gVgzkopr9fI53AuO4wjRNiutYH5SVdac6eOtC0cc7U+QqhA4qRtdU59d5PCdMdbZT1drF G0H//Cfq2KN5dpKU0naasBtnjVokn2n63NtBqXO/aFPLg2USE3ulG8kqVWWFJI+WndR87ANt3lw == X-Google-Smtp-Source: AGHT+IFtAHjo/8RmHna3OzuD9UWi268Doq3jaFFcsl9sktgLTXBvHFgBDZ3zxzG0I5tw2Q5inbDidg== X-Received: by 2002:a6b:dc19:0:b0:77e:249e:d84 with SMTP id s25-20020a6bdc19000000b0077e249e0d84mr13550098ioc.5.1691957857349; Sun, 13 Aug 2023 13:17:37 -0700 (PDT) Received: from mail-il1-f175.google.com (mail-il1-f175.google.com. [209.85.166.175]) by smtp.gmail.com with ESMTPSA id j21-20020a6b3115000000b00786ef44ec28sm2736742ioa.12.2023.08.13.13.17.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Aug 2023 13:17:36 -0700 (PDT) Received: by mail-il1-f175.google.com with SMTP id e9e14a558f8ab-349974537f5so16173435ab.2 for ; Sun, 13 Aug 2023 13:17:36 -0700 (PDT) X-Received: by 2002:a92:c562:0:b0:345:d58d:9ae5 with SMTP id b2-20020a92c562000000b00345d58d9ae5mr12553707ilj.7.1691957855976; Sun, 13 Aug 2023 13:17:35 -0700 (PDT) MIME-Version: 1.0 References: <76a5e956-b615-000b-9071-96de4eaf0a90@gmail.com> <2de02da0-70c1-49be-96a6-aed284cfd7f8@irq.a4lg.com> In-Reply-To: From: Andrew Waterman Date: Sun, 13 Aug 2023 13:17:25 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 0/2] RISC-V: __builtin_riscv_pause for all environment To: Philipp Tomsich Cc: Jeff Law , Tsukasa OI , Kito Cheng , Palmer Dabbelt , Jim Wilson , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Sun, Aug 13, 2023 at 12:53=E2=80=AFPM Philipp Tomsich wrote: > > On Sat, 12 Aug 2023 at 01:31, Jeff Law via Gcc-patches > wrote: > > > > > > > > On 8/9/23 16:39, Tsukasa OI wrote: > > > On 2023/08/10 5:05, Jeff Law wrote: > > > > >> I'd tend to think we do not want to expose the intrinsic unless the > > >> right extensions are enabled -- even though the encoding is a no-op = and > > >> we could emit it as a .insn. > > > > > > I think that makes sense. The only reason I implemented the > > > no-'Zihintpause' version is because GCC 13 implemented the built-in > > > unconditionally. If the compatibility breakage is considered minimum= (I > > > don't know, though), I'm ready to submit 'Zihintpause'-only version o= f > > > this patch set. > > While it's a compatibility break I don't think we have a need to > > preserve this kind of compatibility. I suspect anyone using > > __builtin_riscv_pause was probably already turning on Zihintpause and i= f > > they weren't they should have been :-0 > > > > > > I'm sure we'll kick this around in the Tuesday meeting and hopefully > > make a decision about the desired direction. You're obviously welcome > > to join if you're inclined. Let me know if you need an invite. > > The original discussion (and I believe that Andrew was the decisive > voice in the end) came to the conclusion that=E2=80=94given that pause is= a > true hint=E2=80=94it could always be enabled. I continue to think that, since it's semantically valid to execute a HINT on any implementation, there's little utility in ever rejecting the HINT builtins, or in rejecting explicit HINTs in asm, irrespective of -march. But ultimately it isn't a big deal either way. > We had originally expected to enable it only if Zihintpause was part > of the target architecture, but viewing it as "just a name for an > already existing pure hint" also made sense. > Note that on systems that don't implement Zihintpause, the hint is > guarantueed to not have an architectural effect. > > That said, I don't really have a strong leaning one way or another. > Philipp.