]> git.ipfire.org Git - thirdparty/gcc.git/commit
MIPS: Add CACHE instruction for mips16e2
authorJie Mei <jie.mei@oss.cipunited.com>
Mon, 19 Jun 2023 08:29:57 +0000 (16:29 +0800)
committerYunQiang Su <yunqiang.su@cipunited.com>
Mon, 3 Jul 2023 03:38:20 +0000 (11:38 +0800)
commite3ee4289840f45d5e0219dea20d2fbb97a9b8894
treed17c9b4cd4a615e0603e157d02d6a30d75ef3727
parent773110dea48baed989f2b92bf2e1689cc2d87b60
MIPS: Add CACHE instruction for mips16e2

This patch adds CACHE instruction from mips16e2
with corresponding tests.

gcc/ChangeLog:

* config/mips/mips.cc(mips_9bit_offset_address_p): Restrict the
address register to M16_REGS for MIPS16.
(BUILTIN_AVAIL_MIPS16E2): Defined a new macro.
(AVAIL_MIPS16E2_OR_NON_MIPS16): Same as above.
(AVAIL_NON_MIPS16 (cache..)): Update to
AVAIL_MIPS16E2_OR_NON_MIPS16.
* config/mips/mips.h (ISA_HAS_CACHE): Add clause for ISA_HAS_MIPS16E2.
* config/mips/mips.md (mips_cache): Mark as extended MIPS16.

gcc/testsuite/ChangeLog:

* gcc.target/mips/mips16e2-cache.c: New tests for mips16e2.
gcc/config/mips/mips.cc
gcc/config/mips/mips.h
gcc/config/mips/mips.md
gcc/testsuite/gcc.target/mips/mips16e2-cache.c [new file with mode: 0644]