config.gcc (supported_defaults): Add madd4.
authorMatthew Fortune <matthew.fortune@imgtec.com>
Fri, 20 Jan 2017 01:05:25 +0000 (01:05 +0000)
committerCatherine Moore <clm@gcc.gnu.org>
Fri, 20 Jan 2017 01:05:25 +0000 (20:05 -0500)
commitd821744c630acda55c7a5ff59e6cfd184132be74
tree734146850a4cf5d319974acd8dbbc768bdf7d714
parent5b4ca3060a9cd95cb837542049e37400dad22b3b
config.gcc (supported_defaults): Add madd4.

gcc/
2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
    Yunqiang Su  <yunqiang.su@imgtec.com>

* config.gcc (supported_defaults): Add madd4.
(with_madd4): Add validation.
(all_defaults): Add madd4.
* config/mips/mips.opt (mmadd4): New option.
* gcc/config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
mmadd4.
(TARGET_CPU_CPP_BUILTINS): Add builtin_define for
__mips_no_madd4.
(ISA_HAS_UNFUSED_MADD4): Gate with mips_madd4.
(ISA_HAS_FUSED_MADD4): Likewise.
* gcc/doc/invoke.texi (-mmadd4): Document the new option.
* gcc/doc/install.texi (--with-madd4): Document the new option.

gcc/testsuite/
2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>

* gcc.target/mips/madd4-1.c: New file.
* gcc.target/mips/madd4-2.c: Likewise.
* gcc.target/mips/mips.exp (mips_option_groups): Add ghost option
HAS_MADD4.
(mips_option_groups): Add -m[no-]madd4.
(mips-dg-init): Detect default -mno-madd4.
(mips-dg-options): Handle HAS_MADD4 arch upgrade/downgrade.
* gcc.target/mips/mips-ps-type.c: Add -mmadd4 test option.
* gcc.target/mips/mips-ps-type-2.c: Likewise.
* gcc.target/mips/nmadd-1.c: Likewise.
* gcc.target/mips/nmadd-2.c: Likewise.
* gcc.target/mips/nmadd-3.c: Likewise.

Co-Authored-By: Yunqiang Su <yunqiang.su@imgtec.com>
From-SVN: r244676
15 files changed:
gcc/ChangeLog
gcc/config.gcc
gcc/config/mips/mips.h
gcc/config/mips/mips.opt
gcc/doc/install.texi
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/mips/madd4-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/madd4-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/mips/mips-ps-type-2.c
gcc/testsuite/gcc.target/mips/mips-ps-type.c
gcc/testsuite/gcc.target/mips/mips.exp
gcc/testsuite/gcc.target/mips/nmadd-1.c
gcc/testsuite/gcc.target/mips/nmadd-2.c
gcc/testsuite/gcc.target/mips/nmadd-3.c