From: Jeff Law <jeffreyalaw@gmail.com>
To: Philipp Tomsich <philipp.tomsich@vrull.eu>, gcc-patches@gcc.gnu.org
Cc: Vineet Gupta <vineetg@rivosinc.com>,
Palmer Dabbelt <palmer@rivosinc.com>,
Jeff Law <jlaw@ventanamicro.com>,
Kito Cheng <kito.cheng@gmail.com>,
Christoph Muellner <christoph.muellner@vrull.eu>
Subject: Re: [PATCH] RISC-V: Zihintpause: add __builtin_riscv_pause
Date: Tue, 15 Nov 2022 09:40:46 -0700 [thread overview]
Message-ID: <8c89be43-4c82-26e0-ad0a-0914b2b85578@gmail.com> (raw)
In-Reply-To: <20221113204139.4061479-1-philipp.tomsich@vrull.eu>
On 11/13/22 13:41, Philipp Tomsich wrote:
> The Zihintpause extension uses an opcode from the 'fence' opcode range
> to add a true hint instruction (i.e. if it is not supported on any
> given platform, the 'fence' that is encoded will not enforce any
> specific ordering on memory accesses) for entering a low-power state
> (e.g. in an idle thread). We expose this new instruction through a
> machine-dependent builtin to allow generating it without a requirement
> for any inline assembly.
>
> Given that the encoding of 'pause' is valid (as a 'fence' encoding)
> even for processors that do not (yet) support Zihintpause, we make
> this builtin available without any further TARGET_* constraints.
>
> gcc/ChangeLog:
>
> * config/riscv/riscv-builtins.cc (struct riscv_builtin_description):
> add the pause machine-dependent builtin with no result and no
> arguments; mark it as always present (pause is a true hint
> that encodes into a fence-insn, if not supported with the new
> pause semantics).
> * config/riscv/riscv-ftypes.def: Add type for void -> void.
> * config/riscv/riscv.md (riscv_pause): Add risc_pause and UNSPECV_PAUSE
> * doc/gcc/extensions-to-the-c-language-family/target-builtins/risc-v-built-in-functions.rst:
> Document.
> * optabs.cc (maybe_gen_insn): Allow nops == 0 (void -> void).
>
> gcc/testsuite/ChangeLog:
>
> * gcc.target/riscv/builtin_pause.c: New test.
OK. Though I think you'll need to adjust the doc patch now with the
sphinx work reverted.
Jeff
next prev parent reply other threads:[~2022-11-15 16:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-13 20:41 Philipp Tomsich
2022-11-15 16:40 ` Jeff Law [this message]
2022-11-15 22:12 ` Philipp Tomsich
-- strict thread matches above, loose matches on Subject: below --
2021-01-06 17:33 Philipp Tomsich
2021-01-07 3:35 ` Kito Cheng
2021-01-07 3:50 ` Andrew Waterman
2021-01-07 5:41 ` Kito Cheng
2021-01-07 6:53 ` Philipp Tomsich
2021-01-07 8:49 ` Kito Cheng
2021-02-18 20:21 ` Jim Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8c89be43-4c82-26e0-ad0a-0914b2b85578@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=christoph.muellner@vrull.eu \
--cc=gcc-patches@gcc.gnu.org \
--cc=jlaw@ventanamicro.com \
--cc=kito.cheng@gmail.com \
--cc=palmer@rivosinc.com \
--cc=philipp.tomsich@vrull.eu \
--cc=vineetg@rivosinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).