* [PATCH 0/1] RISC-V: Fix canonical extension order (K and J) @ 2022-04-24 5:24 Tsukasa OI 2022-04-24 5:24 ` [PATCH 1/1] " Tsukasa OI 2022-04-25 3:35 ` [PATCH 0/1] " Kito Cheng 0 siblings, 2 replies; 6+ messages in thread From: Tsukasa OI @ 2022-04-24 5:24 UTC (permalink / raw) To: Tsukasa OI, Palmer Dabbelt, Kito Cheng; +Cc: gcc-patches **note** My copyright assignment to FSF is not yet started (will start just after sending this patch). Please take care of the assignment status. This patch fixes RISC-V's canonical extension order... from: "J" -> "K" to : "K" -> "J" as per the RISC-V ISA Manual draft-20210402-1271737 or later. This bug in the GCC is currently harmless because neither J nor Zj* extensions are implemented. Intention of this commit is for future- proofness. This patch corresponds following patch for GNU Binutils: <https://sourceware.org/pipermail/binutils/2022-March/120277.html> [My copyright assignment is done on GNU Binutils] References: <https://github.com/riscv/riscv-isa-manual/commit/1271737463c04cacd98320d820a38f66d1c87dae> <https://github.com/riscv/riscv-isa-manual/releases/tag/draft-20210402-1271737> Tsukasa OI (1): RISC-V: Fix canonical extension order (K and J) gcc/common/config/riscv/riscv-common.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: ab54f6007c79711fc2192098d4ccc3c24e95f3e6 -- 2.32.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] RISC-V: Fix canonical extension order (K and J) 2022-04-24 5:24 [PATCH 0/1] RISC-V: Fix canonical extension order (K and J) Tsukasa OI @ 2022-04-24 5:24 ` Tsukasa OI 2022-04-24 5:36 ` Andrew Waterman 2022-04-25 3:35 ` [PATCH 0/1] " Kito Cheng 1 sibling, 1 reply; 6+ messages in thread From: Tsukasa OI @ 2022-04-24 5:24 UTC (permalink / raw) To: Tsukasa OI, Palmer Dabbelt, Kito Cheng; +Cc: gcc-patches This commit fixes canonical extension order to follow the RISC-V ISA Manual draft-20210402-1271737 or later. gcc/ChangeLog: * common/config/riscv/riscv-common.cc (riscv_supported_std_ext): Fix "K" extension prefix to be placed before "J". --- gcc/common/config/riscv/riscv-common.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc index 1501242e296..0b0ec2c4ec5 100644 --- a/gcc/common/config/riscv/riscv-common.cc +++ b/gcc/common/config/riscv/riscv-common.cc @@ -594,7 +594,7 @@ riscv_subset_list::lookup (const char *subset, int major_version, static const char * riscv_supported_std_ext (void) { - return "mafdqlcbjktpvn"; + return "mafdqlcbkjtpvn"; } /* Parsing subset version. -- 2.32.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] RISC-V: Fix canonical extension order (K and J) 2022-04-24 5:24 ` [PATCH 1/1] " Tsukasa OI @ 2022-04-24 5:36 ` Andrew Waterman 2022-04-24 6:09 ` Tsukasa OI 0 siblings, 1 reply; 6+ messages in thread From: Andrew Waterman @ 2022-04-24 5:36 UTC (permalink / raw) To: Tsukasa OI; +Cc: Palmer Dabbelt, Kito Cheng, GCC Patches Neither K nor J is an extension that exists, and so it doesn't make sense to mandate any particular ordering. The better change would be to delete the letters `k' and `j' from that string, so that we aren't enforcing constraints that don't serve a useful purpose. cf. https://github.com/riscv/riscv-isa-manual/commit/f5f9c27010b69a015958ffebe1ac5a34f8776dff On Sat, Apr 23, 2022 at 10:26 PM Tsukasa OI via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > This commit fixes canonical extension order to follow the RISC-V ISA > Manual draft-20210402-1271737 or later. > > gcc/ChangeLog: > > * common/config/riscv/riscv-common.cc (riscv_supported_std_ext): > Fix "K" extension prefix to be placed before "J". > --- > gcc/common/config/riscv/riscv-common.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc > index 1501242e296..0b0ec2c4ec5 100644 > --- a/gcc/common/config/riscv/riscv-common.cc > +++ b/gcc/common/config/riscv/riscv-common.cc > @@ -594,7 +594,7 @@ riscv_subset_list::lookup (const char *subset, int major_version, > static const char * > riscv_supported_std_ext (void) > { > - return "mafdqlcbjktpvn"; > + return "mafdqlcbkjtpvn"; > } > > /* Parsing subset version. > -- > 2.32.0 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] RISC-V: Fix canonical extension order (K and J) 2022-04-24 5:36 ` Andrew Waterman @ 2022-04-24 6:09 ` Tsukasa OI 2022-04-25 3:33 ` Kito Cheng 0 siblings, 1 reply; 6+ messages in thread From: Tsukasa OI @ 2022-04-24 6:09 UTC (permalink / raw) To: Andrew Waterman; +Cc: Palmer Dabbelt, Kito Cheng, GCC Patches Hello, > Neither K nor J is an extension that exists, That is correct. > and so it doesn't make > sense to mandate any particular ordering. No. It affects Z* extension ordering... On 2022/04/24 14:36, Andrew Waterman wrote: > Neither K nor J is an extension that exists, and so it doesn't make > sense to mandate any particular ordering. The better change would be > to delete the letters `k' and `j' from that string, so that we aren't > enforcing constraints that don't serve a useful purpose. > > cf. https://github.com/riscv/riscv-isa-manual/commit/f5f9c27010b69a015958ffebe1ac5a34f8776dff Wait... so, you make constraints for existing single-letters (Zi -> Zv) but not for non-existing single-letters? (Zk -> Zj, Zj -> Zk) anymore? That's completely unexpected move but also makes sense. Let me check your intentions and details: do we need to place Z[CH]* extensions without single-letter extension [CH] after all existing ones (like Zv*)? Or, Z[CH]* extensions without single-letter extension [CH] have no constraints as long as all Z* extensions are grouped together? > > On Sat, Apr 23, 2022 at 10:26 PM Tsukasa OI via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: >> >> This commit fixes canonical extension order to follow the RISC-V ISA >> Manual draft-20210402-1271737 or later. >> >> gcc/ChangeLog: >> >> * common/config/riscv/riscv-common.cc (riscv_supported_std_ext): >> Fix "K" extension prefix to be placed before "J". >> --- >> gcc/common/config/riscv/riscv-common.cc | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc >> index 1501242e296..0b0ec2c4ec5 100644 >> --- a/gcc/common/config/riscv/riscv-common.cc >> +++ b/gcc/common/config/riscv/riscv-common.cc >> @@ -594,7 +594,7 @@ riscv_subset_list::lookup (const char *subset, int major_version, >> static const char * >> riscv_supported_std_ext (void) >> { >> - return "mafdqlcbjktpvn"; >> + return "mafdqlcbkjtpvn"; >> } >> >> /* Parsing subset version. >> -- >> 2.32.0 >> > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] RISC-V: Fix canonical extension order (K and J) 2022-04-24 6:09 ` Tsukasa OI @ 2022-04-25 3:33 ` Kito Cheng 0 siblings, 0 replies; 6+ messages in thread From: Kito Cheng @ 2022-04-25 3:33 UTC (permalink / raw) To: Tsukasa OI; +Cc: Andrew Waterman, Palmer Dabbelt, GCC Patches > > and so it doesn't make > > sense to mandate any particular ordering. > > No. It affects Z* extension ordering... +1, we really need the order in ISA spec so that we could know the canonical order for z* exts. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/1] RISC-V: Fix canonical extension order (K and J) 2022-04-24 5:24 [PATCH 0/1] RISC-V: Fix canonical extension order (K and J) Tsukasa OI 2022-04-24 5:24 ` [PATCH 1/1] " Tsukasa OI @ 2022-04-25 3:35 ` Kito Cheng 1 sibling, 0 replies; 6+ messages in thread From: Kito Cheng @ 2022-04-25 3:35 UTC (permalink / raw) To: Tsukasa OI; +Cc: Palmer Dabbelt, GCC Patches Hi Tsukasa: LGTM, and did you mind adding Signed-off-by to your patch and resending again? I think this patch is small enough and the copyright process should not be a blocker for this patch :) See also: https://gcc.gnu.org/dco.html On Sun, Apr 24, 2022 at 1:25 PM Tsukasa OI <research_trasio@irq.a4lg.com> wrote: > > **note** > > My copyright assignment to FSF is not yet started (will start just after > sending this patch). Please take care of the assignment status. > > > > This patch fixes RISC-V's canonical extension order... > from: "J" -> "K" > to : "K" -> "J" > as per the RISC-V ISA Manual draft-20210402-1271737 or later. > > This bug in the GCC is currently harmless because neither J nor > Zj* extensions are implemented. Intention of this commit is for future- > proofness. > > This patch corresponds following patch for GNU Binutils: > <https://sourceware.org/pipermail/binutils/2022-March/120277.html> > [My copyright assignment is done on GNU Binutils] > > References: > <https://github.com/riscv/riscv-isa-manual/commit/1271737463c04cacd98320d820a38f66d1c87dae> > <https://github.com/riscv/riscv-isa-manual/releases/tag/draft-20210402-1271737> > > > > > Tsukasa OI (1): > RISC-V: Fix canonical extension order (K and J) > > gcc/common/config/riscv/riscv-common.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > > base-commit: ab54f6007c79711fc2192098d4ccc3c24e95f3e6 > -- > 2.32.0 > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-04-25 3:35 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-04-24 5:24 [PATCH 0/1] RISC-V: Fix canonical extension order (K and J) Tsukasa OI 2022-04-24 5:24 ` [PATCH 1/1] " Tsukasa OI 2022-04-24 5:36 ` Andrew Waterman 2022-04-24 6:09 ` Tsukasa OI 2022-04-25 3:33 ` Kito Cheng 2022-04-25 3:35 ` [PATCH 0/1] " Kito Cheng
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).