public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-10035] RISC-V: Don't unconditionally add m, a, f, d in arch-canonicalize
@ 2022-05-26  6:50 Kito Cheng
  0 siblings, 0 replies; only message in thread
From: Kito Cheng @ 2022-05-26  6:50 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2826e74b307cc471d0dc5349cf967ee1b1328653

commit r11-10035-g2826e74b307cc471d0dc5349cf967ee1b1328653
Author: Simon Cook <simon.cook@embecosm.com>
Date:   Wed May 25 14:25:43 2022 +0100

    RISC-V: Don't unconditionally add m,a,f,d in arch-canonicalize
    
    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.
    
    (cherry picked from commit 63f198553d3940495bfaa49da30b2ce93375c916)

Diff:
---
 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 980b1d1dcba..0bdf6aafe35 100755
--- a/gcc/config/riscv/arch-canonicalize
+++ b/gcc/config/riscv/arch-canonicalize
@@ -48,8 +48,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:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-26  6:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26  6:50 [gcc r11-10035] RISC-V: Don't unconditionally add m, a, f, d in arch-canonicalize 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).