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