]> git.ipfire.org Git - thirdparty/gcc.git/commit
MIPS: Add conditions for use of the -mmips16e2 and -mips16 option.
authorJie Mei <jie.mei@oss.cipunited.com>
Fri, 17 Jan 2025 08:51:45 +0000 (16:51 +0800)
committerYunQiang Su <yunqiang@isrc.iscas.ac.cn>
Sat, 27 Sep 2025 07:27:49 +0000 (15:27 +0800)
commitf731fa580156d07f6347cb87931ce7b9cf2acbb4
tree3a5201c9da352b34959e36984b9dbf5d7d02ac67
parent25f7f04e447dc0d2ed4c392eb21765e9ae9067d1
MIPS: Add conditions for use of the -mmips16e2 and -mips16 option.

Changes from V1:
* Raise the minimal revision to r2.

MIPS16e2 ASE is a superset of MIPS16e ASE, which is again a superset
of MIPS16 ASE. Later, all of them are forbidden in Release 6.

Make -mmips16e2 imply -mips16 as the ASE requires, so users won't
be surprised even if they expect it to. Meanwhile, check if
mips_isa_rev <= 5 when -mips16 is effective and >= 2 when -mmips16e2
is effective.

Co-developed-by: Rong Zhang <rongrong@oss.cipunited.com>
Signed-off-by: Rong Zhang <rongrong@oss.cipunited.com>
gcc/ChangeLog:
* config/mips/mips.cc(mips_option_override):Add conditions
for use of the -mmips16e2 and -mips16 option.

gcc/testsuite/ChangeLog:
* gcc.target/mips/mips16e2-cache.c: Use isa_rev>=2 instead of
-mips32r2 and remove -mips16 option.
* gcc.target/mips/mips16e2-cmov.c: Add isa_rev>=2 and remove
-mips16 option.
* gcc.target/mips/mips16e2-gp.c: Same as above.
* gcc.target/mips/mips16e2.c: Same as above.
gcc/config/mips/mips.cc
gcc/testsuite/gcc.target/mips/mips16e2-cache.c
gcc/testsuite/gcc.target/mips/mips16e2-cmov.c
gcc/testsuite/gcc.target/mips/mips16e2-gp.c
gcc/testsuite/gcc.target/mips/mips16e2.c