RISC-V: Fix wrong expansion for arch-canonicalize
rv64gcv should exapnd into: rv64imafdcv_zicsr_zifencei_zve32f_zve32x_zve64d_zve64f_zve64x_zvl128b_zvl32b_zvl64b but we exapnd fd twice for now: rv64imafdfdcv_zicsr_zifencei_zve32f_zve32x_zve64d_zve64f_zve64x_zvl128b_zvl32b_zvl64b gcc/ChangeLog: * config/riscv/arch-canonicalize: Handle g correctly.
This commit is contained in:
parent
15f0099b21
commit
27239e13b1
1 changed files with 5 additions and 3 deletions
|
@ -70,8 +70,10 @@ def arch_canonicalize(arch, isa_spec):
|
|||
is_isa_spec_2p2 = isa_spec == '2.2'
|
||||
new_arch = ""
|
||||
extra_long_ext = []
|
||||
std_exts = []
|
||||
if arch[:5] in ['rv32e', 'rv32i', 'rv32g', 'rv64i', 'rv64g']:
|
||||
new_arch = arch[:5].replace("g", "imafd")
|
||||
new_arch = arch[:5].replace("g", "i")
|
||||
std_exts = ['m', 'a', 'f', 'd']
|
||||
if arch[:5] in ['rv32g', 'rv64g']:
|
||||
if not is_isa_spec_2p2:
|
||||
extra_long_ext = ['zicsr', 'zifencei']
|
||||
|
@ -86,10 +88,10 @@ def arch_canonicalize(arch, isa_spec):
|
|||
if long_ext_prefixes_idx:
|
||||
first_long_ext_idx = min(long_ext_prefixes_idx)
|
||||
long_exts = arch[first_long_ext_idx:].split("_")
|
||||
std_exts = list(arch[5:first_long_ext_idx])
|
||||
std_exts += list(arch[5:first_long_ext_idx])
|
||||
else:
|
||||
long_exts = []
|
||||
std_exts = list(arch[5:])
|
||||
std_exts += list(arch[5:])
|
||||
|
||||
long_exts += extra_long_ext
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue