Re: [PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate

2022-12-17 Thread Andrew Waterman
On Sat, Dec 17, 2022 at 2:21 AM Andreas Schwab wrote: > > On Dez 17 2022, Andrew Waterman wrote: > > > On Sat, Dec 17, 2022 at 2:10 AM Andreas Schwab > > wrote: > >> > >> On Dez 17 2022, Andrew Waterman wrote: > >> > >> > It took me a few minutes to understand the purpose of this chicanery, but

Re: [PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate

2022-12-17 Thread Andreas Schwab
On Dez 17 2022, Andrew Waterman wrote: > On Sat, Dec 17, 2022 at 2:10 AM Andreas Schwab wrote: >> >> On Dez 17 2022, Andrew Waterman wrote: >> >> > It took me a few minutes to understand the purpose of this chicanery, but >> > there's indeed a contradiction in the ISA spec. HINT instructions

Re: [PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate

2022-12-17 Thread Andrew Waterman
On Sat, Dec 17, 2022 at 2:10 AM Andreas Schwab wrote: > > On Dez 17 2022, Andrew Waterman wrote: > > > It took me a few minutes to understand the purpose of this chicanery, but > > there's indeed a contradiction in the ISA spec. HINT instructions _do_ > > affect architectural state in a limited

Re: [PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate

2022-12-17 Thread Andreas Schwab
On Dez 17 2022, Andrew Waterman wrote: > It took me a few minutes to understand the purpose of this chicanery, but > there's indeed a contradiction in the ISA spec. HINT instructions _do_ > affect architectural state in a limited fashion--namely, updating the PC. How can an insn _not_ affect

Re: [PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate

2022-12-17 Thread Andrew Waterman
It took me a few minutes to understand the purpose of this chicanery, but there's indeed a contradiction in the ISA spec. HINT instructions _do_ affect architectural state in a limited fashion--namely, updating the PC. So, it's incorrect to say that PAUSE changes no architectural state. Because

Re: [PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate

2022-12-16 Thread Palmer Dabbelt
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

Re: [PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate

2022-11-28 Thread Palmer Dabbelt
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

Re: [PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate

2022-11-18 Thread Palmer Dabbelt
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

Re: [PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate

2022-11-17 Thread Kito Cheng via Gcc-patches
Wait, what's Xgnuzihintpausestate??? 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(-) > >

[PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate

2022-11-17 Thread Palmer Dabbelt
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 ---