diff options
author | Simon Cook <simon.cook@embecosm.com> | 2022-05-25 14:25:43 +0100 |
---|---|---|
committer | Kito Cheng <kito.cheng@sifive.com> | 2022-05-25 22:00:17 +0800 |
commit | 63f198553d3940495bfaa49da30b2ce93375c916 (patch) | |
tree | e241f665102218292bcda52aa4be02c820ea9b09 | |
parent | 2a790686fd11bc90032ff67c996c5a2752305625 (diff) | |
download | gcc-63f198553d3940495bfaa49da30b2ce93375c916.zip gcc-63f198553d3940495bfaa49da30b2ce93375c916.tar.gz gcc-63f198553d3940495bfaa49da30b2ce93375c916.tar.bz2 |
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.
-rwxr-xr-x | gcc/config/riscv/arch-canonicalize | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/riscv/arch-canonicalize b/gcc/config/riscv/arch-canonicalize index 71b2232..fd7651a 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: |