David Guillen Fandos <[email protected]> 于2025年9月20日周六 00:48写道: > > The MIPS Allegrex CPU is based on MIPS2 with some additional MIPS32r2 > instructions and a few novel ones. Support for this CPU was added as of > binutils 2.41. > > gcc/ChangeLog: > > * config/mips/mips-cpus.def (MIPS_CPU): Added a new CPU. > * config/mips/mips-tables.opt: Regenerated table. > * config/mips/mips.cc: Added cost table for the new CPU. > * config/mips/mips.h (TARGET_ALLEGREX): Defined a new macro. > (TUNE_ALLEGREX): Defined a new macro. > (ISA_HAS_CONDMOVE): Added Allegrex CPU to the list. > (ISA_HAS_LDC1_SDC1): Exclude Allegrex from the list. > (ISA_HAS_COND_TRAP): Exclude Allegrex from the list. > (ISA_HAS_COND_TRAPI): Exclude Allegrex from the list. > (ISA_HAS_CLZ_CLO): Added Allegrex CPU to the list. > (ISA_HAS_ROR): Added Allegrex CPU to the list. > (ISA_HAS_WSBH): Added Allegrex CPU to the list. > (ISA_HAS_SEB_SEH): Added Allegrex CPU to the list. > (ISA_HAS_EXT_INS): Added Allegrex CPU to the list. > (ISA_HAS_XFER_DELAY): Exclude Allegrex from the list. > (ISA_HAS_HILO_INTERLOCKS): Added Allegrex CPU to the list. > * config/mips/mips.md: Added Allegrex CPU as a new processor. > * doc/invoke.texi: Documented Allegrex as a new arch > > Signed-off-by: David Guillen Fandos <[email protected]> > --- > gcc/config/mips/mips-cpus.def | 1 + > gcc/config/mips/mips-tables.opt | 371 ++++++++++++++++---------------- > gcc/config/mips/mips.cc | 14 ++ > gcc/config/mips/mips.h | 21 +- > gcc/config/mips/mips.md | 3 + > gcc/doc/invoke.texi | 1 + > 6 files changed, 223 insertions(+), 188 deletions(-) > > diff --git a/gcc/config/mips/mips-cpus.def b/gcc/config/mips/mips-cpus.def > index dfc41162bf0..c45da84a77a 100644 > --- a/gcc/config/mips/mips-cpus.def > +++ b/gcc/config/mips/mips-cpus.def > @@ -62,6 +62,7 @@ MIPS_CPU ("r3900", PROCESSOR_R3900, MIPS_ISA_MIPS1, 0) > > /* MIPS II processors. */ > MIPS_CPU ("r6000", PROCESSOR_R6000, MIPS_ISA_MIPS2, 0) > +MIPS_CPU ("allegrex", PROCESSOR_ALLEGREX, MIPS_ISA_MIPS2, 0) > > /* MIPS III processors. */ > MIPS_CPU ("r4000", PROCESSOR_R4000, MIPS_ISA_MIPS3, 0) > diff --git a/gcc/config/mips/mips-tables.opt b/gcc/config/mips/mips-tables.opt > index 027abd74048..5fccd9888b7 100644 > --- a/gcc/config/mips/mips-tables.opt > +++ b/gcc/config/mips/mips-tables.opt > @@ -160,554 +160,557 @@ EnumValue > Enum(mips_arch_opt_value) String(6k) Value(17) > > EnumValue > -Enum(mips_arch_opt_value) String(r4000) Value(18) Canonical > +Enum(mips_arch_opt_value) String(allegrex) Value(18) Canonical >
I am sorry that I guess we have an agreement that to put Enum(mips_arch_opt_value) String(allegrex) to the end of the list. so that we can make the diff minimal.
