public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Don't unconditionally add m,a,f,d in arch-canonicalize
@ 2022-05-25 13:25 Simon Cook
  2022-05-25 14:00 ` [PATCH] RISC-V: Don't unconditionally add m, a, f, d " Kito Cheng
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Cook @ 2022-05-25 13:25 UTC (permalink / raw)
  To: gcc-patches; +Cc: kito.cheng

This solves an issue where rv32i, etc. are canonicalized to rv32imafd
since the g->i addition of 'm', 'a', 'f', 'd' is not actually gated by
whether the input was rv32g/rv64g.

gcc/ChangeLog:

	* config/riscv/arch-canonicalize: Only add mafd extension if
 	base was rv32/rv64g.
---
 gcc/config/riscv/arch-canonicalize | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/riscv/arch-canonicalize
b/gcc/config/riscv/arch-canonicalize
index 71b2232b29e..fd7651ac491 100755
--- a/gcc/config/riscv/arch-canonicalize
+++ b/gcc/config/riscv/arch-canonicalize
@@ -73,8 +73,8 @@ def arch_canonicalize(arch, isa_spec):
   std_exts = []
   if arch[:5] in ['rv32e', 'rv32i', 'rv32g', 'rv64i', 'rv64g']:
     new_arch = arch[:5].replace("g", "i")
-    std_exts = ['m', 'a', 'f', 'd']
     if arch[:5] in ['rv32g', 'rv64g']:
+      std_exts = ['m', 'a', 'f', 'd']
       if not is_isa_spec_2p2:
         extra_long_ext = ['zicsr', 'zifencei']
   else:
-- 
2.32.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-26  6:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25 13:25 [PATCH] RISC-V: Don't unconditionally add m,a,f,d in arch-canonicalize Simon Cook
2022-05-25 14:00 ` [PATCH] RISC-V: Don't unconditionally add m, a, f, d " Kito Cheng
2022-05-25 21:32   ` Palmer Dabbelt
2022-05-26  6:51     ` 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).