LoongArch: Fix internal error running "gcc -march=native" on LA664
On LA664, the PRID preset is ISA_BASE_LA64V110 but the base architecture is guessed ISA_BASE_LA64V100. This causes a warning to be outputed: cc1: warning: base architecture 'la64' differs from PRID preset '?' But we've not set the "?" above in loongarch_isa_base_strings, thus it's a nullptr and then an ICE is triggered. Add ISA_BASE_LA64V110 to genopts and initialize loongarch_isa_base_strings[ISA_BASE_LA64V110] correctly to fix the ICE. The warning itself will be fixed later. gcc/ChangeLog: * config/loongarch/genopts/loongarch-strings: (STR_ISA_BASE_LA64V110): Add. * config/loongarch/genopts/loongarch.opt.in: (ISA_BASE_LA64V110): Add. * config/loongarch/loongarch-def.c (loongarch_isa_base_strings): Initialize [ISA_BASE_LA64V110] to STR_ISA_BASE_LA64V110. * config/loongarch/loongarch.opt: Regenerate. * config/loongarch/loongarch-str.h: Regenerate.
Showing
- gcc/config/loongarch/genopts/loongarch-strings 1 addition, 0 deletionsgcc/config/loongarch/genopts/loongarch-strings
- gcc/config/loongarch/genopts/loongarch.opt.in 3 additions, 0 deletionsgcc/config/loongarch/genopts/loongarch.opt.in
- gcc/config/loongarch/loongarch-def.c 1 addition, 0 deletionsgcc/config/loongarch/loongarch-def.c
- gcc/config/loongarch/loongarch-str.h 1 addition, 0 deletionsgcc/config/loongarch/loongarch-str.h
- gcc/config/loongarch/loongarch.opt 3 additions, 0 deletionsgcc/config/loongarch/loongarch.opt
Loading
Please register or sign in to comment