Add support for the R6 LSA and DLSA instructions
authorMatthew Fortune <matthew.fortune@imgtec.com>
Thu, 15 Jan 2015 10:44:57 +0000 (10:44 +0000)
committerMatthew Fortune <mpf@gcc.gnu.org>
Thu, 15 Jan 2015 10:44:57 +0000 (10:44 +0000)
commit954bdd58817e70b138423906f6a4c9947dbd712a
treeeed15a79d06347bc2b53bfc3bde78a728e3c6f3f
parent953bcfa6c846d1bc6b010a8c28dbf854fade7a93
Add support for the R6 LSA and DLSA instructions

gcc/

* config/mips/mips.c (mips_rtx_costs): Set costs for LSA/DLSA.
(mips_print_operand): Support 'y' to print exact log2 in decimal
of a const_int.
* config/mips/mips.h (ISA_HAS_LSA): New define.
(ISA_HAS_DLSA): Likewise.
* config/mips/mips.md (<GPR:d>lsa): New define_insn.
* config/mips/predicates.md (const_immlsa_operand): New predicate.

gcc/testsuite/

* gcc.target/mips/lsa.c: New file.
* gcc.target/mips/mips64-lsa.c: Likewise.
* gcc.target/mips/mulsize-2.c: Require !HAS_LSA.
* gcc.target/mips/mulsize-4.c: Likewise.
* gcc.target/mips/mulsize-5.c: New file.
* gcc.target/mips/mulsize-6.c: Likewise.
* gcc.target/mips/mips.exp (mips_option_groups): Support HAS_LSA
and !HAS_LSA as ghost options.
(mips-dg-options): Require rev 6 for HAS_LSA. Downgrade to rev 5
for !HAS_LSA.

From-SVN: r219638
13 files changed:
gcc/ChangeLog
gcc/config/mips/mips.c
gcc/config/mips/mips.h
gcc/config/mips/mips.md
gcc/config/mips/predicates.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/mips/lsa.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/mips.exp
gcc/testsuite/gcc.target/mips/mips64-lsa.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/mulsize-2.c
gcc/testsuite/gcc.target/mips/mulsize-4.c
gcc/testsuite/gcc.target/mips/mulsize-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/mulsize-6.c [new file with mode: 0644]