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 63f198553d)
This commit is contained in:
Simon Cook 2022-05-25 14:25:43 +01:00 committed by Kito Cheng
parent 02e8dea494
commit f1e47f34ab
1 changed files with 1 additions and 1 deletions

View File

@ -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: