OSDN Git Service

gcc/testsuite/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 21 Dec 2008 21:47:38 +0000 (21:47 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 21 Dec 2008 21:47:38 +0000 (21:47 +0000)
* gcc.target/mips/mips.exp: Rewrite.

* gcc.target/mips/20020620-1.c: Use dg-options instead of
dg-mips-options.  Remove target restrictions from dg-do.
* gcc.target/mips/mips-ps-1.c: Likewise.
* gcc.target/mips/mips-ps-2.c: Likewise.
* gcc.target/mips/mips-ps-3.c: Likewise.
* gcc.target/mips/mips-ps-4.c: Likewise.
* gcc.target/mips/mips-ps-6.c: Likewise.

* gcc.target/mips/asm-1.c: Use dg-options instead of dg-mips-options.
* gcc.target/mips/branch-1.c: Likewise.
* gcc.target/mips/clear-cache-2.c: Likewise.
* gcc.target/mips/dse-1.c: Likewise.
* gcc.target/mips/fix-r4000-1.c: Likewise.
* gcc.target/mips/fix-r4000-2.c: Likewise.
* gcc.target/mips/fix-r4000-3.c: Likewise.
* gcc.target/mips/fix-r4000-4.c: Likewise.
* gcc.target/mips/fix-r4000-5.c: Likewise.
* gcc.target/mips/fix-r4000-6.c: Likewise.
* gcc.target/mips/fix-r4000-7.c: Likewise.
* gcc.target/mips/fix-r4000-8.c: Likewise.
* gcc.target/mips/fix-r4000-9.c: Likewise.
* gcc.target/mips/fix-r4000-10.c: Likewise.
* gcc.target/mips/fix-r4000-11.c: Likewise.
* gcc.target/mips/fix-r4000-12.c: Likewise.
* gcc.target/mips/fix-vr4130-1.c: Likewise.
* gcc.target/mips/fix-vr4130-2.c: Likewise.
* gcc.target/mips/fix-vr4130-3.c: Likewise.
* gcc.target/mips/fix-vr4130-4.c: Likewise.
* gcc.target/mips/fpcmp-1.c: Likewise.
* gcc.target/mips/fpcmp-2.c: Likewise.
* gcc.target/mips/fpr-moves-1.c: Likewise.
* gcc.target/mips/fpr-moves-2.c: Likewise.
* gcc.target/mips/fpr-moves-3.c: Likewise.
* gcc.target/mips/fpr-moves-4.c: Likewise.
* gcc.target/mips/fpr-moves-5.c: Likewise.
* gcc.target/mips/fpr-moves-6.c: Likewise.
* gcc.target/mips/gcc-have-sync-compare-and-swap-2.c: Likewise.
* gcc.target/mips/madd-1.c: Likewise.
* gcc.target/mips/madd-2.c: Likewise.
* gcc.target/mips/madd-5.c: Likewise.
* gcc.target/mips/madd-6.c: Likewise.
* gcc.target/mips/madd-7.c: Likewise.
* gcc.target/mips/madd-8.c: Likewise.
* gcc.target/mips/maddu-1.c: Likewise.
* gcc.target/mips/maddu-2.c: Likewise.
* gcc.target/mips/memcpy-1.c: Likewise.
* gcc.target/mips/mips-sched-madd.c: Likewise.
* gcc.target/mips/msub-1.c: Likewise.
* gcc.target/mips/msub-2.c: Likewise.
* gcc.target/mips/msub-5.c: Likewise.
* gcc.target/mips/msub-6.c: Likewise.
* gcc.target/mips/msub-7.c: Likewise.
* gcc.target/mips/msub-8.c: Likewise.
* gcc.target/mips/msubu-1.c: Likewise.
* gcc.target/mips/msubu-2.c: Likewise.
* gcc.target/mips/neg-abs-1.c: Likewise.
* gcc.target/mips/neg-abs-2.c: Likewise.
* gcc.target/mips/no-smartmips-lwxs.c: Likewise.
* gcc.target/mips/no-smartmips-ror-1.c: Likewise.
* gcc.target/mips/octeon-baddu-1.c: Likewise.
* gcc.target/mips/octeon-bbit-2.c: Likewise.
* gcc.target/mips/octeon-bbit-3.c: Likewise.
* gcc.target/mips/octeon-cins-1.c: Likewise.
* gcc.target/mips/octeon-cins-2.c: Likewise.
* gcc.target/mips/octeon-dmul-1.c: Likewise.
* gcc.target/mips/octeon-dmul-2.c: Likewise.
* gcc.target/mips/octeon-exts-1.c: Likewise.
* gcc.target/mips/octeon-exts-2.c: Likewise.
* gcc.target/mips/octeon-exts-3.c: Likewise.
* gcc.target/mips/octeon-exts-4.c: Likewise.
* gcc.target/mips/octeon-exts-5.c: Likewise.
* gcc.target/mips/octeon-pop-1.c: Likewise.
* gcc.target/mips/octeon-seq-1.c: Likewise.
* gcc.target/mips/octeon-seq-2.c: Likewise.
* gcc.target/mips/octeon-seq-3.c: Likewise.
* gcc.target/mips/octeon-seq-4.c: Likewise.
* gcc.target/mips/pr26765.c: Likewise.
* gcc.target/mips/pr33256.c: Likewise.
* gcc.target/mips/pr33635-1.c: Likewise.
* gcc.target/mips/pr33755.c: Likewise.
* gcc.target/mips/pr34831.c: Likewise.
* gcc.target/mips/pr35802.c: Likewise.
* gcc.target/mips/pr37362.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-1.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-2.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-3.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-4.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-5.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-6.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-7.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-8.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-9.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-10.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-11.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-12.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-13.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-15.c: Likewise.
* gcc.target/mips/r3900-mult.c: Likewise.
* gcc.target/mips/rsqrt-4.c: Likewise.
* gcc.target/mips/sb1-1.c: Likewise.
* gcc.target/mips/scc-2.c: Likewise.
* gcc.target/mips/scc-4.c: Likewise.
* gcc.target/mips/sdata-1.c: Likewise.
* gcc.target/mips/sdata-2.c: Likewise.
* gcc.target/mips/sdata-3.c: Likewise.
* gcc.target/mips/sdata-4.c: Likewise.
* gcc.target/mips/smartmips-lwxs.c: Likewise.
* gcc.target/mips/smartmips-ror-1.c: Likewise.
* gcc.target/mips/smartmips-ror-2.c: Likewise.
* gcc.target/mips/smartmips-ror-3.c: Likewise.
* gcc.target/mips/smartmips-ror-4.c: Likewise.
* gcc.target/mips/timode-1.c: Likewise.
* gcc.target/mips/truncate-1.c: Likewise.
* gcc.target/mips/truncate-2.c: Likewise.
* gcc.target/mips/vr-mult-1.c: Likewise.
* gcc.target/mips/vr-mult-2.c: Likewise.

* gcc.target/mips/atomic-memory-2.c: Use dg-options instead of
dg-mips-options.  Use isa>=2 instead of -mips32.

* gcc.target/mips/branch-cost-1.c: Use dg-options instead of
dg-mips-options.  Use isa>=4 instead of -mips64.
* gcc.target/mips/branch-cost-2.c: Likewise.

* gcc.target/mips/cache-1.c: Use dg-options instead of
dg-mips-options.  Add isa>=3 and NOMIPS16 attributes.

* gcc.target/mips/call-saved-1.c: Use dg-options instead of
dg-mips-options.  Replace the mips16_attribute directives with
a (-mips16) dg-option.  Use isa_rev=0 instead of -mips2.
* gcc.target/mips/call-saved-2.c: Likewise.
* gcc.target/mips/call-saved-3.c: Likewise.

* gcc.target/mips/clear-cache-1.c: Use dg-options instead of
dg-mips-options.  Use isa_rev>=2 instead of -mips32r2.
* gcc.target/mips/ext_ins.c: Likewise.

* gcc.target/mips/code-readable-1.c: Use dg-options instead of
dg-mips-options.  Replace the mips16_attribute directives with
a (-mips16) dg-option.  Use addressing=absolute too.
* gcc.target/mips/code-readable-2.c: Likewise.
* gcc.target/mips/code-readable-3.c: Likewise.

* gcc.target/mips/dmult-1.c: Use dg-options instead of
dg-mips-options.  Remove the mips16_attribute directives.
* gcc.target/mips/gcc-have-sync-compare-and-swap-4.c: Likewise.

* gcc.target/mips/dpaq_sa_l_w.c: Use dg-options instead of
dg-mips-options.  Remove target restrictions from dg-do.
Use -mgp32 instead of -mips32r2.
* gcc.target/mips/dpsq_sa_l_w.c: Likewise.

* gcc.target/mips/dsp-ctrl.c: Use dg-options instead of
dg-mips-options.  Remove target restrictions from dg-do.
Remove the !__mips_dsp code and add -mdsp -mgp32 to dg-options
instead.  Add NOMIPS16 attributes.

* gcc.target/mips/dspr2-MULT.c: Use dg-options instead of
dg-mips-options.  Replace -march=mips32r2 with -mgp32.
* gcc.target/mips/dspr2-MULTU.c: Likewise.

* gcc.target/mips/ext-1.c: Use dg-options instead of
dg-mips-options.  Use isa_rev>=2 instead of -mips64r2.

* gcc.target/mips/fix-r10000-1.c: Use dg-options instead of
dg-mips-options.  Remove -march=mips4.
* gcc.target/mips/fix-r10000-2.c: Likewise.
* gcc.target/mips/fix-r10000-3.c: Likewise.
* gcc.target/mips/fix-r10000-4.c: Likewise.
* gcc.target/mips/fix-r10000-5.c: Likewise.
* gcc.target/mips/fix-r10000-6.c: Likewise.
* gcc.target/mips/fix-r10000-7.c: Likewise.
* gcc.target/mips/fix-r10000-8.c: Likewise.
* gcc.target/mips/fix-r10000-9.c: Likewise.
* gcc.target/mips/fix-r10000-10.c: Likewise.
* gcc.target/mips/fix-r10000-11.c: Likewise.
* gcc.target/mips/fix-r10000-12.c: Likewise.
* gcc.target/mips/fix-r10000-13.c: Likewise.
* gcc.target/mips/fix-r10000-14.c: Likewise.
* gcc.target/mips/fix-r10000-15.c: Likewise.

* gcc.target/mips/fixed-scalar-type.c: Use dg-options instead
of dg-mips-options.  Remove target restrictions from dg-do.
Remove -march=mips32r2.
* gcc.target/mips/fixed-vector-type.c: Likewise.
* gcc.target/mips/mips32-dsp-run.c: Likewise.
* gcc.target/mips/mips32-dspr2.c: Likewise.  Add NOMIPS16 attributes.

* gcc.target/mips/fpr-moves-7.c: Use dg-options instead of
dg-mips-options.  Replace the mips16_attribute directives with
a (-mips16) dg-option.  Remove -msoft-float.
* gcc.target/mips/fpr-moves-8.c: Likewise.
* gcc.target/mips/int-moves-1.c: Likewise.
* gcc.target/mips/int-moves-2.c: Likewise.

* gcc.target/mips/gcc-have-sync-compare-and-swap-1.c: Use dg-options
instead of dg-mips-options.  Use isa>=2 instead of -mips2.
Add -mgp32.
* gcc.target/mips/gcc-have-sync-compare-and-swap-3.c: Likewise.

* gcc.target/mips/ins-1.c: Use dg-options instead of
dg-mips-options.  Use "isa_rev>=2 -mgp32" instead of -march=mips32r2.

* gcc.target/mips/loongson-muldiv-1.c: Use dg-options instead of
dg-mips-options.  Use isa=loongson instead of -march=loongson2e.
* gcc.target/mips/loongson-muldiv-2.c: Likewise.

* gcc.target/mips/loongson-simd.c: Remove mips_loongson
target requirement and use isa=loongson instead.  Add -mhard-float,
-mno-mips16 and -flax-vector-conversions.

* gcc.target/mips/lazy-binding-1.c: Use dg-options instead of
dg-mips-options.  Remove target restrictions from dg-do.
Add NOMIPS16 attributes.

* gcc.target/mips/long-calls-pg.c: Use dg-options instead of
dg-mips-options.  Remove -march=mips32 and -fno-pic.
Add NOMIPS16 attributes.

* gcc.target/mips/madd-3.c: Use dg-options instead of
dg-mips-options.  Use isa_rev>=1 instead of -mips32.
* gcc.target/mips/maddu-3.c: Likewise.
* gcc.target/mips/msub-3.c: Likewise.
* gcc.target/mips/msubu-3.c: Likewise.

* gcc.target/mips/madd-4.c: Use dg-options instead of
dg-mips-options.  Remove -mips32r2.
* gcc.target/mips/maddu-4.c: Likewise.
* gcc.target/mips/msub-4.c: Likewise.
* gcc.target/mips/msubu-4.c: Likewise.

* gcc.target/mips/mips-3d-1.c: Use dg-options instead of
dg-mips-options.  Remove target restrictions from dg-do.
Remove -mips64, -mhard-float and -mgp64.
* gcc.target/mips/mips-3d-2.c: Likewise.
* gcc.target/mips/mips-3d-3.c: Likewise.
* gcc.target/mips/mips-3d-4.c: Likewise.
* gcc.target/mips/mips-3d-5.c: Likewise.
* gcc.target/mips/mips-3d-6.c: Likewise.
* gcc.target/mips/mips-3d-7.c: Likewise.
* gcc.target/mips/mips-3d-8.c: Likewise.
* gcc.target/mips/mips-3d-9.c: Likewise.

* gcc.target/mips/mips-ps-5.c: Use dg-options instead of
dg-mips-options.  Remove -mips64.
* gcc.target/mips/mips-ps-type.c: Likewise.

* gcc.target/mips/mips-ps-7.c: Use dg-options instead of
dg-mips-options.  Replace -mips32r2 with -mgp32.

* gcc.target/mips/mips-ps-type-2.c: Use dg-options instead of
dg-mips-options.  Use "isa_rev>=2 -mgp32" instead of -mips32r2.

* gcc.target/mips/mips16-attributes.c: Use dg-options instead of
dg-mips-options.  Replace the mips16_attribute directives with
a (-mips16) dg-option.
* gcc.target/mips/mips16-attributes-2.c: Likewise.
* gcc.target/mips/r10k-cache-barrier-14.c: Likewise.
* gcc.target/mips/scc-3.c: Likewise.

* gcc.target/mips/mips16-attributes-3.c: Add { dg-options "(-mips16)" }.

* gcc.target/mips/mips16e-extends.c: Use dg-options instead of
dg-mips-options.  Replace the mips16_attribute directives with
a (-mips16) dg-option.  Use isa_rev>=1 instead of -march=mips32.
Add -mlong32.

* gcc.target/mips/mips32-dsp.c: Use dg-options instead of
dg-mips-options.  Replace -march=mips32 with -mgp32.

* gcc.target/mips/mips32-dsp-type.c: Use dg-options instead of
dg-mips-options.  Remove -march=mips32.

* gcc.target/mips/mips32-dspr2-type.c: Use dg-options instead of
dg-mips-options.  Remove -march=mips32r2.

* gcc.target/mips/mips32r2-mxhc1.c: Use dg-options instead of
dg-mips-options.  Add NOMIPS16 attributes.

* gcc.target/mips/movcc-1.c: Use dg-options instead of
dg-mips-options.  Use isa>=4 instead of -mips4.
* gcc.target/mips/movcc-2.c: Likewise.
* gcc.target/mips/movcc-3.c: Likewise.

* gcc.target/mips/octeon-bbit-1.c: Use dg-options instead of
dg-mips-options.  Declare foo as a NOMIPS16 function.
Use foo instead of g.

* gcc.target/mips/near-far-1.c: Use dg-options instead of
dg-mips-options.  Replace the nonpic directives with an
addressing=absolute option.
* gcc.target/mips/near-far-2.c: Likewise.
* gcc.target/mips/near-far-3.c: Likewise.
* gcc.target/mips/near-far-4.c: Likewise.

* gcc.target/mips/nmadd-1.c: Use dg-options instead of
dg-mips-options.  Use isa=4 instead of -mips4.
* gcc.target/mips/nmadd-2.c: Likewise.
* gcc.target/mips/nmadd-3.c: Likewise.
* gcc.target/mips/rsqrt-1.c: Likewise.
* gcc.target/mips/rsqrt-2.c: Likewise.
* gcc.target/mips/rsqrt-3.c: Likewise.

* gcc.target/mips/save-restore-1.c: Use dg-options instead of
dg-mips-options.  Replace the mips16_attribute directives with
a (-mips16) dg-option.  Use isa_rev>=1 instead of -mips32r2.
* gcc.target/mips/save-restore-2.c: Likewise.
* gcc.target/mips/save-restore-3.c: Likewise.
* gcc.target/mips/save-restore-4.c: Likewise.
* gcc.target/mips/save-restore-5.c: Likewise.

* gcc.target/mips/scc-1.c: Use dg-options instead of
dg-mips-options.  Replace the mips16_attribute directives with
a (-mips16) dg-option.  Use isa_rev>=1 instead of -mips32.

* gcc.target/mips/timode-2.c: Remove target restrictions from dg-do.
Use -mgp64.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142875 138bc75d-0d04-0410-961f-82ee72b054a4

219 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/mips/20020620-1.c
gcc/testsuite/gcc.target/mips/asm-1.c
gcc/testsuite/gcc.target/mips/atomic-memory-2.c
gcc/testsuite/gcc.target/mips/branch-1.c
gcc/testsuite/gcc.target/mips/branch-cost-1.c
gcc/testsuite/gcc.target/mips/branch-cost-2.c
gcc/testsuite/gcc.target/mips/cache-1.c
gcc/testsuite/gcc.target/mips/call-saved-1.c
gcc/testsuite/gcc.target/mips/call-saved-2.c
gcc/testsuite/gcc.target/mips/call-saved-3.c
gcc/testsuite/gcc.target/mips/clear-cache-1.c
gcc/testsuite/gcc.target/mips/clear-cache-2.c
gcc/testsuite/gcc.target/mips/code-readable-1.c
gcc/testsuite/gcc.target/mips/code-readable-2.c
gcc/testsuite/gcc.target/mips/code-readable-3.c
gcc/testsuite/gcc.target/mips/dmult-1.c
gcc/testsuite/gcc.target/mips/dpaq_sa_l_w.c
gcc/testsuite/gcc.target/mips/dpsq_sa_l_w.c
gcc/testsuite/gcc.target/mips/dse-1.c
gcc/testsuite/gcc.target/mips/dsp-ctrl.c
gcc/testsuite/gcc.target/mips/dspr2-MULT.c
gcc/testsuite/gcc.target/mips/dspr2-MULTU.c
gcc/testsuite/gcc.target/mips/ext-1.c
gcc/testsuite/gcc.target/mips/ext_ins.c
gcc/testsuite/gcc.target/mips/fix-r10000-1.c
gcc/testsuite/gcc.target/mips/fix-r10000-10.c
gcc/testsuite/gcc.target/mips/fix-r10000-11.c
gcc/testsuite/gcc.target/mips/fix-r10000-12.c
gcc/testsuite/gcc.target/mips/fix-r10000-13.c
gcc/testsuite/gcc.target/mips/fix-r10000-14.c
gcc/testsuite/gcc.target/mips/fix-r10000-15.c
gcc/testsuite/gcc.target/mips/fix-r10000-2.c
gcc/testsuite/gcc.target/mips/fix-r10000-3.c
gcc/testsuite/gcc.target/mips/fix-r10000-4.c
gcc/testsuite/gcc.target/mips/fix-r10000-5.c
gcc/testsuite/gcc.target/mips/fix-r10000-6.c
gcc/testsuite/gcc.target/mips/fix-r10000-7.c
gcc/testsuite/gcc.target/mips/fix-r10000-8.c
gcc/testsuite/gcc.target/mips/fix-r10000-9.c
gcc/testsuite/gcc.target/mips/fix-r4000-1.c
gcc/testsuite/gcc.target/mips/fix-r4000-10.c
gcc/testsuite/gcc.target/mips/fix-r4000-11.c
gcc/testsuite/gcc.target/mips/fix-r4000-12.c
gcc/testsuite/gcc.target/mips/fix-r4000-2.c
gcc/testsuite/gcc.target/mips/fix-r4000-3.c
gcc/testsuite/gcc.target/mips/fix-r4000-4.c
gcc/testsuite/gcc.target/mips/fix-r4000-5.c
gcc/testsuite/gcc.target/mips/fix-r4000-6.c
gcc/testsuite/gcc.target/mips/fix-r4000-7.c
gcc/testsuite/gcc.target/mips/fix-r4000-8.c
gcc/testsuite/gcc.target/mips/fix-r4000-9.c
gcc/testsuite/gcc.target/mips/fix-vr4130-1.c
gcc/testsuite/gcc.target/mips/fix-vr4130-2.c
gcc/testsuite/gcc.target/mips/fix-vr4130-3.c
gcc/testsuite/gcc.target/mips/fix-vr4130-4.c
gcc/testsuite/gcc.target/mips/fixed-scalar-type.c
gcc/testsuite/gcc.target/mips/fixed-vector-type.c
gcc/testsuite/gcc.target/mips/fpcmp-1.c
gcc/testsuite/gcc.target/mips/fpcmp-2.c
gcc/testsuite/gcc.target/mips/fpr-moves-1.c
gcc/testsuite/gcc.target/mips/fpr-moves-2.c
gcc/testsuite/gcc.target/mips/fpr-moves-3.c
gcc/testsuite/gcc.target/mips/fpr-moves-4.c
gcc/testsuite/gcc.target/mips/fpr-moves-5.c
gcc/testsuite/gcc.target/mips/fpr-moves-6.c
gcc/testsuite/gcc.target/mips/fpr-moves-7.c
gcc/testsuite/gcc.target/mips/fpr-moves-8.c
gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-1.c
gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-2.c
gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-3.c
gcc/testsuite/gcc.target/mips/gcc-have-sync-compare-and-swap-4.c
gcc/testsuite/gcc.target/mips/ins-1.c
gcc/testsuite/gcc.target/mips/int-moves-1.c
gcc/testsuite/gcc.target/mips/int-moves-2.c
gcc/testsuite/gcc.target/mips/lazy-binding-1.c
gcc/testsuite/gcc.target/mips/long-calls-pg.c
gcc/testsuite/gcc.target/mips/loongson-muldiv-1.c
gcc/testsuite/gcc.target/mips/loongson-muldiv-2.c
gcc/testsuite/gcc.target/mips/loongson-simd.c
gcc/testsuite/gcc.target/mips/madd-1.c
gcc/testsuite/gcc.target/mips/madd-2.c
gcc/testsuite/gcc.target/mips/madd-3.c
gcc/testsuite/gcc.target/mips/madd-4.c
gcc/testsuite/gcc.target/mips/madd-5.c
gcc/testsuite/gcc.target/mips/madd-6.c
gcc/testsuite/gcc.target/mips/madd-7.c
gcc/testsuite/gcc.target/mips/madd-8.c
gcc/testsuite/gcc.target/mips/maddu-1.c
gcc/testsuite/gcc.target/mips/maddu-2.c
gcc/testsuite/gcc.target/mips/maddu-3.c
gcc/testsuite/gcc.target/mips/maddu-4.c
gcc/testsuite/gcc.target/mips/memcpy-1.c
gcc/testsuite/gcc.target/mips/mips-3d-1.c
gcc/testsuite/gcc.target/mips/mips-3d-2.c
gcc/testsuite/gcc.target/mips/mips-3d-3.c
gcc/testsuite/gcc.target/mips/mips-3d-4.c
gcc/testsuite/gcc.target/mips/mips-3d-5.c
gcc/testsuite/gcc.target/mips/mips-3d-6.c
gcc/testsuite/gcc.target/mips/mips-3d-7.c
gcc/testsuite/gcc.target/mips/mips-3d-8.c
gcc/testsuite/gcc.target/mips/mips-3d-9.c
gcc/testsuite/gcc.target/mips/mips-ps-1.c
gcc/testsuite/gcc.target/mips/mips-ps-2.c
gcc/testsuite/gcc.target/mips/mips-ps-3.c
gcc/testsuite/gcc.target/mips/mips-ps-4.c
gcc/testsuite/gcc.target/mips/mips-ps-5.c
gcc/testsuite/gcc.target/mips/mips-ps-6.c
gcc/testsuite/gcc.target/mips/mips-ps-7.c
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-sched-madd.c
gcc/testsuite/gcc.target/mips/mips.exp
gcc/testsuite/gcc.target/mips/mips16-attributes-2.c
gcc/testsuite/gcc.target/mips/mips16-attributes-3.c
gcc/testsuite/gcc.target/mips/mips16-attributes.c
gcc/testsuite/gcc.target/mips/mips16e-extends.c
gcc/testsuite/gcc.target/mips/mips32-dsp-run.c
gcc/testsuite/gcc.target/mips/mips32-dsp-type.c
gcc/testsuite/gcc.target/mips/mips32-dsp.c
gcc/testsuite/gcc.target/mips/mips32-dspr2-type.c
gcc/testsuite/gcc.target/mips/mips32-dspr2.c
gcc/testsuite/gcc.target/mips/mips32r2-mxhc1.c
gcc/testsuite/gcc.target/mips/movcc-1.c
gcc/testsuite/gcc.target/mips/movcc-2.c
gcc/testsuite/gcc.target/mips/movcc-3.c
gcc/testsuite/gcc.target/mips/msub-1.c
gcc/testsuite/gcc.target/mips/msub-2.c
gcc/testsuite/gcc.target/mips/msub-3.c
gcc/testsuite/gcc.target/mips/msub-4.c
gcc/testsuite/gcc.target/mips/msub-5.c
gcc/testsuite/gcc.target/mips/msub-6.c
gcc/testsuite/gcc.target/mips/msub-7.c
gcc/testsuite/gcc.target/mips/msub-8.c
gcc/testsuite/gcc.target/mips/msubu-1.c
gcc/testsuite/gcc.target/mips/msubu-2.c
gcc/testsuite/gcc.target/mips/msubu-3.c
gcc/testsuite/gcc.target/mips/msubu-4.c
gcc/testsuite/gcc.target/mips/near-far-1.c
gcc/testsuite/gcc.target/mips/near-far-2.c
gcc/testsuite/gcc.target/mips/near-far-3.c
gcc/testsuite/gcc.target/mips/near-far-4.c
gcc/testsuite/gcc.target/mips/neg-abs-1.c
gcc/testsuite/gcc.target/mips/neg-abs-2.c
gcc/testsuite/gcc.target/mips/nmadd-1.c
gcc/testsuite/gcc.target/mips/nmadd-2.c
gcc/testsuite/gcc.target/mips/nmadd-3.c
gcc/testsuite/gcc.target/mips/no-smartmips-lwxs.c
gcc/testsuite/gcc.target/mips/no-smartmips-ror-1.c
gcc/testsuite/gcc.target/mips/octeon-baddu-1.c
gcc/testsuite/gcc.target/mips/octeon-bbit-1.c
gcc/testsuite/gcc.target/mips/octeon-bbit-2.c
gcc/testsuite/gcc.target/mips/octeon-bbit-3.c
gcc/testsuite/gcc.target/mips/octeon-cins-1.c
gcc/testsuite/gcc.target/mips/octeon-cins-2.c
gcc/testsuite/gcc.target/mips/octeon-dmul-1.c
gcc/testsuite/gcc.target/mips/octeon-dmul-2.c
gcc/testsuite/gcc.target/mips/octeon-exts-1.c
gcc/testsuite/gcc.target/mips/octeon-exts-2.c
gcc/testsuite/gcc.target/mips/octeon-exts-3.c
gcc/testsuite/gcc.target/mips/octeon-exts-4.c
gcc/testsuite/gcc.target/mips/octeon-exts-5.c
gcc/testsuite/gcc.target/mips/octeon-pop-1.c
gcc/testsuite/gcc.target/mips/octeon-seq-1.c
gcc/testsuite/gcc.target/mips/octeon-seq-2.c
gcc/testsuite/gcc.target/mips/octeon-seq-3.c
gcc/testsuite/gcc.target/mips/octeon-seq-4.c
gcc/testsuite/gcc.target/mips/pr26765.c
gcc/testsuite/gcc.target/mips/pr33256.c
gcc/testsuite/gcc.target/mips/pr33635-1.c
gcc/testsuite/gcc.target/mips/pr33755.c
gcc/testsuite/gcc.target/mips/pr34831.c
gcc/testsuite/gcc.target/mips/pr35802.c
gcc/testsuite/gcc.target/mips/pr37362.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-1.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-10.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-11.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-12.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-13.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-14.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-15.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-2.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-3.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-4.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-5.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-6.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-7.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-8.c
gcc/testsuite/gcc.target/mips/r10k-cache-barrier-9.c
gcc/testsuite/gcc.target/mips/r3900-mult.c
gcc/testsuite/gcc.target/mips/rsqrt-1.c
gcc/testsuite/gcc.target/mips/rsqrt-2.c
gcc/testsuite/gcc.target/mips/rsqrt-3.c
gcc/testsuite/gcc.target/mips/rsqrt-4.c
gcc/testsuite/gcc.target/mips/save-restore-1.c
gcc/testsuite/gcc.target/mips/save-restore-2.c
gcc/testsuite/gcc.target/mips/save-restore-3.c
gcc/testsuite/gcc.target/mips/save-restore-4.c
gcc/testsuite/gcc.target/mips/save-restore-5.c
gcc/testsuite/gcc.target/mips/sb1-1.c
gcc/testsuite/gcc.target/mips/scc-1.c
gcc/testsuite/gcc.target/mips/scc-2.c
gcc/testsuite/gcc.target/mips/scc-3.c
gcc/testsuite/gcc.target/mips/scc-4.c
gcc/testsuite/gcc.target/mips/sdata-1.c
gcc/testsuite/gcc.target/mips/sdata-2.c
gcc/testsuite/gcc.target/mips/sdata-3.c
gcc/testsuite/gcc.target/mips/sdata-4.c
gcc/testsuite/gcc.target/mips/smartmips-lwxs.c
gcc/testsuite/gcc.target/mips/smartmips-ror-1.c
gcc/testsuite/gcc.target/mips/smartmips-ror-2.c
gcc/testsuite/gcc.target/mips/smartmips-ror-3.c
gcc/testsuite/gcc.target/mips/smartmips-ror-4.c
gcc/testsuite/gcc.target/mips/timode-1.c
gcc/testsuite/gcc.target/mips/timode-2.c
gcc/testsuite/gcc.target/mips/truncate-1.c
gcc/testsuite/gcc.target/mips/truncate-2.c
gcc/testsuite/gcc.target/mips/vr-mult-1.c
gcc/testsuite/gcc.target/mips/vr-mult-2.c

index fef1417..f47f4d0 100644 (file)
@@ -1,5 +1,327 @@
 2008-12-21  Richard Sandiford  <rdsandiford@googlemail.com>
 
+       * gcc.target/mips/mips.exp: Rewrite.
+
+       * gcc.target/mips/20020620-1.c: Use dg-options instead of
+       dg-mips-options.  Remove target restrictions from dg-do.
+       * gcc.target/mips/mips-ps-1.c: Likewise.
+       * gcc.target/mips/mips-ps-2.c: Likewise.
+       * gcc.target/mips/mips-ps-3.c: Likewise.
+       * gcc.target/mips/mips-ps-4.c: Likewise.
+       * gcc.target/mips/mips-ps-6.c: Likewise.
+
+       * gcc.target/mips/asm-1.c: Use dg-options instead of dg-mips-options.
+       * gcc.target/mips/branch-1.c: Likewise.
+       * gcc.target/mips/clear-cache-2.c: Likewise.
+       * gcc.target/mips/dse-1.c: Likewise.
+       * gcc.target/mips/fix-r4000-1.c: Likewise.
+       * gcc.target/mips/fix-r4000-2.c: Likewise.
+       * gcc.target/mips/fix-r4000-3.c: Likewise.
+       * gcc.target/mips/fix-r4000-4.c: Likewise.
+       * gcc.target/mips/fix-r4000-5.c: Likewise.
+       * gcc.target/mips/fix-r4000-6.c: Likewise.
+       * gcc.target/mips/fix-r4000-7.c: Likewise.
+       * gcc.target/mips/fix-r4000-8.c: Likewise.
+       * gcc.target/mips/fix-r4000-9.c: Likewise.
+       * gcc.target/mips/fix-r4000-10.c: Likewise.
+       * gcc.target/mips/fix-r4000-11.c: Likewise.
+       * gcc.target/mips/fix-r4000-12.c: Likewise.
+       * gcc.target/mips/fix-vr4130-1.c: Likewise.
+       * gcc.target/mips/fix-vr4130-2.c: Likewise.
+       * gcc.target/mips/fix-vr4130-3.c: Likewise.
+       * gcc.target/mips/fix-vr4130-4.c: Likewise.
+       * gcc.target/mips/fpcmp-1.c: Likewise.
+       * gcc.target/mips/fpcmp-2.c: Likewise.
+       * gcc.target/mips/fpr-moves-1.c: Likewise.
+       * gcc.target/mips/fpr-moves-2.c: Likewise.
+       * gcc.target/mips/fpr-moves-3.c: Likewise.
+       * gcc.target/mips/fpr-moves-4.c: Likewise.
+       * gcc.target/mips/fpr-moves-5.c: Likewise.
+       * gcc.target/mips/fpr-moves-6.c: Likewise.
+       * gcc.target/mips/gcc-have-sync-compare-and-swap-2.c: Likewise.
+       * gcc.target/mips/madd-1.c: Likewise.
+       * gcc.target/mips/madd-2.c: Likewise.
+       * gcc.target/mips/madd-5.c: Likewise.
+       * gcc.target/mips/madd-6.c: Likewise.
+       * gcc.target/mips/madd-7.c: Likewise.
+       * gcc.target/mips/madd-8.c: Likewise.
+       * gcc.target/mips/maddu-1.c: Likewise.
+       * gcc.target/mips/maddu-2.c: Likewise.
+       * gcc.target/mips/memcpy-1.c: Likewise.
+       * gcc.target/mips/mips-sched-madd.c: Likewise.
+       * gcc.target/mips/msub-1.c: Likewise.
+       * gcc.target/mips/msub-2.c: Likewise.
+       * gcc.target/mips/msub-5.c: Likewise.
+       * gcc.target/mips/msub-6.c: Likewise.
+       * gcc.target/mips/msub-7.c: Likewise.
+       * gcc.target/mips/msub-8.c: Likewise.
+       * gcc.target/mips/msubu-1.c: Likewise.
+       * gcc.target/mips/msubu-2.c: Likewise.
+       * gcc.target/mips/neg-abs-1.c: Likewise.
+       * gcc.target/mips/neg-abs-2.c: Likewise.
+       * gcc.target/mips/no-smartmips-lwxs.c: Likewise.
+       * gcc.target/mips/no-smartmips-ror-1.c: Likewise.
+       * gcc.target/mips/octeon-baddu-1.c: Likewise.
+       * gcc.target/mips/octeon-bbit-2.c: Likewise.
+       * gcc.target/mips/octeon-bbit-3.c: Likewise.
+       * gcc.target/mips/octeon-cins-1.c: Likewise.
+       * gcc.target/mips/octeon-cins-2.c: Likewise.
+       * gcc.target/mips/octeon-dmul-1.c: Likewise.
+       * gcc.target/mips/octeon-dmul-2.c: Likewise.
+       * gcc.target/mips/octeon-exts-1.c: Likewise.
+       * gcc.target/mips/octeon-exts-2.c: Likewise.
+       * gcc.target/mips/octeon-exts-3.c: Likewise.
+       * gcc.target/mips/octeon-exts-4.c: Likewise.
+       * gcc.target/mips/octeon-exts-5.c: Likewise.
+       * gcc.target/mips/octeon-pop-1.c: Likewise.
+       * gcc.target/mips/octeon-seq-1.c: Likewise.
+       * gcc.target/mips/octeon-seq-2.c: Likewise.
+       * gcc.target/mips/octeon-seq-3.c: Likewise.
+       * gcc.target/mips/octeon-seq-4.c: Likewise.
+       * gcc.target/mips/pr26765.c: Likewise.
+       * gcc.target/mips/pr33256.c: Likewise.
+       * gcc.target/mips/pr33635-1.c: Likewise.
+       * gcc.target/mips/pr33755.c: Likewise.
+       * gcc.target/mips/pr34831.c: Likewise.
+       * gcc.target/mips/pr35802.c: Likewise.
+       * gcc.target/mips/pr37362.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-1.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-2.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-3.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-4.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-5.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-6.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-7.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-8.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-9.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-10.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-11.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-12.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-13.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-15.c: Likewise.
+       * gcc.target/mips/r3900-mult.c: Likewise.
+       * gcc.target/mips/rsqrt-4.c: Likewise.
+       * gcc.target/mips/sb1-1.c: Likewise.
+       * gcc.target/mips/scc-2.c: Likewise.
+       * gcc.target/mips/scc-4.c: Likewise.
+       * gcc.target/mips/sdata-1.c: Likewise.
+       * gcc.target/mips/sdata-2.c: Likewise.
+       * gcc.target/mips/sdata-3.c: Likewise.
+       * gcc.target/mips/sdata-4.c: Likewise.
+       * gcc.target/mips/smartmips-lwxs.c: Likewise.
+       * gcc.target/mips/smartmips-ror-1.c: Likewise.
+       * gcc.target/mips/smartmips-ror-2.c: Likewise.
+       * gcc.target/mips/smartmips-ror-3.c: Likewise.
+       * gcc.target/mips/smartmips-ror-4.c: Likewise.
+       * gcc.target/mips/timode-1.c: Likewise.
+       * gcc.target/mips/truncate-1.c: Likewise.
+       * gcc.target/mips/truncate-2.c: Likewise.
+       * gcc.target/mips/vr-mult-1.c: Likewise.
+       * gcc.target/mips/vr-mult-2.c: Likewise.
+
+       * gcc.target/mips/atomic-memory-2.c: Use dg-options instead of
+       dg-mips-options.  Use isa>=2 instead of -mips32.
+
+       * gcc.target/mips/branch-cost-1.c: Use dg-options instead of
+       dg-mips-options.  Use isa>=4 instead of -mips64.
+       * gcc.target/mips/branch-cost-2.c: Likewise.
+
+       * gcc.target/mips/cache-1.c: Use dg-options instead of
+       dg-mips-options.  Add isa>=3 and NOMIPS16 attributes.
+
+       * gcc.target/mips/call-saved-1.c: Use dg-options instead of
+       dg-mips-options.  Replace the mips16_attribute directives with
+       a (-mips16) dg-option.  Use isa_rev=0 instead of -mips2.
+       * gcc.target/mips/call-saved-2.c: Likewise.
+       * gcc.target/mips/call-saved-3.c: Likewise.
+
+       * gcc.target/mips/clear-cache-1.c: Use dg-options instead of
+       dg-mips-options.  Use isa_rev>=2 instead of -mips32r2.
+       * gcc.target/mips/ext_ins.c: Likewise.
+
+       * gcc.target/mips/code-readable-1.c: Use dg-options instead of
+       dg-mips-options.  Replace the mips16_attribute directives with
+       a (-mips16) dg-option.  Use addressing=absolute too.
+       * gcc.target/mips/code-readable-2.c: Likewise.
+       * gcc.target/mips/code-readable-3.c: Likewise.
+
+       * gcc.target/mips/dmult-1.c: Use dg-options instead of
+       dg-mips-options.  Remove the mips16_attribute directives.
+       * gcc.target/mips/gcc-have-sync-compare-and-swap-4.c: Likewise.
+
+       * gcc.target/mips/dpaq_sa_l_w.c: Use dg-options instead of
+       dg-mips-options.  Remove target restrictions from dg-do.
+       Use -mgp32 instead of -mips32r2.
+       * gcc.target/mips/dpsq_sa_l_w.c: Likewise.
+
+       * gcc.target/mips/dsp-ctrl.c: Use dg-options instead of
+       dg-mips-options.  Remove target restrictions from dg-do.
+       Remove the !__mips_dsp code and add -mdsp -mgp32 to dg-options
+       instead.  Add NOMIPS16 attributes.
+
+       * gcc.target/mips/dspr2-MULT.c: Use dg-options instead of
+       dg-mips-options.  Replace -march=mips32r2 with -mgp32.
+       * gcc.target/mips/dspr2-MULTU.c: Likewise.
+
+       * gcc.target/mips/ext-1.c: Use dg-options instead of
+       dg-mips-options.  Use isa_rev>=2 instead of -mips64r2.
+
+       * gcc.target/mips/fix-r10000-1.c: Use dg-options instead of
+       dg-mips-options.  Remove -march=mips4.  
+       * gcc.target/mips/fix-r10000-2.c: Likewise.
+       * gcc.target/mips/fix-r10000-3.c: Likewise.
+       * gcc.target/mips/fix-r10000-4.c: Likewise.
+       * gcc.target/mips/fix-r10000-5.c: Likewise.
+       * gcc.target/mips/fix-r10000-6.c: Likewise.
+       * gcc.target/mips/fix-r10000-7.c: Likewise.
+       * gcc.target/mips/fix-r10000-8.c: Likewise.
+       * gcc.target/mips/fix-r10000-9.c: Likewise.
+       * gcc.target/mips/fix-r10000-10.c: Likewise.
+       * gcc.target/mips/fix-r10000-11.c: Likewise.
+       * gcc.target/mips/fix-r10000-12.c: Likewise.
+       * gcc.target/mips/fix-r10000-13.c: Likewise.
+       * gcc.target/mips/fix-r10000-14.c: Likewise.
+       * gcc.target/mips/fix-r10000-15.c: Likewise.
+
+       * gcc.target/mips/fixed-scalar-type.c: Use dg-options instead
+       of dg-mips-options.  Remove target restrictions from dg-do.
+       Remove -march=mips32r2.
+       * gcc.target/mips/fixed-vector-type.c: Likewise.
+       * gcc.target/mips/mips32-dsp-run.c: Likewise.
+       * gcc.target/mips/mips32-dspr2.c: Likewise.  Add NOMIPS16 attributes.
+
+       * gcc.target/mips/fpr-moves-7.c: Use dg-options instead of
+       dg-mips-options.  Replace the mips16_attribute directives with
+       a (-mips16) dg-option.  Remove -msoft-float.
+       * gcc.target/mips/fpr-moves-8.c: Likewise.
+       * gcc.target/mips/int-moves-1.c: Likewise.
+       * gcc.target/mips/int-moves-2.c: Likewise.
+
+       * gcc.target/mips/gcc-have-sync-compare-and-swap-1.c: Use dg-options
+       instead of dg-mips-options.  Use isa>=2 instead of -mips2.
+       Add -mgp32.
+       * gcc.target/mips/gcc-have-sync-compare-and-swap-3.c: Likewise.
+
+       * gcc.target/mips/ins-1.c: Use dg-options instead of
+       dg-mips-options.  Use "isa_rev>=2 -mgp32" instead of -march=mips32r2.
+
+       * gcc.target/mips/loongson-muldiv-1.c: Use dg-options instead of
+       dg-mips-options.  Use isa=loongson instead of -march=loongson2e.
+       * gcc.target/mips/loongson-muldiv-2.c: Likewise.
+
+       * gcc.target/mips/loongson-simd.c: Remove mips_loongson
+       target requirement and use isa=loongson instead.  Add -mhard-float,
+       -mno-mips16 and -flax-vector-conversions.
+
+       * gcc.target/mips/lazy-binding-1.c: Use dg-options instead of
+       dg-mips-options.  Remove target restrictions from dg-do.
+       Add NOMIPS16 attributes.
+
+       * gcc.target/mips/long-calls-pg.c: Use dg-options instead of
+       dg-mips-options.  Remove -march=mips32 and -fno-pic.
+       Add NOMIPS16 attributes.
+
+       * gcc.target/mips/madd-3.c: Use dg-options instead of
+       dg-mips-options.  Use isa_rev>=1 instead of -mips32.
+       * gcc.target/mips/maddu-3.c: Likewise.
+       * gcc.target/mips/msub-3.c: Likewise.
+       * gcc.target/mips/msubu-3.c: Likewise.
+
+       * gcc.target/mips/madd-4.c: Use dg-options instead of
+       dg-mips-options.  Remove -mips32r2.
+       * gcc.target/mips/maddu-4.c: Likewise.
+       * gcc.target/mips/msub-4.c: Likewise.
+       * gcc.target/mips/msubu-4.c: Likewise.
+
+       * gcc.target/mips/mips-3d-1.c: Use dg-options instead of
+       dg-mips-options.  Remove target restrictions from dg-do.
+       Remove -mips64, -mhard-float and -mgp64.
+       * gcc.target/mips/mips-3d-2.c: Likewise.
+       * gcc.target/mips/mips-3d-3.c: Likewise.
+       * gcc.target/mips/mips-3d-4.c: Likewise.
+       * gcc.target/mips/mips-3d-5.c: Likewise.
+       * gcc.target/mips/mips-3d-6.c: Likewise.
+       * gcc.target/mips/mips-3d-7.c: Likewise.
+       * gcc.target/mips/mips-3d-8.c: Likewise.
+       * gcc.target/mips/mips-3d-9.c: Likewise.
+
+       * gcc.target/mips/mips-ps-5.c: Use dg-options instead of
+       dg-mips-options.  Remove -mips64.
+       * gcc.target/mips/mips-ps-type.c: Likewise.
+
+       * gcc.target/mips/mips-ps-7.c: Use dg-options instead of
+       dg-mips-options.  Replace -mips32r2 with -mgp32.
+
+       * gcc.target/mips/mips-ps-type-2.c: Use dg-options instead of
+       dg-mips-options.  Use "isa_rev>=2 -mgp32" instead of -mips32r2.
+
+       * gcc.target/mips/mips16-attributes.c: Use dg-options instead of
+       dg-mips-options.  Replace the mips16_attribute directives with
+       a (-mips16) dg-option.
+       * gcc.target/mips/mips16-attributes-2.c: Likewise.
+       * gcc.target/mips/r10k-cache-barrier-14.c: Likewise.
+       * gcc.target/mips/scc-3.c: Likewise.
+
+       * gcc.target/mips/mips16-attributes-3.c: Add { dg-options "(-mips16)" }.
+
+       * gcc.target/mips/mips16e-extends.c: Use dg-options instead of
+       dg-mips-options.  Replace the mips16_attribute directives with
+       a (-mips16) dg-option.  Use isa_rev>=1 instead of -march=mips32.
+       Add -mlong32.
+
+       * gcc.target/mips/mips32-dsp.c: Use dg-options instead of
+       dg-mips-options.  Replace -march=mips32 with -mgp32.
+
+       * gcc.target/mips/mips32-dsp-type.c: Use dg-options instead of
+       dg-mips-options.  Remove -march=mips32.
+
+       * gcc.target/mips/mips32-dspr2-type.c: Use dg-options instead of
+       dg-mips-options.  Remove -march=mips32r2.
+
+       * gcc.target/mips/mips32r2-mxhc1.c: Use dg-options instead of
+       dg-mips-options.  Add NOMIPS16 attributes.
+
+       * gcc.target/mips/movcc-1.c: Use dg-options instead of
+       dg-mips-options.  Use isa>=4 instead of -mips4.
+       * gcc.target/mips/movcc-2.c: Likewise.
+       * gcc.target/mips/movcc-3.c: Likewise.
+
+       * gcc.target/mips/octeon-bbit-1.c: Use dg-options instead of
+       dg-mips-options.  Declare foo as a NOMIPS16 function.
+       Use foo instead of g.
+
+       * gcc.target/mips/near-far-1.c: Use dg-options instead of
+       dg-mips-options.  Replace the nonpic directives with an
+       addressing=absolute option.
+       * gcc.target/mips/near-far-2.c: Likewise.
+       * gcc.target/mips/near-far-3.c: Likewise.
+       * gcc.target/mips/near-far-4.c: Likewise.
+
+       * gcc.target/mips/nmadd-1.c: Use dg-options instead of
+       dg-mips-options.  Use isa=4 instead of -mips4.
+       * gcc.target/mips/nmadd-2.c: Likewise.
+       * gcc.target/mips/nmadd-3.c: Likewise.
+       * gcc.target/mips/rsqrt-1.c: Likewise.
+       * gcc.target/mips/rsqrt-2.c: Likewise.
+       * gcc.target/mips/rsqrt-3.c: Likewise.
+
+       * gcc.target/mips/save-restore-1.c: Use dg-options instead of
+       dg-mips-options.  Replace the mips16_attribute directives with
+       a (-mips16) dg-option.  Use isa_rev>=1 instead of -mips32r2.
+       * gcc.target/mips/save-restore-2.c: Likewise.
+       * gcc.target/mips/save-restore-3.c: Likewise.
+       * gcc.target/mips/save-restore-4.c: Likewise.
+       * gcc.target/mips/save-restore-5.c: Likewise.
+
+       * gcc.target/mips/scc-1.c: Use dg-options instead of
+       dg-mips-options.  Replace the mips16_attribute directives with
+       a (-mips16) dg-option.  Use isa_rev>=1 instead of -mips32.
+
+       * gcc.target/mips/timode-2.c: Remove target restrictions from dg-do.
+       Use -mgp64.
+
+2008-12-21  Richard Sandiford  <rdsandiford@googlemail.com>
+
        PR target/35899
        * gcc.target/mips/smartmips-lwxs.c: Add -mlong32.
 
index f4828f4..1f2affe 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do compile { target mips64*-*-* mipsisa64*-*-* } } */
-/* { dg-mips-options "-O2 -mlong64" } */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong64" } */
 int foo (int *x, int i)
 {
   return x[i] + i;
index ab5d8f8..9f9cb3a 100644 (file)
@@ -1,7 +1,7 @@
 /* PR target/17565.  GCC used to put the asm into the delay slot
    of the call.  */
 /* { dg-do assemble } */
-/* { dg-mips-options "-O" } */
+/* { dg-options "-O" } */
 
 NOMIPS16 int foo (int n)
 {
index 34214e4..bc597ab 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips32 -mabi=32" } */
+/* { dg-options "-O2 isa>=2 -mabi=32" } */
 /* { dg-final { scan-assembler "addiu" } } */
 /* { dg-final { scan-assembler-not "subu" } } */
 
index 8c991dd..fb71536 100644 (file)
@@ -1,6 +1,6 @@
 /* We should implement these "if" statements using an "andi" instruction
    followed by a branch on zero.  */
-/* { dg-mips-options "-O2" } */
+/* { dg-options "-O2" } */
 
 void bar (void);
 NOMIPS16 void f1 (int x) { if (x & 4) bar (); }
index 8048f37..d825e06 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-mbranch-cost=1 -mips64 -O2" } */
+/* { dg-options "-mbranch-cost=1 isa>=4 -O2" } */
 NOMIPS16 int
 foo (int x, int y, int z, int k)
 {
index d4dc8fe..23f528a 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-mbranch-cost=10 -mips64 -O2" } */
+/* { dg-options "-mbranch-cost=10 isa>=4 -O2" } */
 NOMIPS16 int
 foo (int x, int y, int z, int k)
 {
index 40c22e0..05cb407 100644 (file)
@@ -1,24 +1,24 @@
-/* { dg-mips-options "-O2" } */
+/* { dg-options "-O2 isa>=3" } */
 
-void
+NOMIPS16 void
 f1 (int *area)
 {
   __builtin_mips_cache (20, area);
 }
 
-void
+NOMIPS16 void
 f2 (const short *area)
 {
   __builtin_mips_cache (24, area + 10);
 }
 
-void
+NOMIPS16 void
 f3 (volatile unsigned int *area, int offset)
 {
   __builtin_mips_cache (0, area + offset);
 }
 
-void
+NOMIPS16 void
 f4 (const volatile unsigned char *area)
 {
   __builtin_mips_cache (4, area - 80);
index 42d2dfb..5c86b6c 100644 (file)
@@ -1,8 +1,6 @@
 /* Check that we save all call-saved GPRs in a MIPS16 __builtin_eh_return
    function.  */
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mips2" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) isa_rev=0" } */
 
 void bar (void);
 
index 80ca92c..9ac7a27 100644 (file)
@@ -1,7 +1,5 @@
 /* Check that we save non-MIPS16 GPRs if they are explicitly clobbered.  */
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mips2 -O2" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) isa_rev=0 -O2" } */
 
 MIPS16 void
 foo (void)
index 5f71c85..e178eb0 100644 (file)
@@ -1,8 +1,6 @@
 /* Check that we save all call-saved GPRs in a MIPS16 __builtin_setjmp
    function.  */
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mips2 -O2" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) isa_rev=0 -O2" } */
 
 void bar (void);
 extern int buf[];
index d6e60c2..60bbf9d 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips32r2" } */
+/* { dg-options "-O2 isa_rev>=2" } */
 /* { dg-final { scan-assembler "synci" } } */
 /* { dg-final { scan-assembler "jr.hb" } } */
 /* { dg-final { scan-assembler-not "_flush_cache" } } */
index ee7c050..2c925b8 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips32" } */
+/* { dg-options "-O2 -mips32" } */
 /* { dg-final { scan-assembler-not "synci" } } */
 /* { dg-final { scan-assembler-not "jr.hb" } } */
 /* { dg-final { scan-assembler "_flush_cache" } } */
index 7a58457..ee239e1 100644 (file)
@@ -1,6 +1,4 @@
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mcode-readable=yes -mgp32" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) -mcode-readable=yes -mgp32 addressing=absolute" } */
 
 MIPS16 int
 foo (int i)
index 18a1218..1aeecaf 100644 (file)
@@ -1,6 +1,4 @@
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mcode-readable=pcrel -mgp32" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) -mcode-readable=pcrel -mgp32 addressing=absolute" } */
 
 MIPS16 int
 foo (int i)
index 5afa136..21dc82b 100644 (file)
@@ -1,6 +1,4 @@
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mcode-readable=no -mgp32" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) -mcode-readable=no -mgp32 addressing=absolute" } */
 
 MIPS16 int
 foo (int i)
index 561bdf4..61e66c2 100644 (file)
@@ -1,6 +1,4 @@
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mips64 -mgp64" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "-mips64 -mgp64" } */
 /* { dg-final { scan-assembler "\tdmult\t" } } */
 /* { dg-final { scan-assembler "\tmflo\t" } } */
 /* { dg-final { scan-assembler-not "\tdmul\t" } } */
index 1197fa9..d1812c1 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do compile { target {fixed_point} } } */
-/* { dg-mips-options "-O2 -mips32r2 -mdsp" } */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mgp32 -mdsp" } */
 /* { dg-final { scan-assembler-times "\tdpaq_sa.l.w\t\\\$ac" 3 } } */
 
 NOMIPS16 _Sat long long _Fract
index 42935bb..849bd92 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do compile { target {fixed_point} } } */
-/* { dg-mips-options "-O2 -mips32r2 -mdsp" } */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mgp32 -mdsp" } */
 /* { dg-final { scan-assembler-times "\tdpsq_sa.l.w\t\\\$ac" 2 } } */
 
 NOMIPS16 _Sat long long _Fract
index 30ceb73..6ef55cd 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-mgp64 -O" } */
+/* { dg-options "-mgp64 -O" } */
 
 #define TEST(ID, TYPE1, TYPE2)                                 \
   union u##ID {                                                        \
index 97e93bc..bb89e84 100644 (file)
@@ -1,31 +1,30 @@
-/* { dg-do run { target mips*-*-* } } */
-/* { dg-options "-O2" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mdsp -mgp32" } */
 
 extern void abort (void);
 extern void exit (int);
-#if __mips_dsp
 
-void __attribute__ ((noinline))
+NOMIPS16 void __attribute__ ((noinline))
 test1 (int i)
 {
   __builtin_mips_wrdsp (i, 63);
 }
 
-void __attribute__ ((noinline))
+NOMIPS16 void __attribute__ ((noinline))
 test2 ()
 {
   long long a = 0;
   __builtin_mips_extpdp (a, 3);
 }
 
-void __attribute__ ((noinline))
+NOMIPS16 void __attribute__ ((noinline))
 test3 (int i)
 {
   long long a = 0;
   __builtin_mips_extpdp (a, i);
 }
 
-void __attribute__ ((noinline))
+NOMIPS16 void __attribute__ ((noinline))
 test4 ()
 {
   long long a = 0;
@@ -33,7 +32,7 @@ test4 ()
   __builtin_mips_mthlip (a, i);
 }
 
-int
+NOMIPS16 int
 main ()
 {
   int cntl;
@@ -68,13 +67,3 @@ main ()
 
   exit (0);
 }
-
-#else
-
-int
-main ()
-{
-  exit (0); 
-}
-
-#endif
index 9aa95c6..ab2c28a 100644 (file)
@@ -1,6 +1,6 @@
 /* Test MIPS32 DSP REV 2 MULT instruction */
 /* { dg-do compile } */
-/* { dg-mips-options "-march=mips32r2 -mdspr2 -O2 -ffixed-hi -ffixed-lo" } */
+/* { dg-options "-mgp32 -mdspr2 -O2 -ffixed-hi -ffixed-lo" } */
 
 /* { dg-final { scan-assembler "\tmult\t" } } */
 /* { dg-final { scan-assembler "ac1" } } */
index ac8a7d8..312938a 100644 (file)
@@ -1,6 +1,6 @@
 /* Test MIPS32 DSP REV 2 MULTU instruction */
 /* { dg-do compile } */
-/* { dg-mips-options "-march=mips32r2 -mdspr2 -O2 -ffixed-hi -ffixed-lo" } */
+/* { dg-options "-mgp32 -mdspr2 -O2 -ffixed-hi -ffixed-lo" } */
 
 /* { dg-final { scan-assembler "\tmultu\t" } } */
 /* { dg-final { scan-assembler "ac1" } } */
index 2d9368a..426cbb2 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -mips64r2 -mgp64" } */
+/* { dg-options "-O isa_rev>=2 -mgp64" } */
 /* { dg-final { scan-assembler "\tdext\t" } } */
 /* { dg-final { scan-assembler-not "and" } } */
 
index 77df1d2..8186b84 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-march=mips32r2" } */
+/* { dg-options "isa_rev>=2" } */
 /* { dg-final { scan-assembler "ext" } } */
 /* { dg-final { scan-assembler "ins" } } */
 
index e72974b..76f3b86 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 NOMIPS16 int
index a6dbfa3..6ac908a 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 NOMIPS16 int
index 4bf16e1..e1677b6 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 NOMIPS16 int
index 160f9ae..f767ae2 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 /* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC 4.4" "" { target *-*-* } 0 } */
index 7e1efc8..b0779e0 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 NOMIPS16 int
index 8d8fe09..4a690f5 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 NOMIPS16 int
index fd7d036..bb5fd74 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 NOMIPS16 int
index 900a697..bac0191 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 NOMIPS16 int
index de74e97..bec7951 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 NOMIPS16 int
index 0c962ee..864ab8c 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 NOMIPS16 int
index 15a0704..62fd70f 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 NOMIPS16 int
index 1f81e5b..d8bdb45 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 /* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "" { target *-*-* } 0 } */
index bbe9856..d4b558e 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 NOMIPS16 int
index 6e990a6..d48ed26 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 NOMIPS16 int
index 8373c42..88afad3 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=mips4 -mfix-r10000" } */
+/* { dg-options "-O2 -mfix-r10000" } */
 /* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
 
 NOMIPS16 int
index adb32a2..513fc61 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-march=r4000 -mfix-r4000 -O2 -dp" } */
+/* { dg-options "-march=r4000 -mfix-r4000 -O2 -dp" } */
 typedef int int32_t;
 typedef int uint32_t;
 int32_t foo (int32_t x, int32_t y) { return x * y; }
index 3c217b9..ebf3ca3 100644 (file)
@@ -1,7 +1,7 @@
 /* ??? At the moment, lower-subreg.c decomposes the copy of the multiplication
    result to $2, which prevents the register allocators from storing the
    multiplication result in $2.  */
-/* { dg-mips-options "-mips3 -mfix-r4000 -mgp64 -O2 -fno-split-wide-types -dp -EL" } */
+/* { dg-options "-mips3 -mfix-r4000 -mgp64 -O2 -fno-split-wide-types -dp -EL" } */
 typedef unsigned long long uint64_t;
 typedef unsigned int uint128_t __attribute__((mode(TI)));
 uint128_t foo (uint64_t x, uint64_t y) { return (uint128_t) x * y; }
index 528a30b..93f7813 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-march=r4000 -mfix-r4000 -mgp64 -O2 -dp" } */
+/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -O2 -dp" } */
 typedef long long int64_t;
 int64_t foo (int64_t x) { return x / 11993; }
 /* { dg-final { scan-assembler "[concat {\tdmult\t\$4,\$[0-9]+[^\n]+smuldi3_highpart[^\n]+\n\tmfhi\t\$[0-9]+\n}]" } } */
index f03a7a0..554975c 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-march=r4000 -mfix-r4000 -mgp64 -O2 -dp" } */
+/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -O2 -dp" } */
 typedef unsigned long long uint64_t;
 uint64_t foo (uint64_t x) { return x / 11993; }
 /* { dg-final { scan-assembler "[concat {\tdmultu\t\$4,\$[0-9]+[^\n]+umuldi3_highpart[^\n]+\n\tmfhi\t\$[0-9]+\n}]" } } */
index 038dd5e..4f27041 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-mips1 -mfix-r4000 -O2 -dp -EB" } */
+/* { dg-options "-mips1 -mfix-r4000 -O2 -dp -EB" } */
 typedef int int32_t;
 typedef long long int64_t;
 int32_t foo (int32_t x, int32_t y) { return ((int64_t) x * y) >> 32; }
index 4318943..207fc66 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-mips1 -mfix-r4000 -O2 -dp -EB" } */
+/* { dg-options "-mips1 -mfix-r4000 -O2 -dp -EB" } */
 typedef unsigned int uint32_t;
 typedef unsigned long long uint64_t;
 uint32_t foo (uint32_t x, uint32_t y) { return ((uint64_t) x * y) >> 32; }
index 7acb237..be32b57 100644 (file)
@@ -1,7 +1,7 @@
 /* ??? At the moment, lower-subreg.c decomposes the copy of the multiplication
    result to $2, which prevents the register allocators from storing the
    multiplication result in $2.  */
-/* { dg-mips-options "-mips1 -mfix-r4000 -O2 -fno-split-wide-types -dp -EL" } */
+/* { dg-options "-mips1 -mfix-r4000 -O2 -fno-split-wide-types -dp -EL" } */
 typedef int int32_t;
 typedef long long int64_t;
 int64_t foo (int32_t x, int32_t y) { return (int64_t) x * y; }
index 86ab8a2..c14e949 100644 (file)
@@ -1,7 +1,7 @@
 /* ??? At the moment, lower-subreg.c decomposes the copy of the multiplication
    result to $2, which prevents the register allocators from storing the
    multiplication result in $2.  */
-/* { dg-mips-options "-mips1 -mfix-r4000 -O2 -fno-split-wide-types -dp -EL" } */
+/* { dg-options "-mips1 -mfix-r4000 -O2 -fno-split-wide-types -dp -EL" } */
 typedef unsigned int uint32_t;
 typedef unsigned long long uint64_t;
 uint64_t foo (uint32_t x, uint32_t y) { return (uint64_t) x * y; }
index 2c75ded..32861f9 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-march=r4000 -mfix-r4000 -mgp64 -O2 -dp" } */
+/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -O2 -dp" } */
 typedef long long int64_t;
 typedef unsigned long long uint64_t;
 int64_t foo (int64_t x, int64_t y) { return x * y; }
index e7b9251..2555d53 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-march=r4000 -mfix-r4000 -O2 -mgp64 -dp -EB" } */
+/* { dg-options "-march=r4000 -mfix-r4000 -O2 -mgp64 -dp -EB" } */
 typedef long long int64_t;
 typedef int int128_t __attribute__((mode(TI)));
 int64_t foo (int64_t x, int64_t y) { return ((int128_t) x * y) >> 64; }
index 5089b99..964dc22 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-march=r4000 -mfix-r4000 -O2 -mgp64 -dp -EB" } */
+/* { dg-options "-march=r4000 -mfix-r4000 -O2 -mgp64 -dp -EB" } */
 typedef unsigned long long uint64_t;
 typedef unsigned int uint128_t __attribute__((mode(TI)));
 uint64_t foo (uint64_t x, uint64_t y) { return ((uint128_t) x * y) >> 64; }
index 5518339..68724eb 100644 (file)
@@ -1,7 +1,7 @@
 /* ??? At the moment, lower-subreg.c decomposes the copy of the multiplication
    result to $2, which prevents the register allocators from storing the
    multiplication result in $2.  */
-/* { dg-mips-options "-mips3 -mfix-r4000 -mgp64 -O2 -fno-split-wide-types -dp -EL" } */
+/* { dg-options "-mips3 -mfix-r4000 -mgp64 -O2 -fno-split-wide-types -dp -EL" } */
 typedef long long int64_t;
 typedef int int128_t __attribute__((mode(TI)));
 int128_t foo (int64_t x, int64_t y) { return (int128_t) x * y; }
index 48840ac..f4eb492 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-march=vr4130 -mfix-vr4130" } */
+/* { dg-options "-march=vr4130 -mfix-vr4130" } */
 NOMIPS16 unsigned int
 foo (unsigned int x, unsigned int y)
 {
index aaeba4f..18708cb 100644 (file)
@@ -1,4 +1,4 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-march=vr4130 -mfix-vr4130" } */
+/* { dg-options "-march=vr4130 -mfix-vr4130" } */
 NOMIPS16 int foo (void) { int r; asm ("# foo" : "=l" (r)); return r; }
 /* { dg-final { scan-assembler "\tmacc\t" } } */
index 5cc32ca..d3399d1 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-march=vr4130 -mgp64 -mfix-vr4130" } */
+/* { dg-options "-march=vr4130 -mgp64 -mfix-vr4130" } */
 NOMIPS16 unsigned long long
 foo (unsigned long long x, unsigned long long y)
 {
index 91b883d..8b307c6 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-march=vr4130 -mgp64 -mfix-vr4130" } */
+/* { dg-options "-march=vr4130 -mgp64 -mfix-vr4130" } */
 NOMIPS16 long long
 foo (void)
 {
index ff4e975..a2e2fbf 100644 (file)
@@ -1,6 +1,6 @@
 /* Test scalar fixed-point instructions */
-/* { dg-do compile { target {fixed_point} } } */
-/* { dg-mips-options "-march=mips32r2 -mdspr2 -O2" } */
+/* { dg-do compile } */
+/* { dg-options "-mdspr2 -O2" } */
 /* { dg-final { scan-assembler-times "\taddu\t" 10 } } */
 /* { dg-final { scan-assembler-times "\tsubu\t" 10 } } */
 /* { dg-final { scan-assembler "\taddu_s.qb\t" } } */
index 08208f2..2fb16aa 100644 (file)
@@ -1,6 +1,6 @@
 /* Test vector fixed-point instructions */
-/* { dg-do compile { target {fixed_point} } } */
-/* { dg-mips-options "-march=mips32r2 -mdspr2 -O2" } */
+/* { dg-do compile } */
+/* { dg-options "-mdspr2 -O2" } */
 /* { dg-final { scan-assembler-times "\taddq_s.ph\t" 2 } } */
 /* { dg-final { scan-assembler-times "\tsubq_s.ph\t" 2 } } */
 /* { dg-final { scan-assembler-times "\taddu_s.qb\t" 1 } } */
index 19e66f9..cae48a0 100644 (file)
@@ -1,5 +1,5 @@
 /* We used to use c.lt.fmt instead of c.ule.fmt here.  */
-/* { dg-mips-options "-mhard-float -O2" } */
+/* { dg-options "-mhard-float -O2" } */
 NOMIPS16 int f1 (float x, float y) { return __builtin_isless (x, y); }
 NOMIPS16 int f2 (double x, double y) { return __builtin_isless (x, y); }
 /* { dg-final { scan-assembler "c\\.ule\\.s" } } */
index 9c1090b..3e1c259 100644 (file)
@@ -1,5 +1,5 @@
 /* We used to use c.le.fmt instead of c.ult.fmt here.  */
-/* { dg-mips-options "-mhard-float -O2" } */
+/* { dg-options "-mhard-float -O2" } */
 NOMIPS16 int f1 (float x, float y) { return __builtin_islessequal (x, y); }
 NOMIPS16 int f2 (double x, double y) { return __builtin_islessequal (x, y); }
 /* { dg-final { scan-assembler "c\\.ult\\.s" } } */
index db2190d..92977e0 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-mabi=32 -mhard-float -mips1 -O2 -EL" } */
+/* { dg-options "-mabi=32 -mhard-float -mips1 -O2 -EL" } */
 
 NOMIPS16 void
 foo (double d, double *x)
index fe21ee2..3f4f833 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-mabi=32 -mhard-float -mips1 -O2 -EB" } */
+/* { dg-options "-mabi=32 -mhard-float -mips1 -O2 -EB" } */
 
 NOMIPS16 void
 foo (double d, double *x)
index a32c687..34784d0 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-mabi=32 -mfp64 -O2 -EL" } */
+/* { dg-options "-mabi=32 -mfp64 -O2 -EL" } */
 
 NOMIPS16 double
 foo (double d)
index 4f26f06..282cf76 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-mabi=32 -mfp64 -O2 -EB" } */
+/* { dg-options "-mabi=32 -mfp64 -O2 -EB" } */
 
 NOMIPS16 double
 foo (double d)
index 7159d38..848e5ea 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-mabi=64 -mhard-float -O2 -EL" } */
+/* { dg-options "-mabi=64 -mhard-float -O2 -EL" } */
 
 NOMIPS16 void
 foo (long double d, long double *x)
index f1933fe..7f26113 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-mabi=64 -mhard-float -O2 -EB" } */
+/* { dg-options "-mabi=64 -mhard-float -O2 -EB" } */
 
 NOMIPS16 void
 foo (long double d, long double *x)
index 4736edd..3abd104 100644 (file)
@@ -1,6 +1,4 @@
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mabi=64 -msoft-float -O2 -EL" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) -mabi=64 -O2 -EL" } */
 
 extern long double g[16];
 extern unsigned char gstuff[0x10000];
index ade9e5e..8b6901b 100644 (file)
@@ -1,6 +1,4 @@
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mabi=64 -msoft-float -O2 -EB" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) -mabi=64 -O2 -EB" } */
 
 extern long double g[16];
 extern unsigned char gstuff[0x10000];
index c12d08e..74df7de 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do preprocess } */
-/* { dg-mips-options "-mips2" } */
+/* { dg-options "isa>=2 -mgp32" } */
 
 #ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
 #error nonono
index eaae780..3a03ba3 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do preprocess } */
-/* { dg-mips-options "-mgp64" } */
+/* { dg-options "-mgp64" } */
 
 #ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
 #error nonono
index faf50fc..b47a2ce 100644 (file)
@@ -1,6 +1,4 @@
-/* { dg-do preprocess { target mips16_attribute } } */
-/* { dg-mips-options "-mips2 -mips16" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "isa>=2 -mgp32 -mips16" } */
 
 #ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
 #error nonono
index b53f4b0..78a1244 100644 (file)
@@ -1,6 +1,4 @@
-/* { dg-do preprocess { target mips16_attribute } } */
-/* { dg-mips-options "-mgp64 -mips16" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "-mgp64 -mips16" } */
 
 #ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
 #error nonono
index 77047af..9e19354 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -march=mips32r2" } */
+/* { dg-options "-O isa_rev>=2 -mgp32" } */
 /* { dg-final { scan-assembler "\tins\t" } } */
 
 struct
index 62e659a..485555c 100644 (file)
@@ -1,6 +1,4 @@
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mgp64 -msoft-float -O2 -EL" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) -mgp64 -O2 -EL" } */
 
 typedef unsigned uint128_t __attribute__((mode(TI)));
 
index 325bfce..eba7983 100644 (file)
@@ -1,6 +1,4 @@
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mgp64 -msoft-float -O2 -EB" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) -mgp64 -O2 -EB" } */
 
 typedef unsigned uint128_t __attribute__((mode(TI)));
 
index 761be46..e85727c 100644 (file)
@@ -1,9 +1,9 @@
-/* { dg-do compile { target nomips16 } } */
-/* { dg-mips-options "-mabicalls -mshared -mexplicit-relocs -O2 -fno-delayed-branch" } */
+/* { dg-do compile } */
+/* { dg-options "-mabicalls -mshared -mexplicit-relocs -O2 -fno-delayed-branch" } */
 
 void bar (void);
 
-void
+NOMIPS16 void
 foo (int n)
 {
   while (n--)
index 7d2d5f1..5e554c4 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mabi=32 -march=mips32 -fno-pic -pg -mno-abicalls -mlong-calls" } */
+/* { dg-options "-O2 -mabi=32 -pg -mno-abicalls -mlong-calls" } */
 /* { dg-final { scan-assembler-not "\tjal\t_mcount" } } */
-void
+NOMIPS16 void
 foo (void)
 {
 }
index d8293b2..fd7289c 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -march=loongson2e" } */
+/* { dg-options "-O2 isa=loongson" } */
 
 typedef int st;
 typedef unsigned int ut;
index 4953292..6f1f138 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -march=loongson2e -mgp64" } */
+/* { dg-options "-O2 isa=loongson -mgp64" } */
 
 typedef long long st;
 typedef unsigned long long ut;
index e4cae5e..ae3565f 100644 (file)
@@ -19,7 +19,10 @@ along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
 /* { dg-do run } */
-/* { dg-require-effective-target mips_loongson } */
+/* loongson.h does not handle or check for MIPS16ness.  There doesn't
+   seem any good reason for it to, given that the Loongson processors
+   do not support MIPS16.  */
+/* { dg-options "isa=loongson -mhard-float -mno-mips16 -flax-vector-conversions" } */
 
 #include "loongson.h"
 #include <stdio.h>
index c0cdf49..53881a4 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=vr4130 -mgp32" } */
+/* { dg-options "-O2 -march=vr4130 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmacc\t\\\$1," 3 } } */
 
 NOMIPS16 long long
index daadd41..eab7a68 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=vr5500 -mgp32" } */
+/* { dg-options "-O2 -march=vr5500 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmadd\t" 3 } } */
 
 NOMIPS16 long long
index 8526a5e..6b479f5 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips32 -mgp32" } */
+/* { dg-options "-O2 isa_rev>=1 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmadd\t" 3 } } */
 
 NOMIPS16 long long
index 8bdf99f..f325af7 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips32r2 -mdspr2 -mgp32" } */
+/* { dg-options "-O2 -mdspr2 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmadd\t\\\$ac" 3 } } */
 
 NOMIPS16 long long
index 780194d..1ad1c91 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -march=5kc" } */
+/* { dg-options "-O2 -march=5kc" } */
 /* { dg-final { scan-assembler-times "\tmadd\t" 4 } } */
 /* { dg-final { scan-assembler-not "\tmtlo\t" } } */
 /* { dg-final { scan-assembler-times "\tmflo\t" 3 } } */
index bbb6783..4e5afad 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -march=5kc" } */
+/* { dg-options "-O2 -march=5kc" } */
 /* { dg-final { scan-assembler-not "\tmadd\t" } } */
 /* { dg-final { scan-assembler "\tmul\t" } } */
 /* { dg-final { scan-assembler "\taddu\t" } } */
index bcda15c..93ed0fc 100644 (file)
@@ -1,5 +1,5 @@
 /* -mlong32 added because of PR target/38598.  */
-/* { dg-mips-options "-O2 -march=5kc -mlong32" } */
+/* { dg-options "-O2 -march=5kc -mlong32" } */
 /* { dg-final { scan-assembler-not "\tmul\t" } } */
 /* { dg-final { scan-assembler "\tmadd\t" } } */
 
index 0fc680e..35092a8 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -march=5kc" } */
+/* { dg-options "-O2 -march=5kc" } */
 /* { dg-final { scan-assembler "\tmul\t" } } */
 /* { dg-final { scan-assembler-not "\tmadd\t" } } */
 /* { dg-final { scan-assembler-not "\tmtlo\t" } } */
index 254f3e7..04161ce 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=vr4130 -mgp32" } */
+/* { dg-options "-O2 -march=vr4130 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmaccu\t\\\$1," 3 } } */
 
 typedef unsigned int ui;
index fc1574e..a9768f1 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=vr5500 -mgp32" } */
+/* { dg-options "-O2 -march=vr5500 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmaddu\t" 3 } } */
 
 typedef unsigned int ui;
index b3cc510..b0b4817 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips32 -mgp32" } */
+/* { dg-options "-O2 isa_rev>=1 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmaddu\t" 3 } } */
 
 typedef unsigned int ui;
index 2bc54f8..9c1ccd5 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips32r2 -mdspr2 -mgp32" } */
+/* { dg-options "-O2 -mdspr2 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmaddu\t\\\$ac" 3 } } */
 
 typedef unsigned int ui;
index 4e50b20..f3eda75 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2" } */
+/* { dg-options "-O2" } */
 /* { dg-final { scan-assembler-not "\tlbu\t" } } */
 
 #include <string.h>
index 393ebfc..eb3f8f9 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do run { target mipsisa64*-*-* } } */
-/* { dg-mips-options "-mips64 -O2 -mips3d -mhard-float -mgp64" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mips3d" } */
 
 /* Test MIPS-3D builtin functions */
 #include <stdlib.h>
index 3c8850b..dc81574 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do run { target mipsisa64*-*-* } } */
-/* { dg-mips-options "-mips64 -O2 -mips3d -mhard-float -mgp64" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mips3d" } */
 
 /* Test MIPS-3D branch-if-any-two builtin functions */
 #include <stdlib.h>
index 909a89a..7df590f 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do run { target mipsisa64*-*-* } } */
-/* { dg-mips-options "-mips64 -O2 -mips3d -mhard-float -mgp64" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mips3d" } */
 
 /* Test MIPS-3D absolute compare builtin functions */
 #include <stdlib.h>
index 058ff2c..7f9cbdb 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do run { target mipsisa64*-*-* } } */
-/* { dg-mips-options "-mips64 -O2 -mips3d -mhard-float -mgp64" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mips3d" } */
 
 /* Test MIPS-3D branch-if-any-four builtin functions */
 #include <stdlib.h>
index a98e579..c07dbe5 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do run { target mipsisa64*-*-* } } */
-/* { dg-mips-options "-mips64 -O2 -mips3d -mhard-float -mgp64" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mips3d" } */
 
 /* Test MIPS-3D absolute-compare & branch-if-any-four builtin functions */
 #include <stdlib.h>
index 30715ea..8484145 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do run { target mipsisa64*-*-* } } */
-/* { dg-mips-options "-mips64 -O2 -mips3d -mhard-float -mgp64" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mips3d" } */
 
 /* Test MIPS-3D absolute compare (floats) builtin functions */
 #include <stdlib.h>
index 0eef933..d5d09f9 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do run { target mipsisa64*-*-* } } */
-/* { dg-mips-options "-mips64 -O2 -mips3d -mhard-float -mgp64" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mips3d" } */
 
 /* Test MIPS-3D absolute compare (doubles) builtin functions */
 #include <stdlib.h>
index 042a730..c80f2b9 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do run { target mipsisa64*-*-* } } */
-/* { dg-mips-options "-mips64 -O2 -mips3d -mhard-float -mgp64" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mips3d" } */
 
 /* Test MIPS-3D absolute compare and conditional move builtin functions */
 #include <stdlib.h>
index fdfedcb..3875391 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do run { target mipsisa64*-*-* } } */
-/* { dg-mips-options "-mips64 -O2 -mips3d -mhard-float -mgp64" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mips3d" } */
 
 /* Matrix Multiplications */
 #include <stdlib.h>
index c47b57d..9e6c660 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do run { target mpaired_single } } */
-/* { dg-mips-options "-O2 -mpaired-single" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mpaired-single" } */
 
 /* Test v2sf calculations */
 #include <stdlib.h>
index d7b33b1..baec12c 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do run { target mpaired_single } } */
-/* { dg-mips-options "-O2 -mpaired-single" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mpaired-single" } */
 
 /* Test MIPS paired-single builtin functions */
 #include <stdlib.h>
index a7c9545..e9ed4c0 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do run { target mpaired_single } } */
-/* { dg-mips-options "-O2 -mpaired-single" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mpaired-single" } */
 
 /* Test MIPS paired-single conditional move */
 #include <stdlib.h>
index 54efb80..b4452d0 100644 (file)
@@ -1,5 +1,5 @@
-/* { dg-do run { target mpaired_single } } */
-/* { dg-mips-options "-O2 -mpaired-single" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mpaired-single" } */
 
 /* Test MIPS paired-single comparisons */
 #include <stdlib.h>
index 9b74888..94d2f80 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-mips64 -O2 -mpaired-single -mgp64 -ftree-vectorize" } */
+/* { dg-options "-O2 -mpaired-single -mgp64 -ftree-vectorize" } */
 
 extern float a[], b[], c[];
 
index fc198dc..5b8b252 100644 (file)
@@ -1,7 +1,7 @@
 /* mips-ps-2.c with an extra -ffinite-math-only option.  This option
    changes the way that abs.ps is handled.  */
-/* { dg-do run { target mpaired_single } } */
-/* { dg-mips-options "-O2 -mpaired-single -ffinite-math-only" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -mpaired-single -ffinite-math-only" } */
 
 /* Test MIPS paired-single builtin functions */
 #include <stdlib.h>
index cfec230..65a1104 100644 (file)
@@ -1,6 +1,6 @@
-/* mips-ps-5.c with -mips32r2 instead of -mips64.  */
+/* mips-ps-5.c with -mgp32 instead of -mgp64.  */
 /* { dg-do compile } */
-/* { dg-mips-options "-mips32r2 -O2 -mpaired-single -ftree-vectorize" } */
+/* { dg-options "-mgp32 -O2 -mpaired-single -ftree-vectorize" } */
 
 extern float a[], b[], c[];
 
index 07ce774..f798855 100644 (file)
@@ -1,7 +1,7 @@
 /* Test v2sf calculations.  The nmadd and nmsub patterns need
    -ffinite-math-only.  */
 /* { dg-do compile } */
-/* { dg-mips-options "-mips32r2 -O2 -mpaired-single -ffinite-math-only" } */
+/* { dg-options "isa_rev>=2 -mgp32 -O2 -mpaired-single -ffinite-math-only" } */
 /* { dg-final { scan-assembler "cvt.ps.s" } } */
 /* { dg-final { scan-assembler "mov.ps" } } */
 /* { dg-final { scan-assembler "ldc1" } } */
index df1cec7..2a10f91 100644 (file)
@@ -1,7 +1,7 @@
 /* Test v2sf calculations.  The nmadd and nmsub patterns need
    -ffinite-math-only.  */
 /* { dg-do compile } */ 
-/* { dg-mips-options "-mips64 -O2 -mpaired-single -mgp64 -ffinite-math-only" } */
+/* { dg-options "-O2 -mpaired-single -mgp64 -ffinite-math-only" } */
 /* { dg-final { scan-assembler "cvt.ps.s" } } */ 
 /* { dg-final { scan-assembler "mov.ps" } } */ 
 /* { dg-final { scan-assembler "ldc1" } } */ 
index 92f14e1..c0f9d33 100644 (file)
@@ -1,7 +1,7 @@
 /* Test for case where another independent multiply insn may interfere
    with a macc chain.  */
 /* { dg-do compile } */
-/* { dg-mips-options "-Os -march=24kf" } */
+/* { dg-options "-Os -march=24kf" } */
 
 NOMIPS16 int foo (int a, int b, int c, int d, int e, int f, int g)
 {
index 8e66e0a..e1496d9 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright (C) 1997, 2007 Free Software Foundation, Inc.
+#   Copyright (C) 1997, 2007, 2008 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
-# GCC testsuite that uses the `dg.exp' driver.
+# A MIPS version of the GCC dg.exp driver.
+#
+# There are many MIPS features that we want to test, and many of those
+# features are specific to certain architectures, certain ABIs and so on.
+# There are therefore many cases in which we want to test something that
+# is incompatible with the user's chosen test options.
+#
+# In most dg testsuites, the options added by dg-options have a lower
+# priority than the options chosen by the user.  For example, if a test
+# specifies:
+#
+#    { dg-options "-mips1" }
+#
+# and the user passes the following option to runtest:
+#
+#    --target_board unix/-mips3
+#
+# the test would be compiled as MIPS III rather than MIPS I.  If the
+# test really wouldn't work with -mips3, normal practice would be to
+# have something like:
+#
+#    { dg-do compile { target can_force_mips1 } }
+#
+# so that the test is skipped when an option like -mips3 is passed.
+#
+# Sticking to the same approach here would cause us to skip many tests,
+# even though the toolchain can generate the required code.  For example,
+# there are 6 MIPS ABIs, plus variants.  Some configurations support
+# more than one ABI, so it is natural to use something like:
+#
+#    --target_board unix{-mabi=n32,-mabi=32,-mabi=64}
+#
+# when testing them.  But these -mabi=* options would normally prevent any
+# EABI and o64 tests from running.
+#
+# This testsuite therefore defines a local version of dg-options that
+# overrides any user options that are incompatible with the test options.
+# It tries to keep the other user options intact.
+#
+#
+# Most of the tests in this testsuite are scan-assembler tests, but
+# sometimes we need a link test instead.  In these cases, we must not
+# try to link code with options that are incompatible with the current
+# multilib, because xgcc is passed -L and -B options that are specific
+# to that multilib.
+#
+# Normal GCC practice would be to skip incompatible link tests as
+# unsupported, but in this particular case, it seems better to downgrade
+# them to an assemble test instead.  At least that way we get some
+# test-for-ICE and code-sanity coverage.
+#
+# The same problem applies to run tests.  If a test requires runtime
+# support for a particular feature, and if the current target does not
+# provide that support, normal practice would be to skip the test.
+# But in this case it seems better to downgrade it to a link test instead.
+# (We might then have to downgrade it to an assembler test according to
+# the constraints just mentioned.)
+#
+# The local dg-options therefore checks whether the new options are
+# link-compatiable with the user's options.  If not, it automatically
+# downgrades link tests to assemble tests.  It does the same for run
+# tests, but in addition, it downgrades run tests to link tests if the
+# target does not provide runtime support for a required feature or ASE.
+#
+#
+# Another problem is that many of the options we want to test require
+# certain other features.  For example, -mips3d requires both 64-bit
+# FPRs and a MIPS32 or MIPS64 target; -mfix-r10000 requires branch-
+# likely instructions; and so on.  We could handle this by specifying
+# a set of options that are guaranteed to give us what we want, such as:
+#
+#   dg-options "-mips3d -mpaired-single -mhard-float -mgp64 -mfp64 -mabi=n32 -march=mips64 -mips64"
+#
+# With the new dg-options semantics, this would override any troublesome
+# user options like -mips3, -march=vr4100, -mfp32, -mgp32, -msoft-float,
+# -mno-paired-single and so on.  But there are three major problems with
+# this:
+#
+#   - It is easy to forget options.
+#
+#   - If a new option is added, all tests that are incompatible with that
+#     option must be updated.
+#
+#   - We want to be able to test MIPS-3D with things like -march=mips32,
+#     -march=mips64r2, -march=sb1, and so on.
+#
+# The local version of dg-options therefore works out the requirements
+# of each test option.  As with the test options themselves, the local
+# dg-options overrides any user options that incompatible with these
+# requirements, but it keeps the other user options the same.
+#
+# For example, if the user passes -mips3, a MIPS-3D test will choose
+# a different architecture like -mips64 instead.  But if the user
+# passes -march=sb1, MIPS-3D tests will be run with that option.
+#
+#
+# Sometimes it is useful to say "I want an environment that is compatible
+# with option X, but I don't want to pass option X itself".  The main example
+# of this is -mips16: we want to be able to test __attribute__((mips16))
+# without requiring the test itself to be compiled as -mips16.  The local
+# version of dg-options lets you do this by putting X in parentheses.
+# For example:
+#
+#   { dg-options "(-mips16)" }
+#
+# selects a MIPS16-compatible target without passing -mips16 itself.
+#
+# It is also useful to say "any architecture within this ISA range is fine".
+# This can be done using special pseudo-options of the form:
+#
+#   PROP=VALUE PROP<=VALUE PROP>=VALUE
+#
+# where PROP can be:
+#
+#   isa:
+#      the value of the __mips macro.
+#
+#   isa_rev:
+#      the value of the __mips_isa_rev macro, or 0 if it isn't defined.
+#
+# For example, "isa_rev>=1" selects a MIPS32 or MIPS64 processor,
+# "isa=4" selects a MIPS IV processor, and so on.  There are also
+# the following special pseudo-options:
+#
+#   isa=loongson:
+#      select a Loongson processor
+#
+#   addressing=absolute
+#      force absolute addresses to be used
+#
+#
+# In summary:
+#
+#   (1) Try to avoid { target ... } requirements wherever possible.
+#       Specify the requirements as dg-options instead.
+#
+#   (2) Don't worry about the consequences of (1) for link and run tests.
+#       If the test uses { dg-do link } or { dg-do run }, and its
+#       dg-options are incompatible with the current target, the
+#       testsuite will downgrade them where necessary.
+#
+#   (3) Try to use the bare minimum of options and leave dg-options
+#       to work out the dependencies.  For example, if you want
+#       a MIPS-3D test, you should generally just specify -mips3d.
+#       Don't specify an architecture option like -mips64 unless
+#       the test really doesn't work with -mips32r2, -mips64r2,
+#       -march=sb1, etc.
+#
+#   (4) If you want something compatible with a particular option,
+#       but don't want to pass the option itself, wrap that option
+#       in parentheses.  In particular, pass '(-mips16)' if you
+#       want to use "mips16" attributes.
+#
+#   (5) When testing a feature of a generic ISA (as opposed to a
+#      processor-specific extension), try to use the "isa" and
+#      "isa_rev" pseudo-options instead of specific architecture
+#      options.  For example, if the feature is present on revision 2
+#      processors and above, try to use "isa_rev>=2" instead of
+#      "-mips32r2" or "-mips64r2".
 
 # Exit immediately if this isn't a MIPS target.
 if ![istarget mips*-*-*] {
-  return
+    return
 }
 
 # Load support procs.
 load_lib gcc-dg.exp
 
-# Find out which target is selected by the default compiler flags.
-# Also remember which aspects of the target are forced on the command
-# line (as opposed to being overridable defaults).
-#
-#    $mips_isa:                 the ISA level specified by __mips
-#    $mips_isa_rev:     the ISA revision specified by __mips_isa_rev
-#    $mips_arch:        the architecture specified by _MIPS_ARCH
-#    $mips_mips16:      true if MIPS16 output is selected
-#    $mips_gp:          the number of bytes in a general register
-#    $mips_fp:          the number of bytes in a floating-point register
-#    $mips_float:       "hard" or "soft"
-#    $mips_abi:                 the ABI specified by _MIPS_SIM
-#
-#    $mips_forced_isa:  true if the command line uses -march=* or -mips*
-#    $mips_forced_abi:  true if the command line uses -mabi=*
-#    $mips_forced_regs:  true if the command line uses -mgp* or -mfp*
-#    $mips_forced_float: true if the command line uses -mhard/soft-float
-#    $mips_forced_be    true if the command line uses -EB or -meb
-#    $mips_forced_le    true if the command line uses -EL or -mel
-#    $mips_forced_gp    true if the command line forces a particular GP mode
-#    $mips_forced_no_abicalls
-#                       true if the command line contains -mno-abicalls
-#    $mips_forced_no_shared
-#                       true if the command line contains -mno-shared
-#    $mips_forced_no_er  true if the command line contains -mno-explicit-relocs
-proc setup_mips_tests {} {
-    global mips_isa
-    global mips_isa_rev
-    global mips_arch
-    global mips_mips16
-    global mips_gp
-    global mips_fp
-    global mips_float
-    global mips_abi
-
-    global mips_forced_isa
-    global mips_forced_abi
-    global mips_forced_float
-    global mips_forced_be
-    global mips_forced_le
-    global mips_forced_gp
-    global mips_forced_no_abicalls
-    global mips_forced_no_shared
-    global mips_forced_no_er
-    global mips_forced_regs
-
-    global compiler_flags
+# A list of GROUP REGEXP pairs.  Each GROUP represents a logical group of
+# options from which only option should be chosen.  REGEXP matches all the
+# options in that group; it is implicitly wrapped in "^(...)$".
+set mips_option_groups {
+    abi "-mabi=.*"
+    addressing "addressing=.*"
+    arch "-mips([1-5]|32.*|64.*)|-march=.*|isa(|_rev)(=|<=|>=).*"
+    dump_pattern "-dp"
+    endianness "-E(L|B)|-me(l|b)"
+    float "-m(hard|soft)-float"
+    fp "-mfp(32|64)"
+    gp "-mgp(32|64)"
+    long "-mlong(32|64)"
+    mips16 "-mips16|-mno-mips16"
+    mips3d "-mips3d|-mno-mips3d"
+    optimization "-O(|[0-3s])"
+    pic "-f(no-|)(pic|PIC)"
+    profiling "-pg"
+    small-data "-G[0-9]+"
+    warnings "-w"
+}
+
+# Add -mfoo/-mno-foo options to mips_option_groups.
+foreach option {
+    abicalls
+    branch-likely
+    dsp
+    dspr2
+    explicit-relocs
+    extern-sdata
+    fix-r4000
+    fix-r10000
+    fix-vr4130
+    gpopt
+    local-sdata
+    long-calls
+    paired-single
+    plt
+    shared
+    smartmips
+    sym32
+} {
+    lappend mips_option_groups $option "-m(no-|)$option"
+}
+
+# Add -mfoo= options to mips_option_groups.
+foreach option {
+    branch-cost
+    code-readable
+    r10k-cache-barrier
+} {
+    lappend mips_option_groups $option "-m$option=.*"
+}
+
+# Add -ffoo/-fno-foo options to mips_option_groups.
+foreach option {
+    delayed-branch
+    fast-math
+    finite-math-only
+    fixed-hi
+    fixed-lo
+    lax-vector-conversions
+    split-wide-types
+    tree-vectorize
+} {
+    lappend mips_option_groups $option "-f(no-|)$option"
+}
+
+# A list of option groups that have an impact on the ABI.
+set mips_abi_groups {
+    abi
+    abicalls
+    arch
+    endianness
+    float
+    fp
+    gp
+    gpopt
+    long
+    pic
+    small-data
+}
+
+# mips_option_tests(OPTION) is some assembly code that will run to completion
+# on a target that supports OPTION.
+set mips_option_tests(-mips16) {
+    move $2,$31
+    jal 1f
+    b 2f
+    .align 2
+    .set mips16
+1:
+    jr $31
+    .set nomips16
+    .align 2
+2:
+    move $31,$2
+}
+set mips_option_tests(-mpaired-single) {
+    .set mips64
+    lui $2,0x3f80
+    mtc1 $2,$f0
+    cvt.ps.s $f2,$f0,$f0
+}
+set mips_option_tests(-mips3d) {
+    .set mips64
+    .set mips3d
+    lui $2,0x3f80
+    mtc1 $2,$f0
+    cvt.ps.s $f2,$f0,$f0
+    mulr.ps $f2,$f2,$f2
+    rsqrt1.s $f2,$f0
+    mul.s $f4,$f2,$f0
+    rsqrt2.s $f4,$f4,$f2
+    madd.s $f4,$f2,$f2,$f4
+}
+set mips_option_tests(-mdsp) {
+    .set mips64r2
+    .set dsp
+    addsc $2,$2,$2
+}
+set mips_option_tests(-mdspr2) {
+    .set mips64r2
+    .set dspr2
+    prepend $2,$3,11
+}
+
+# Canonicalize command-line option OPTION.
+proc mips_canonicalize_option { option } {
+    regsub {^-mips([1-5]|32*|64*)$} $option {-march=mips\1} option
+
+    regsub {^-mel$} $option {-EL} option
+    regsub {^-meb$} $option {-EB} option
+
+    regsub {^-O$} $option {-O1} option
+
+    # MIPS doesn't use -fpic and -fPIC to distinguish between code models.
+    regsub {^-f(no-|)PIC} $option {-f\1pic} option
+
+    return $option
+}
+
+# Return true if OPTION1 and OPTION2 represent the same command-line option.
+proc mips_same_option_p { option1 option2 } {
+    return [string equal \
+               [mips_canonicalize_option $option1] \
+               [mips_canonicalize_option $option2]]
+}
+
+# Preprocess CODE using target_compile options OPTIONS.  Return the
+# compiler output.
+proc mips_preprocess { options code } {
     global tool
 
     set src dummy[pid].c
     set f [open $src "w"]
-    puts $f {
-       int isa = __mips;
-       #ifdef __mips_isa_rev
-       int isa_rev = __mips_isa_rev;
-       #else
-       int isa_rev = 1;
-       #endif
-       const char *arch = _MIPS_ARCH;
-       #ifdef __mips16
-       int mips16 = 1;
-       #endif
-       #ifdef __mips64
-       int gp = 64;
-       #else
-       int gp = 32;
-       #endif
-       int fp = __mips_fpr;
-       #ifdef __mips_hard_float
-       const char *float = "hard";
-       #else
-       const char *float = "soft";
-       #endif
-       #if !defined _MIPS_SIM
-       const char *abi = "eabi";
-       #elif _MIPS_SIM==_ABIO32
-       const char *abi = "32";
-       #elif _MIPS_SIM==_ABIO64
-       const char *abi = "o64";
-       #elif _MIPS_SIM==_ABIN32
-       const char *abi = "n32";
-       #else
-       const char *abi = "64";
-       #endif
-    }
+    puts $f $code
     close $f
-    set output [${tool}_target_compile $src "" preprocess ""]
+    set output [${tool}_target_compile $src "" preprocess $options]
     file delete $src
 
-    regexp {isa = ([^;]*)} $output dummy mips_isa
-    regexp {isa_rev = ([^;]*)} $output dummy mips_isa_rev
-    regexp {arch = "([^"]*)} $output dummy mips_arch
-    set mips_mips16 [regexp {mips16 = 1} $output]
-    regexp {gp = ([^;]*)} $output dummy mips_gp
-    regexp {fp = ([^;]*)} $output dummy mips_fp
-    regexp {float = "([^"]*)} $output dummy mips_float
-    regexp {abi = "([^"]*)} $output dummy mips_abi
-
-    set mips_forced_isa [regexp -- {(-mips[1-5][[:>:]]|-mips32*|-mips64*|-march)} $compiler_flags]
-    set mips_forced_abi [regexp -- {-mabi} $compiler_flags]
-    set mips_forced_regs [regexp -- {(-mgp|-mfp)} $compiler_flags]
-    set mips_forced_float [regexp -- {-m(hard|soft)-float} $compiler_flags]
-    set mips_forced_be [regexp -- {-(EB|meb)[[:>:]]} $compiler_flags]
-    set mips_forced_le [regexp -- {-(EL|mel)[[:>:]]} $compiler_flags]
-    set mips_forced_gp [regexp -- {-(G|m(|no-)((extern|local)-sdata|gpopt)|mabicalls|mrtp)} $compiler_flags]
-    set mips_forced_no_abicalls [regexp -- {-mno-abicalls} $compiler_flags]
-    set mips_forced_no_shared [regexp -- {-mno-shared} $compiler_flags]
-    set mips_forced_no_er [regexp -- {-mno-explicit-relocs} $compiler_flags]
-
-    if {$mips_forced_regs && $mips_gp == 32 && $mips_fp == 64} {
-       set mips_forced_abi 1
-       set mips_forced_isa 1
+    return $output
+}
+
+# Set the target board's command-line options to NEW_OPTIONS, storing the
+# old values in UPVAR.
+proc mips_push_test_options { upvar new_options } {
+    upvar $upvar var
+    global board_info
+
+    array unset var
+    set var(name) board_info([target_info name],multilib_flags)
+    if { [info exists $var(name)] } {
+       set var(old_options) [set $var(name)]
+       set $var(name) [join $new_options " "]
     }
 }
 
-# Like dg-options, but treats certain MIPS-specific options specially:
-#
-#    -mgp32
-#    -march=mips32*
-#      Force 32-bit code.  Skip the test if the multilib flags force
-#      a 64-bit ABI.
-#
-#    -mgp64
-#      Force 64-bit code.  Also force a 64-bit target architecture
-#      if the other flags don't do so.  Skip the test if the multilib
-#      flags force a 32-bit ABI or a 32-bit architecture.
-#
-#    -mfp64
-#      Force the use of 64-bit floating-point registers, even on a
-#      32-bit target.  Also force -mhard-float and an architecture that
-#      supports such a combination, unless these things are already
-#      specified by other parts of the given flags.
-#
-#    -mabi=*
-#      Force a particular ABI.  Skip the test if the multilib flags
-#      force a specific ABI or a different register size.  If testing
-#      MIPS16 multilibs, try to force -msoft-float for ABIs other than
-#      o32 and o64, and skip the test if this is not possible.
-#
-#    -march=*
-#    -mips*
-#      Select the target architecture.  Skip the test if the multilib
-#      flags force a different architecture.
-#
-#    -msoft-float
-#    -mhard-float
-#      Select the given floating-point mode.  Skip the test if the
-#      multilib flags force a different selection.
-#
-#    -EB
-#    -EL
-#      Select the given endianness.  Skip the test if the multilib flags
-#      force the opposite endianness.
-#
-#    -G*
-#    -m(no-)extern-sdata
-#    -m(no-)local-sdata
-#    -m(no-)gpopt
-#      Select the small-data mode, and -mno-abcialls.  Skip the test if
-#      the multilib flags already contain such an option, or specify
-#      something that might be incompatible with them.
-#
-#    -mabicalls
-#    -mshared
-#      Select the form of SVR4 PIC.  Skip the test if the multilib flags
-#      conflict with the required setting.
-#
-#    -mexplicit-relocs
-#      Select explicit relocations.  Skip the test if the multilib flags
-#      force -mno-explicit-relocs.
-#
-#    -mpaired-single
-#      Select paired-single instructions.  Also behave as for -mfp64.
-proc dg-mips-options {args} {
-    upvar dg-extra-tool-flags extra_tool_flags
-    upvar dg-do-what do_what
+# Undo the effects of [mips_push_test_options UPVAR ...]
+proc mips_pop_test_options { upvar } {
+    upvar $upvar var
+    global board_info
 
-    global mips_isa
-    global mips_isa_rev
-    global mips_arch
-    global mips_mips16
-    global mips_gp
-    global mips_fp
-    global mips_float
-    global mips_abi
-
-    global mips_forced_isa
-    global mips_forced_abi
-    global mips_forced_regs
-    global mips_forced_float
-    global mips_forced_be
-    global mips_forced_le
-    global mips_forced_gp
-    global mips_forced_no_abicalls
-    global mips_forced_no_shared
-    global mips_forced_no_er
-
-    set flags [lindex $args 1]
-    set matches 1
-
-    # Add implied flags.
-    foreach flag $flags {
-       if {[string match -mpaired-single $flag]
-           && [lsearch $flags -mfp*] < 0} {
-           append flags " -mfp64"
-       } elseif {[regexp -- {^-mabi=(.*)} $flag dummy abi]
-                 && $mips_mips16
-                 && $abi != "32"
-                 && $abi != "o64"} {
-           if {[lsearch $flags -mhard-float] >= 0} {
-               set matches 0
-           } else {
-               append flags " -msoft-float"
-           }
-       } elseif {[regexp -- {^-mr10k-cache-barrier=(load|store)} $flag]
-                 && $mips_isa < 3
-                 && [lsearch -regexp $flags {^(-mips|-march)}] < 0} {
-           append flags " -mips3"
+    if { [info exists var(old_options)] } {
+       set $var(name) $var(old_options)
+    }
+}
+
+# Return property PROP for architecture option ARCH (which belongs to
+# the "arch" group in mips_option_groups).  See the comment at the
+# top of the file for the valid property names.
+#
+# Cache the results in mips_arch_info (which can be reused between test
+# variants).
+proc mips_arch_info { arch prop } {
+    global mips_arch_info
+    global board_info
+
+    set arch [mips_canonicalize_option $arch]
+    if { ![info exists mips_arch_info($arch,$prop)] } {
+       mips_push_test_options saved_options {}
+       set output [mips_preprocess [list "additional_flags=$arch -mabi=32"] {
+           int isa = __mips;
+           #ifdef __mips_isa_rev
+           int isa_rev = __mips_isa_rev;
+           #else
+           int isa_rev = 0;
+           #endif
+       }]
+       foreach lhs { isa isa_rev } {
+           regsub ".*$lhs = (\[^;\]*).*" $output {\1} rhs
+           verbose -log "Architecture $arch has $lhs $rhs"
+           set mips_arch_info($arch,$lhs) $rhs
        }
+       mips_pop_test_options saved_options
     }
-    foreach flag $flags {
-       if {[string match -mfp* $flag]
-           && [lsearch -regexp $flags {^-m(hard|soft)-float$}] < 0} {
-           append flags " -mhard-float"
+    return $mips_arch_info($arch,$prop)
+}
+
+# Return the option group associated with OPTION, or "" if none.
+proc mips_option_maybe_group { option } {
+    global mips_option_groups
+
+    foreach { group regexp } $mips_option_groups {
+       if { [regexp -- "^($regexp)\$" $option] } {
+           return $group
        }
     }
+    return ""
+}
 
-    # Handle options that force a particular register size.  Add
-    # architecture and ABI options if necessary.
-    set mips_new_gp $mips_gp
-    set mips_new_fp $mips_fp
-    foreach flag $flags {
-       switch -glob -- $flag {
-           -msmartmips -
-           -mips[12] -
-           -mips32* -
-           -march=mips32* -
-           -march=r3900 -
-           -march=24k* -
-           -mabi=32 -
-           -mgp32 {
-               set mips_new_gp 32
-           }
-           -mabi=64 -
-           -mabi=o64 -
-           -mabi=n32 -
-           -mgp64 {
-               set mips_new_gp 64
-           }
-           -mfp64 {
-               set mips_new_fp 64
-           }
+# Return the option group associated with OPTION.  Raise an error if
+# there is none.
+proc mips_option_group { option } {
+    set group [mips_option_maybe_group $option]
+    if { [string equal $group ""] } {
+       error "Unrecognised option: $option"
+    }
+    return $group
+}
+
+# Return the option for option group GROUP, or "" if no option in that
+# group has been chosen.  UPSTATUS describes the option status.
+proc mips_option { upstatus group } {
+    upvar $upstatus status
+
+    return $status(option,$group)
+}
+
+# If the default options for this test run include an option in group GROUP,
+# return that option, otherwise return "".
+proc mips_original_option { group } {
+    global mips_base_options
+
+    return [mips_option mips_base_options $group]
+}
+
+# Return true if the test described up UPSTATUS requires a specific
+# option in group GROUP.
+proc mips_test_option_p { upstatus group } {
+    upvar $upstatus status
+
+    return $status(test_option_p,$group)
+}
+
+# If the test described by UPSTATUS requires a particular option in group
+# GROUP, return that option, otherwise return "".
+proc mips_test_option { upstatus group } {
+    upvar $upstatus status
+
+    if { [mips_test_option_p status $group] } {
+       return [mips_option status $group]
+    } else {
+       return ""
+    }
+}
+
+# Return true if the options described by UPSTATUS include OPTION.
+proc mips_have_option_p { upstatus option } {
+    upvar $upstatus status
+
+    return [mips_same_option_p \
+               [mips_option status [mips_option_group $option]] \
+               $option]
+}
+
+# Return true if the test described by UPSTATUS requires option OPTION.
+proc mips_have_test_option_p { upstatus option } {
+    upvar $upstatus status
+
+    set group [mips_option_group $option]
+    return [mips_same_option_p [mips_test_option status $group] $option]
+}
+
+# If the test described by UPSTATUS does not specify an option in
+# OPTION's group, act as though it had specified OPTION.
+#
+# The first optional argument indicates whether the option should be
+# treated as though it were wrapped in parentheses; see the comment at
+# the top of the file for details about this convention.  The default is 0.
+proc mips_make_test_option { upstatus option args } {
+    upvar $upstatus status
+
+    set group [mips_option_group $option]
+    if { ![mips_test_option_p status $group] } {
+       set status(option,$group) $option
+       set status(test_option_p,$group) 1
+       if { [llength $args] == 0 || ![lindex $args 0] } {
+           set status(explicit_p,$group) 1
+       }
+    }
+}
+
+# If the test described by UPSTATUS requires option FROM, assume that
+# it implicitly requires option TO.
+proc mips_option_dependency { upstatus from to } {
+    upvar $upstatus status
+
+    if { [mips_have_test_option_p status $from] } {
+       mips_make_test_option status $to
+    }
+}
+
+# Return true if the given arch-group option specifies a 32-bit ISA.
+proc mips_32bit_arch_p { option } {
+    set isa [mips_arch_info $option isa]
+    return [expr { $isa < 3 || $isa == 32 }]
+}
+
+# Return true if the given arch-group option specifies a 64-bit ISA.
+proc mips_64bit_arch_p { option } {
+    return [expr { ![mips_32bit_arch_p $option] }]
+}
+
+# Return true if the given abi-group option implicitly requires -mgp32.
+proc mips_32bit_abi_p { option } {
+    switch -glob -- $option {
+       -mabi=32 {
+           return 1
        }
     }
+    return 0
+}
 
-    if {$mips_new_gp != $mips_gp || $mips_new_fp != $mips_fp} {
-       if {$mips_forced_regs} {
-           set matches 0
+# Return true if the given abi-group option implicitly requires -mgp64.
+proc mips_64bit_abi_p { option } {
+    switch -glob -- $option {
+       -mabi=o64 -
+       -mabi=n32 -
+       -mabi=64 {
+           return 1
        }
-       # Select an appropriate ABI.
-       if {[lsearch $flags "-mabi=*"] < 0} {
-           if {$mips_new_gp == 32} {
-               append flags " -mabi=32"
-           } else {
-               append flags " -mabi=o64"
+    }
+    return 0
+}
+
+# Check whether the current target supports all the options that the
+# current test requires.  Return "" if so, otherwise return one of
+# the incompatible options.  UPSTATUS describes the option status.
+proc mips_first_unsupported_option { upstatus } {
+    global mips_option_tests
+    upvar $upstatus status
+
+    foreach { option code } [array get mips_option_tests] {
+       if { [mips_have_test_option_p status $option] } {
+           regsub -all "\n" $code "\\n\\\n" asm
+           # Use check_runtime from target-supports.exp, which caches
+           # the result for us.
+           if { ![check_runtime mips_option_$option [subst {
+               __attribute__((nomips16)) int
+               main (void)
+               {
+                   asm (".set push\
+                   $asm\
+                   .set pop");
+                   return 0;
+               }
+           }]] } {
+               return $option
            }
        }
-       # And an appropriate architecture.
-       if {[lsearch -regexp $flags {^(-mips|-march)}] < 0} {
-           if {$mips_new_gp == 64 && $mips_gp == 32} {
-               append flags " -mips3"
-           } elseif {$mips_new_gp == 32 && $mips_new_fp == 64} {
-               append flags " -mips32r2"
-           }
+    }
+    return ""
+}
+
+# Initialize this testsuite for a new test variant.
+proc mips-dg-init {} {
+    # Invariant information.
+    global mips_option_groups
+
+    # Internally-generated information about this run.
+    global mips_base_options
+    global mips_extra_options
+
+    # Override dg-options with our mips-dg-options routine.
+    rename dg-options mips-old-dg-options
+    rename mips-dg-options dg-options
+
+    # Start with a fresh option status.
+    array unset mips_base_options
+    foreach { group regexp } $mips_option_groups {
+       set mips_base_options(option,$group) ""
+       set mips_base_options(explicit_p,$group) 0
+       set mips_base_options(test_option_p,$group) 0
+    }
+
+    # Use preprocessor macros to work out as many implicit options as we can.
+    set output [mips_preprocess "" {
+       const char *options[] = {
+           #if !defined _MIPS_SIM
+           "-mabi=eabi",
+           #elif _MIPS_SIM==_ABIO32
+           "-mabi=32",
+           #elif _MIPS_SIM==_ABIO64
+           "-mabi=o64",
+           #elif _MIPS_SIM==_ABIN32
+           "-mabi=n32",
+           #else
+           "-mabi=64",
+           #endif
+
+           "-march=" _MIPS_ARCH,
+
+           #ifdef _MIPSEB
+           "-EB",
+           #else
+           "-EL",
+           #endif
+
+           #ifdef __mips_hard_float
+           "-mhard-float",
+           #else
+           "-msoft-float",
+           #endif
+
+           #if __mips_fpr == 64
+           "-mfp64",
+           #else
+           "-mfp32",
+           #endif
+
+           #ifdef __mips64
+           "-mgp64",
+           #else
+           "-mgp32",
+           #endif
+
+           #if _MIPS_SZLONG == 64
+           "-mlong64",
+           #else
+           "-mlong32",
+           #endif
+
+           #ifdef __mips16
+           "-mips16",
+           #else
+           "-mno-mips16",
+           #endif
+
+           #ifdef __mips3d
+           "-mips3d",
+           #else
+           "-mno-mips3d",
+           #endif
+
+           #ifdef __mips_paired_single_float
+           "-mpaired-single",
+           #else
+           "-mno-paired-single",
+           #endif
+
+           #if __mips_abicalls
+           "-mabicalls",
+           #else
+           "-mno-abicalls",
+           #endif
+
+           #if __mips_dsp_rev >= 2
+           "-mdspr2",
+           #else
+           "-mno-dspr2",
+           #endif
+
+           #if __mips_dsp_rev >= 1
+           "-mdsp",
+           #else
+           "-mno-dsp",
+           #endif
+
+           #ifndef __PIC__
+           "addressing=absolute",
+           #endif
+
+           #ifdef __mips_smartmips
+           "-msmartmips",
+           #else
+           "-mno-smartmips",
+           #endif
+
+           0
+       };
+    }]
+    foreach line [split $output "\r\n"] {
+       # Poor man's string concatenation.
+       regsub -all {" "} $line "" line
+       if { [regexp {"(.*)",} $line dummy option] } {
+           set group [mips_option_group $option]
+           set mips_base_options(option,$group) $option
        }
     }
 
-    foreach flag $flags {
-       if {[string match -mabicalls $flag]} {
-           # EABI has no SVR4-style PIC mode, so try to force another ABI.
-           if {$mips_abi == "eabi" && [lsearch $flags "-mabi=*"] < 0} {
-               if {$mips_new_gp == 32} {
-                   append flags " -mabi=32"
+    # Process the target's multilib options, saving any unrecognized
+    # ones in mips_extra_options.
+    set mips_extra_options {}
+    foreach option [split [board_info target multilib_flags]] {
+       set group [mips_option_maybe_group $option]
+       if { ![string equal $group ""] } {
+           set mips_base_options(option,$group) $option
+           set mips_base_options(explicit_p,$group) 1
+       } else {
+           lappend mips_extra_options $option
+       }
+    }
+}
+
+# Finish a test run started by mips-dg-init.
+proc mips-dg-finish {} {
+    rename dg-options mips-dg-options
+    rename mips-old-dg-options dg-options
+}
+
+# Override dg-options so that we can do some MIPS-specific processing.
+# All options used in this testsuite must appear in mips_option_groups.
+#
+# Test options override multilib options.  Certain test options can
+# also imply other test options, which also override multilib options.
+# These dependencies are ordered as follows:
+#
+#          START                        END
+#            |                           |
+#         -mips16                     -mno-mips16
+#            |                           |
+#         -mips3d                     -mno-mips3d
+#            |                           |
+#         -mpaired-single             -mno-paired-single
+#            |                           |
+#         -mfp64                      -mfp32
+#            |                           |
+#         -mhard-float                -msoft-float
+#            |                           |
+#         -mno-sym32                  -msym32
+#            |                           |
+#         -fpic                       -fno-pic
+#            |                           |
+#         -mshared                    -mno-shared
+#            |                           |
+#         -mno-plt                    -mplt
+#            |                           |
+#         addressing=unknown          addressing=absolute
+#            |                           |
+#         -mabicalls                  -mno-abicalls
+#            |                           |
+#         -G0                         <other value>
+#            |                           |
+#         <other value>               -mr10k-cache-barrier=none
+#            |                           |
+#         -mfix-r10000                -mno-fix-r10000
+#            |                           |
+#         -mbranch-likely             -mno-branch-likely
+#            |                           |
+#         -msmartmips                 -mno-smartmips
+#            |                           |
+#         -mno-gpopt                  -mgpopt
+#            |                           |
+#         -mexplicit-relocs           -mno-explicit-relocs
+#            |                           |
+#            +-- gp, abi & arch ---------+
+#
+# For these purposes, the "gp", "abi" & "arch" option groups are treated
+# as a single node.
+proc mips-dg-options { args } {
+    # dg.exp variables.
+    upvar dg-extra-tool-flags extra_tool_flags
+    upvar dg-do-what do_what
+
+    # Invariant information.
+    global mips_option_groups
+    global mips_abi_groups
+
+    # Information about this run.
+    global mips_base_options
+
+    # Start out with the default option state.
+    array set options [array get mips_base_options]
+
+    # Record the options that this test explicitly needs.
+    foreach option [lindex $args 1] {
+       set all_but_p [regexp {^\((.*)\)$} $option dummy option]
+       set group [mips_option_group $option]
+       if { [mips_test_option_p options $group] } {
+           set old [mips_option options $group]
+           error "Inconsistent $group option: $old vs. $option"
+       } else {
+           mips_make_test_option options $option $all_but_p
+       }
+    }
+
+    # Handle dependencies between options on the left of the
+    # dependency diagram.
+    mips_option_dependency options "-mips3d" "-mpaired-single"
+    mips_option_dependency options "-mpaired-single" "-mfp64"
+    mips_option_dependency options "-mfp64" "-mhard-float"
+    mips_option_dependency options "-fpic" "-mshared"
+    mips_option_dependency options "-mshared" "-mno-plt"
+    mips_option_dependency options "-mno-plt" "addressing=unknown"
+    mips_option_dependency options "-mabicalls" "-G0"
+    mips_option_dependency options "-mno-gpopt" "-mexplicit-relocs"
+
+    # Work out information about the current ABI.
+    set abi_test_option_p [mips_test_option_p options abi]
+    set abi [mips_option options abi]
+    set eabi_p [mips_same_option_p $abi "-mabi=eabi"]
+
+    # If the test forces a particular ABI, set the register size
+    # accordingly.
+    if { $abi_test_option_p } {
+       if { [mips_32bit_abi_p $abi] } {
+           mips_make_test_option options "-mgp32"
+       } elseif { [mips_64bit_abi_p $abi] } {
+           mips_make_test_option options "-mgp64"
+       }
+    }
+
+    # Interpret the special "isa" and "isa_rev" options.  If we have
+    # a choice of a 32-bit or a 64-bit architecture, prefer to keep
+    # the -mgp setting the same.
+    set spec [mips_option options arch]
+    if { [regexp {^[^-]} $spec] } {
+       set arch [mips_option mips_base_options arch]
+       if { [string equal $spec "isa=loongson"] } {
+           if { ![regexp {^-march=loongson} $arch] } {
+               set arch "-march=loongson2f"
+           }
+       } else {
+           if { ![regexp {^(isa(?:|_rev))(=|<=|>=)([0-9]+)$} $spec \
+                      dummy prop relation value] } {
+               error "Unrecognized isa specification: $isa_spec"
+           }
+           set current [mips_arch_info $arch $prop]
+           if { ($current < $value && ![string equal $relation "<="])
+                || ($current > $value && ![string equal $relation ">="])
+                || ([mips_have_test_option_p options "-mgp64"]
+                    && [mips_32bit_arch_p $arch]) } {
+               # The current setting is out of range; it cannot
+               # possibly be used.  Find a replacement that can.
+               if { [string equal $prop "isa"] } {
+                   set arch "-mips$value"
+               } elseif { $value == 0 } {
+                   set arch "-mips4"
                } else {
-                   append flags " -mabi=n32"
+                   if { [mips_have_option_p options "-mgp32"] } {
+                       set arch "-mips32"
+                   } else {
+                       set arch "-mips64"
+                   }
+                   if { $value > 1 } {
+                       append arch "r$value"
+                   }
                }
            }
-           # Turn off small data, if on by default.
-           append flags " -G0"
        }
+       set options(option,arch) $arch
     }
 
-    # Handle the other options.
-    foreach flag $flags {
-       if {[regexp -- {^-mabi=(.*)} $flag dummy abi]} {
-           if {$abi != $mips_abi && $mips_forced_abi} {
-               set matches 0
-           }
-       } elseif {[regexp -- {^-mips(.*)} $flag dummy isa]
-                 || [regexp -- {^-march=mips(.*)} $flag dummy isa]} {
-           if {![regexp {(.*)r(.*)} $isa dummy isa isa_rev]} {
-               set isa_rev 1
-           }
-           if {($isa != $mips_isa || $isa_rev != $mips_isa_rev)
-               && $mips_forced_isa} {
-               set matches 0
+    # Work out information about the current architecture.
+    set arch_test_option_p [mips_test_option_p options arch]
+    set arch [mips_option options arch]
+    set isa [mips_arch_info $arch isa]
+    set isa_rev [mips_arch_info $arch isa_rev]
+
+    # If the test forces a 32-bit architecture, force -mgp32.
+    # Force the current -mgp setting otherwise; if we don't,
+    # some configurations would make a 64-bit architecture
+    # imply -mgp64.
+    if { $arch_test_option_p } {
+       if { [mips_32bit_arch_p $arch] } {
+           mips_make_test_option options "-mgp32"
+       } else {
+           mips_make_test_option options [mips_option options gp]
+       }
+    }
+
+    # We've now fixed the GP register size.  Make it easily available.
+    set gp_size [expr { [mips_have_option_p options "-mgp32"] ? 32 : 64 }]
+
+    # Handle dependencies between the pre-arch options and the arch option.
+    # This should mirror the arch and post-arch code below.
+    if { !$arch_test_option_p } {
+       # We need a revision 2 or better ISA for:
+       #
+       #   - the combination of -mgp32 -mfp64
+       #   - the DSP ASE
+       if { $isa_rev < 2
+            && (($gp_size == 32 && [mips_have_test_option_p options "-mfp64"])
+                || [mips_have_test_option_p options "-mdsp"]
+                || [mips_have_test_option_p options "-mdspr2"]) } {
+           if { $gp_size == 32 } {
+               mips_make_test_option options "-mips32r2"
+           } else {
+               mips_make_test_option options "-mips64r2"
            }
-       } elseif {[regexp -- {^-march=(.*)} $flag dummy arch]} {
-           if {$arch != $mips_arch && $mips_forced_isa} {
-               set matches 0
+        # We need a MIPS32 or MIPS64 ISA for:
+       #
+        #   - paired-single instructions(*)
+        #
+       # (*) Note that we don't support MIPS V at the moment.
+       } elseif { $isa_rev < 1
+                  && [mips_have_test_option_p options "-mpaired-single"] } {
+           if { $gp_size == 32 } {
+               mips_make_test_option options "-mips32"
+           } else {
+               mips_make_test_option options "-mips64"
            }
-       } elseif {[regexp -- {^-m(hard|soft)-float} $flag dummy float]} {
-           if {$mips_float != $float && $mips_forced_float} {
-               set matches 0
+        # We need MIPS III or higher for:
+       #
+       #   - the "cache" instruction
+       } elseif { $isa < 3
+                  && ([mips_have_test_option_p options \
+                           "-mr10k-cache-barrier=load-store"]
+                      || [mips_have_test_option_p options \
+                              "-mr10k-cache-barrier=store"]) } {
+           mips_make_test_option options "-mips3"
+        # We need MIPS II or higher for:
+       #
+       #   - branch-likely instructions(*)
+        #
+       # (*) needed by both -mbranch-likely and -mfix-r10000
+       } elseif { $isa < 2
+                  && ([mips_have_test_option_p options "-mbranch-likely"]
+                      || [mips_have_test_option_p options "-mfix-r10000"]) } {
+           mips_make_test_option options "-mips2"
+       # Check whether we need to switch from a 32-bit processor to the
+       # "nearest" 64-bit processor.
+       } elseif { $gp_size == 64 && [mips_32bit_arch_p $arch] } {
+           if { $isa_rev == 0 } {
+               mips_make_test_option options "-mips3"
+           } elseif { $isa_rev == 1 } {
+               mips_make_test_option options "-mips64"
+           } else {
+               mips_make_test_option options "-mips64r$isa_rev"
            }
-       } elseif {[regexp -- {^-(EB|meb)$} $flag]} {
-           if {$mips_forced_le} {
-               set matches 0
+       }
+       unset arch
+       unset isa
+       unset isa_rev
+    }
+
+    # Set an appropriate ABI, handling dependencies between the pre-abi
+    # options and the abi options.  This should mirror the abi and post-abi
+    # code below.
+    if { !$abi_test_option_p } {
+       if { ($eabi_p
+             && ([mips_have_option_p options "-mabicalls"]
+                 || ($gp_size == 32
+                     && [mips_have_option_p options "-mfp64"]))) } {
+           # EABI doesn't support -mabicalls.
+           # EABI doesn't support the combination -mgp32 -mfp64.
+           set force_abi 1
+       } elseif { [mips_have_option_p options "-mips16"]
+                  && ![mips_same_option_p $abi "-mabi=32"]
+                  && ![mips_same_option_p $abi "-mabi=o64"]
+                  && (![mips_have_option_p options "addressing=absolute"]
+                      || [mips_have_option_p options "-mhard-float"]) } {
+           # -mips16 -mhard-float requires o32 or o64.
+           # -mips16 PIC requires o32 or o64.
+           set force_abi 1
+       } else {
+           set force_abi 0
+       }
+       if { $gp_size == 32 } {
+           if { $force_abi || [mips_64bit_abi_p $abi] } {
+               mips_make_test_option options "-mabi=32"
            }
-       } elseif {[regexp -- {^-(EL|mel)$} $flag]} {
-           if {$mips_forced_be} {
-               set matches 0
+       } else {
+           if { $force_abi || [mips_32bit_abi_p $abi] } {
+               # All configurations should have an assembler that
+               # supports o64, since it requires the same BFD target
+               # vector as o32.  In contrast, many assembler
+               # configurations do not have n32 or n64 support.
+               mips_make_test_option options "-mabi=o64"
            }
-       } elseif {[regexp -- {^-(G|m(|no-)((extern|local)-sdata|gpopt))} $flag]} {
-           if {$flag != "-G0"} {
-               append flags " -mno-abicalls"
+       }
+       unset abi
+       unset eabi_p
+    }
+
+    # Handle dependencies between the abi options and the post-abi options.
+    # This should mirror the abi and pre-abi code above.
+    if { $abi_test_option_p } {
+       if { $eabi_p } {
+           mips_make_test_option options "-mno-abicalls"
+           if { $gp_size == 32 } {
+               mips_make_test_option options "-mfp32"
            }
-           if {$mips_forced_gp} {
-               set matches 0
+       }
+       if { [mips_have_option_p options "-mips16"]
+            && ![mips_same_option_p $abi "-mabi=32"]
+            && ![mips_same_option_p $abi "-mabi=o64"]
+            && (![mips_have_option_p options "addressing=absolute"]
+                || [mips_have_option_p options "-mhard-float"]) } {
+           if { [mips_test_option_p options mips16] } {
+               mips_make_test_option options "addressing=absolute"
+               mips_make_test_option options "-msoft-float"
+           } else {
+               mips_make_test_option options "-mno-mips16"
            }
-       } elseif {[regexp -- {^-mabicalls$} $flag]} {
-           if {$mips_forced_no_abicalls} {
-               set matches 0
+       }
+       unset abi
+       unset eabi_p
+    }
+
+    # Handle dependencies between the arch option and the post-arch options.
+    # This should mirror the arch and pre-arch code above.
+    if { $arch_test_option_p } {
+       if { $isa < 2 } {
+           mips_make_test_option options "-mno-branch-likely"
+           mips_make_test_option options "-mno-fix-r10000"
+       }
+       if { $isa < 3 } {
+           mips_make_test_option options "-mr10k-cache-barrier=none"
+       }
+       if { $isa_rev < 1 } {
+           mips_make_test_option options "-mno-paired-single"
+       }
+       if { $isa_rev < 2 } {
+           if { $gp_size == 32 } {
+               mips_make_test_option options "-mfp32"
            }
-       } elseif {[regexp -- {^-mshared$} $flag]} {
-           if {$mips_forced_no_shared} {
-               set matches 0
+           mips_make_test_option options "-mno-dsp"
+           mips_make_test_option options "-mno-dspr2"
+       }
+       unset arch
+       unset isa
+       unset isa_rev
+    }
+
+    # Handle dependencies between options on the right of the diagram.
+    mips_option_dependency options "-mno-explicit-relocs" "-mgpopt"
+    switch -- [mips_test_option options small-data] {
+       "" -
+       -G0 {}
+       default {
+           mips_make_test_option options "-mno-abicalls"
+       }
+    }
+    if { [mips_have_option_p options "-mabicalls"] } {
+       mips_option_dependency options "addressing=absolute" "-mplt"
+    }
+    mips_option_dependency options "-mplt" "-msym32"
+    mips_option_dependency options "-mplt" "-mno-shared"
+    mips_option_dependency options "-mno-shared" "-fno-pic"
+    mips_option_dependency options "-mfp32" "-mno-paired-single"
+    mips_option_dependency options "-msoft-float" "-mno-paired-single"
+    mips_option_dependency options "-mno-paired-single" "-mno-mips3d"
+
+    # If the test requires an unsupported option, change run tests
+    # to link tests.
+
+    switch -- [lindex $do_what 0] {
+       run {
+           set option [mips_first_unsupported_option options]
+           if { ![string equal $option ""] } {
+               set do_what [lreplace $do_what 0 0 link]
+               verbose -log "Downgraded to a 'link' test due to unsupported option '$option'"
            }
-       } elseif {[regexp -- {^-mexplicit-relocs$} $flag]} {
-           if {$mips_forced_no_er} {
-               set matches 0
+       }
+    }
+
+    # If the test has overridden a option that changes the ABI,
+    # downgrade a link or execution test to an assembler test.
+    foreach group $mips_abi_groups {
+       set old_option [mips_original_option $group]
+       set new_option [mips_option options $group]
+       if { ![mips_same_option_p $old_option $new_option] } {
+           switch -- [lindex $do_what 0] {
+               link -
+               run {
+                   set do_what [lreplace $do_what 0 0 assemble]
+                   verbose -log "Downgraded to an 'assemble' test due to incompatible $group option ($old_option changed to $new_option)"
+               }
            }
+           break
        }
     }
-    if {$matches} {
-       append extra_tool_flags " " $flags
-    } else {
-       set do_what [list [lindex $do_what 0] "N" "P"]
+
+    # Add all options to the dg variable.
+    set options(explicit_p,addressing) 0
+    foreach { group regexp } $mips_option_groups {
+       if { $options(explicit_p,$group) } {
+           append extra_tool_flags " " $options(option,$group)
+       }
+    }
+
+    # If the test is MIPS16-compatible, provide a counterpart to the
+    # NOMIPS16 convenience macro.
+    if { [mips_have_test_option_p options "-mips16"] } {
+       append extra_tool_flags " -DMIPS16=__attribute__((mips16))"
+    }
+
+    # Use our version of gcc-dg-test for this test.
+    if { ![string equal [info procs "mips-gcc-dg-test"] ""] } {
+       rename gcc-dg-test mips-old-gcc-dg-test
+       rename mips-gcc-dg-test gcc-dg-test
     }
 }
 
-setup_mips_tests
+# A version of gcc-dg-test that is used by dg-options tests.
+proc mips-gcc-dg-test { prog do_what extra_tool_flags } {
+    global board_info
+    global mips_extra_options
+
+    # Override the user's chosen test options with the combined test/user
+    # version.
+    mips_push_test_options saved_options $mips_extra_options
+    set result [gcc-dg-test-1 gcc_target_compile $prog \
+                   $do_what $extra_tool_flags]
+    mips_pop_test_options saved_options
+
+    # Restore the usual gcc-dg-test.
+    rename gcc-dg-test mips-gcc-dg-test
+    rename mips-old-gcc-dg-test gcc-dg-test
+
+    return $result
+}
 
 dg-init
-# MIPS16 is defined in add_options_for_mips16_attribute.
+mips-dg-init
+# MIPS16 is defined by "-mips16" or "(-mips16)" in dg-options.
 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] "" \
     "-DNOMIPS16=__attribute__((nomips16))"
+mips-dg-finish
 dg-finish
index edab378..bc81cfa 100644 (file)
@@ -1,6 +1,5 @@
-/* { dg-do compile { target mips16_attribute } } */
 /* { dg-skip-if "" { *-*-* } { "-mflip-mips16" } { "" } } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16)" } */
 
 void f1 (void);
 void __attribute__((mips16)) f1 (void) {} /* { dg-error "conflicting" } */
index 3b4e107..7474503 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-options "(-mips16)" } */
 /* We should be able to assign mips16 and nomips16 functions to a pointer.  */
 void __attribute__((mips16)) f1 (void);
 void (*ptr1) (void) = f1;
index 96945e1..28bb9aa 100644 (file)
@@ -1,8 +1,8 @@
 /* Verify that mips16 and nomips16 attributes work, checking all combinations
    of calling a nomips16/mips16/default function from a nomips16/mips16/default
    function.  */
-/* { dg-do run { target { mipsisa*-*-elf* && mips16_attribute } } } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-do run } */
+/* { dg-options "(-mips16)" } */
 
 #include <stdlib.h>
 
index df43c41..d077f2f 100644 (file)
@@ -1,6 +1,5 @@
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-Os -march=mips32" } */
-/* { dg-add-options mips16_attribute } */
+/* -mlong32 added because of PR target/38595.  */
+/* { dg-options "(-mips16) -Os isa_rev>=1 -mlong32" } */
 
 MIPS16 short cksum16 (unsigned long n)
 {
index c82f68e..e6a271e 100644 (file)
@@ -1,6 +1,6 @@
 /* Test MIPS32 DSP instructions */
-/* { dg-do run { target mipsisa32r2*-*-* } } */
-/* { dg-mips-options "-march=mips32r2 -mdsp -O2" } */
+/* { dg-do run } */
+/* { dg-options "-mdsp -O2" } */
 
 #include <stdlib.h>
 #include <stdio.h>
index f0f3fda..cbf347b 100644 (file)
@@ -1,6 +1,6 @@
 /* Test MIPS32 DSP instructions */
 /* { dg-do compile } */
-/* { dg-mips-options "-march=mips32 -mdsp" } */
+/* { dg-options "-mdsp" } */
 /* { dg-final { scan-assembler "addq.ph" } } */
 /* { dg-final { scan-assembler "addu.qb" } } */
 /* { dg-final { scan-assembler "subq.ph" } } */
index 08f18da..c00ea3e 100644 (file)
@@ -1,6 +1,6 @@
 /* Test MIPS32 DSP instructions */
 /* { dg-do compile } */
-/* { dg-mips-options "-march=mips32 -mdsp" } */
+/* { dg-options "-mgp32 -mdsp" } */
 /* { dg-final { scan-assembler "addq.ph" } } */
 /* { dg-final { scan-assembler "addq_s.ph" } } */
 /* { dg-final { scan-assembler "addq_s.w" } } */
index 5d23198..9501e9c 100644 (file)
@@ -1,6 +1,6 @@
 /* Test MIPS32 DSP REV 2 instructions */
 /* { dg-do compile } */
-/* { dg-mips-options "-march=mips32r2 -mdspr2" } */
+/* { dg-options "-mdspr2" } */
 /* { dg-final { scan-assembler "\tmul.ph\t" } } */
 
 typedef short v2hi __attribute__ ((vector_size(4)));
index 31cf22c..1b3031f 100644 (file)
@@ -1,6 +1,6 @@
 /* Test MIPS32 DSP REV 2 instructions */
-/* { dg-do run { target mipsisa32r2*-*-* } } */
-/* { dg-mips-options "-march=mips32r2 -mdspr2 -O2" } */
+/* { dg-do run } */
+/* { dg-options "-mdspr2 -O2" } */
 
 typedef signed char v4q7 __attribute__ ((vector_size(4)));
 typedef signed char v4i8 __attribute__ ((vector_size(4)));
@@ -13,7 +13,7 @@ typedef long long a64;
 
 void abort (void);
 
-void test_MIPS_DSPR2 (void);
+NOMIPS16 void test_MIPS_DSPR2 (void);
 
 int little_endian;
 
@@ -28,7 +28,7 @@ int main ()
   return 0;
 }
 
-void test_MIPS_DSPR2 ()
+NOMIPS16 void test_MIPS_DSPR2 ()
 {
   v4q7 v4q7_a,v4q7_b,v4q7_c,v4q7_r,v4q7_s;
   v4i8 v4i8_a,v4i8_b,v4i8_c,v4i8_r,v4i8_s;
index 9257612..cf57323 100644 (file)
@@ -1,14 +1,14 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -mabi=32 -mfp64" } */
+/* { dg-options "-O -mabi=32 -mfp64" } */
 /* { dg-final { scan-assembler "mthc1" } } */
 /* { dg-final { scan-assembler "mfhc1" } } */
 
-double func1 (long long a)
+NOMIPS16 double func1 (long long a)
 {
   return a;
 }
 
-long long func2 (double b)
+NOMIPS16 long long func2 (double b)
 {
   return b;
 }
index 1f216b7..1a930c9 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips4" } */
+/* { dg-options "-O2 isa>=4" } */
 /* { dg-final { scan-assembler "movz" } } */
 /* { dg-final { scan-assembler "movn" } } */
 
index bb57809..d42acc1 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips4" } */
+/* { dg-options "-O2 isa>=4" } */
 /* { dg-final { scan-assembler "movz" } } */
 /* { dg-final { scan-assembler "movn" } } */
 
index c3e0b42..e648177 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips4 -mhard-float" } */
+/* { dg-options "-O2 isa>=4 -mhard-float" } */
 /* { dg-final { scan-assembler "movt" } } */
 /* { dg-final { scan-assembler "movf" } } */
 /* { dg-final { scan-assembler "movz.s" } } */
index ec6bbc5..803ea77 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=vr5400 -mgp32" } */
+/* { dg-options "-O2 -march=vr5400 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmsac\t\\\$0," 2 } } */
 
 NOMIPS16 long long
index 09c22e7..e6cdc2c 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=vr5500 -mgp32" } */
+/* { dg-options "-O2 -march=vr5500 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmsub\t" 2 } } */
 
 NOMIPS16 long long
index 97dccf2..c44f34f 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips32 -mgp32" } */
+/* { dg-options "-O2 isa_rev>=1 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmsub\t" 2 } } */
 
 NOMIPS16 long long
index df08a63..d41c312 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips32r2 -mdspr2 -mgp32" } */
+/* { dg-options "-O2 -mdspr2 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmsub\t\\\$ac" 2 } } */
 
 NOMIPS16 long long
index 675da64..dcb124a 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -march=5kc" } */
+/* { dg-options "-O2 -march=5kc" } */
 /* { dg-final { scan-assembler-times "\tmsub\t" 4 } } */
 /* { dg-final { scan-assembler-not "\tmtlo\t" } } */
 /* { dg-final { scan-assembler-times "\tmflo\t" 3 } } */
index afe01cb..ee4ca3d 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -march=5kc" } */
+/* { dg-options "-O2 -march=5kc" } */
 /* { dg-final { scan-assembler-not "\tmsub\t" } } */
 /* { dg-final { scan-assembler "\tmul\t" } } */
 /* { dg-final { scan-assembler "\tsubu\t" } } */
index df19566..ca90cee 100644 (file)
@@ -1,5 +1,5 @@
 /* -mlong32 added because of PR target/38598.  */
-/* { dg-mips-options "-O2 -march=5kc -mlong32" } */
+/* { dg-options "-O2 -march=5kc -mlong32" } */
 /* { dg-final { scan-assembler-not "\tmul\t" } } */
 /* { dg-final { scan-assembler "\tmsub\t" } } */
 
index 7517540..49d67f2 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -march=5kc" } */
+/* { dg-options "-O2 -march=5kc" } */
 /* { dg-final { scan-assembler "\tmul\t" } } */
 /* { dg-final { scan-assembler-not "\tmsub\t" } } */
 /* { dg-final { scan-assembler-not "\tmtlo\t" } } */
index 187cb71..ae80403 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=vr5400 -mgp32" } */
+/* { dg-options "-O2 -march=vr5400 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmsacu\t\\\$0," 2 } } */
 
 typedef unsigned int ui;
index 36cb91b..186dc47 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=vr5500 -mgp32" } */
+/* { dg-options "-O2 -march=vr5500 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmsubu\t" 2 } } */
 
 typedef unsigned int ui;
index ee5dd6a..272c648 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips32 -mgp32" } */
+/* { dg-options "-O2 isa_rev>=1 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmsubu\t" 2 } } */
 
 typedef unsigned int ui;
index fb655db..8f5fd64 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips32r2 -mdspr2 -mgp32" } */
+/* { dg-options "-O2 -mdspr2 -mgp32" } */
 /* { dg-final { scan-assembler-times "\tmsubu\t\\\$ac" 2 } } */
 
 typedef unsigned int ui;
index f8bc5c9..ac0cc1e 100644 (file)
@@ -1,6 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-mlong-calls" } */
-/* { dg-require-effective-target nonpic } */
+/* { dg-options "-mlong-calls addressing=absolute" } */
 
 extern int long_call_func () __attribute__((long_call));
 extern int far_func () __attribute__((far));
index d65c44c..c954b44 100644 (file)
@@ -1,6 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-mno-long-calls" } */
-/* { dg-require-effective-target nonpic } */
+/* { dg-options "-mno-long-calls addressing=absolute" } */
 
 extern int long_call_func () __attribute__((long_call));
 extern int far_func () __attribute__((far));
index bde44e5..f4ae791 100644 (file)
@@ -1,6 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-mlong-calls -O2" } */
-/* { dg-require-effective-target nonpic } */
+/* { dg-options "-mlong-calls addressing=absolute -O2" } */
 
 NOMIPS16 extern int long_call_func () __attribute__((long_call));
 NOMIPS16 extern int far_func () __attribute__((far));
index f792168..b9aa21f 100644 (file)
@@ -1,6 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-mno-long-calls -O2" } */
-/* { dg-require-effective-target nonpic } */
+/* { dg-options "-mno-long-calls addressing=absolute -O2" } */
 
 NOMIPS16 extern int long_call_func () __attribute__((long_call));
 NOMIPS16 extern int far_func () __attribute__((far));
index e5daa29..20691ff 100644 (file)
@@ -1,7 +1,7 @@
 /* Make sure that we use abs.fmt and neg.fmt when the signs of NaNs don't
    matter.  */
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mhard-float -ffinite-math-only" } */
+/* { dg-options "-O2 -mhard-float -ffinite-math-only" } */
 /* { dg-final { scan-assembler "neg.s" } } */
 /* { dg-final { scan-assembler "neg.d" } } */
 /* { dg-final { scan-assembler "abs.s" } } */
index 5ef08da..67125f7 100644 (file)
@@ -1,7 +1,7 @@
 /* Make sure that we avoid abs.fmt and neg.fmt when the signs of NaNs
    matter.  */
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mhard-float -fno-finite-math-only" } */
+/* { dg-options "-O2 -mhard-float -fno-finite-math-only" } */
 /* { dg-final { scan-assembler-not "neg.s" } } */
 /* { dg-final { scan-assembler-not "neg.d" } } */
 /* { dg-final { scan-assembler-not "abs.s" } } */
index bd3b10a..123d487 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -ffast-math -mips4 -mhard-float" } */
+/* { dg-options "-O2 -ffast-math isa=4 -mhard-float" } */
 /* { dg-final { scan-assembler "nmadd.s" } } */
 /* { dg-final { scan-assembler "nmadd.d" } } */
 /* { dg-final { scan-assembler "nmsub.s" } } */
index cce3710..90e4d83 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -fno-fast-math -ffinite-math-only -mips4 -mhard-float" } */
+/* { dg-options "-O2 -fno-fast-math -ffinite-math-only isa=4 -mhard-float" } */
 /* { dg-final { scan-assembler "nmadd.s" } } */
 /* { dg-final { scan-assembler "nmadd.d" } } */
 /* { dg-final { scan-assembler "nmsub.s" } } */
index 381fdef..df72618 100644 (file)
@@ -1,7 +1,7 @@
 /* The same code as nmadd-2.c, but compiled with -fno-finite-math-only.
    We can't use nmadd and nmsub in that case.  */
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -fno-fast-math -fno-finite-math-only -mips4 -mhard-float" } */
+/* { dg-options "-O2 -fno-fast-math -fno-finite-math-only isa=4 -mhard-float" } */
 /* { dg-final { scan-assembler-not "nmadd.s" } } */
 /* { dg-final { scan-assembler-not "nmadd.d" } } */
 /* { dg-final { scan-assembler-not "nmsub.s" } } */
index 6d1d7e8..ee7f3d5 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -mno-smartmips" } */
+/* { dg-options "-O -mno-smartmips" } */
 
 NOMIPS16 int scaled_indexed_word_load (int a[], int b)
 {
index 6433397..d1f50a8 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -mno-smartmips -march=mips32" } */
+/* { dg-options "-O -mno-smartmips -march=mips32" } */
 
 NOMIPS16 int rotate_left (unsigned a, unsigned s)
 {
index 97aacc5..8dd5be1 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -march=octeon" } */
+/* { dg-options "-O -march=octeon" } */
 /* { dg-final { scan-assembler-times "\tbaddu\t" 4 } } */
 /* { dg-final { scan-assembler-not "\tandi\t" } } */
 
index 24fd728..6629dbb 100644 (file)
@@ -1,9 +1,11 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=octeon" } */
+/* { dg-options "-O2 -march=octeon" } */
 /* { dg-final { scan-assembler-times "\tbbit1\t" 4 } } */
 /* { dg-final { scan-assembler-times "\tbbit0\t" 2 } } */
 /* { dg-final { scan-assembler-not "andi\t" } } */
 
+NOMIPS16 void foo (void);
+
 NOMIPS16 void
 f1 (long long i)
 {
@@ -51,5 +53,5 @@ NOMIPS16 void
 f6 ()
 {
   if (!test_bit(0, &r))
-    g ();
+    foo ();
 }
index 6be7ef5..55bf23e 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=octeon -mbranch-likely" } */
+/* { dg-options "-O2 -march=octeon -mbranch-likely" } */
 /* { dg-final { scan-assembler "\tbbit\[01\]\t" } } */
 /* { dg-final { scan-assembler-not "\tbbit\[01\]l\t" } } */
 /* { dg-final { scan-assembler "\tbnel\t" } } */
index fd01f12..bcc37d2 100644 (file)
@@ -11,7 +11,7 @@
 
   which does not get recognized as a valid bbit pattern.  The
   middle-end should be able to simplify this further.  */
-/* { dg-mips-options "-O2 -march=octeon -meb" } */
+/* { dg-options "-O2 -march=octeon -meb" } */
 
 /* { dg-final { scan-assembler-times "\tbbit\[01\]\t|\tbgez\t" 2 } } */
 /* { dg-final { scan-assembler-not "ext\t" } } */
index 27dc6b3..ac85e23 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* The tests also work with -mgp32.  For long long tests, only one of
    the 32-bit parts is used.  */
-/* { dg-mips-options "-O -march=octeon" } */
+/* { dg-options "-O -march=octeon" } */
 /* { dg-final { scan-assembler-times "\tcins\t" 3 } } */
 /* { dg-final { scan-assembler-not "\tandi\t|sll\t" } } */
 
index c60ee93..2dcff0a 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -march=octeon -mgp64" } */
+/* { dg-options "-O -march=octeon -mgp64" } */
 /* { dg-final { scan-assembler-not "\tcins\t" } } */
 
 NOMIPS16 unsigned
index 1cbf7a6..b8b8c1b 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-march=octeon -mgp64" } */
+/* { dg-options "-march=octeon -mgp64" } */
 /* { dg-final { scan-assembler "\tdmul\t" } } */
 /* { dg-final { scan-assembler-not "\tdmult\t" } } */
 /* { dg-final { scan-assembler-not "\tmflo\t" } } */
index 2e8e4e6..6b2308c 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-march=octeon -mgp64" } */
+/* { dg-options "-march=octeon -mgp64" } */
 /* { dg-final { scan-assembler-not "\tdmul" } } */
 
 NOMIPS16 long long
index bdaa0b9..b0f4be1 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-march=octeon" } */
+/* { dg-options "-march=octeon" } */
 /* { dg-final { scan-assembler "\texts\t" } } */
 
 struct foo
index 7847cf9..fc5df63 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -march=octeon -meb" } */
+/* { dg-options "-O -march=octeon -meb" } */
 /* { dg-final { scan-assembler-times "\texts\t" 4 } } */
 
 struct bar
index d7610f8..9d0e930 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -march=octeon -mgp64" } */
+/* { dg-options "-O -march=octeon -mgp64" } */
 /* { dg-final { scan-assembler-times "\texts\t" 3 } } */
 
 struct foo
index 475fa21..7e6a578 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -march=octeon -mgp64" } */
+/* { dg-options "-O -march=octeon -mgp64" } */
 /* { dg-final { scan-assembler-not "\tsll\t\[^\n\]*,0" } } */
 /* { dg-final { scan-assembler-times "\texts\t" 6 } } */
 
index 31251e7..e7a4738 100644 (file)
@@ -1,6 +1,6 @@
 /* -mel version of octeon-exts-2.c.  */
 /* { dg-do compile } */
-/* { dg-mips-options "-O -march=octeon -mel" } */
+/* { dg-options "-O -march=octeon -mel" } */
 /* { dg-final { scan-assembler-times "\texts\t" 4 } } */
 
 struct bar
index 2554af6..54d2e9c 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -march=octeon -mgp64" } */
+/* { dg-options "-O -march=octeon -mgp64" } */
 /* { dg-final { scan-assembler "\tpop\t" } } */
 /* { dg-final { scan-assembler "\tdpop\t" } } */
 
index 3199cd7..c07660a 100644 (file)
@@ -1,7 +1,7 @@
 /* Check if we expand seq and sne.  */
 
 /* { dg-do compile } */
-/* { dg-mips-options "-march=octeon" } */
+/* { dg-options "-march=octeon" } */
 /* { dg-final { scan-assembler-times "\tseq\t|\tseqi\t" 4 } } */
 /* { dg-final { scan-assembler-times "\tsne\t|\tsnei\t" 4 } } */
 
index 994e51b..83e068c 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-march=octeon -mgp64" } */
+/* { dg-options "-march=octeon -mgp64" } */
 /* { dg-final { scan-assembler-times "\tseq\t|\tseqi\t" 3 } } */
 /* { dg-final { scan-assembler-times "\tsne\t|\tsnei\t" 3 } } */
 
index 522d0ea..899f145 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -march=octeon -mgp64" } */
+/* { dg-options "-O -march=octeon -mgp64" } */
 
 /* { dg-final { scan-assembler-not "and\t\|andi\t\|ext\t\|sll\t\|srl\t" } } */
 /* { dg-final { scan-assembler-times "\tseqi\t\|\tsnei\t" 4 } } */
index 88a7100..e61bcb3 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=octeon" } */
+/* { dg-options "-O2 -march=octeon" } */
 /* { dg-final { scan-assembler-not "xor" } } */
 
 unsigned
index bf90f27..25c2e8d 100644 (file)
@@ -2,7 +2,7 @@
    This testcase used to trigger an unrecognizable insn.  */
 
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -w" } */
+/* { dg-options "-O2 -w" } */
 
 __thread int *a = 0;
 
index e19c932..ead5888 100644 (file)
@@ -1,6 +1,6 @@
 /* GCC used to report an ICE for this test because we generated a LO_SUM
    for an illegitimate constant.  */
-/* { dg-mips-options "-mabi=64 -msym32 -O2 -EB -mno-abicalls" } */
+/* { dg-options "-mabi=64 -msym32 -O2 -EB -mno-abicalls" } */
 extern unsigned long a[];
 int b (int);
 
index 34251e4..78e761f 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-mabi=64 -O2" } */
+/* { dg-options "-mabi=64 -O2" } */
 
 NOMIPS16 long double __powitf2 (long double x, int m)
 {
index a550480..ca6a1e6 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do link } */
-/* { dg-mips-options "-O2" } */
+/* { dg-options "-O2" } */
 
 volatile int gv;
 const char *ptrs[2];
index 3cdcd4a..2da436f 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-ffast-math -mips64 -mgp32" } */
+/* { dg-options "-ffast-math -mips64 -mgp32" } */
 
 double
 foo (void)
index 3430098..9ecc4d0 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -march=74kc -mgp32" } */
+/* { dg-options "-O2 -march=74kc -mgp32" } */
 __thread int x __attribute__((tls_model("initial-exec")));
 __thread int y __attribute__((tls_model("initial-exec")));
 
index a356b78..14e3a75 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-march=mips64r2 -mabi=n32" } */
+/* { dg-options "-march=mips64r2 -mabi=n32" } */
 
 typedef float TFtype __attribute__((mode(TF)));
 
index fd13d8a..b271e2b 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -mabi=64 -mr10k-cache-barrier=store" } */
+/* { dg-options "-O2 -mabi=64 -mr10k-cache-barrier=store" } */
 
 /* Test that stores to uncached addresses do not get unnecessary
    cache barriers.  */
index 405d7fc..68c4b7e 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -mr10k-cache-barrier=store -mips4 -mbranch-likely -mno-abicalls" } */
+/* { dg-options "-O2 -mr10k-cache-barrier=store -mips4 -mbranch-likely -mno-abicalls" } */
 int bar (int);
 
 /* Test that code after a branch-likely does not get an unnecessary
index be6816f..d1082d9 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -mr10k-cache-barrier=store -mno-abicalls" } */
+/* { dg-options "-O2 -mr10k-cache-barrier=store -mno-abicalls" } */
 
 /* Test that loads are not unnecessarily protected.  */
 
index 7e8026f..d416391 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -mr10k-cache-barrier=load-store -mno-abicalls" } */
+/* { dg-options "-O2 -mr10k-cache-barrier=load-store -mno-abicalls" } */
 
 /* Test that loads are correctly protected.  */
 
index fa5a416..3e955ab 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -mr10k-cache-barrier=store" } */
+/* { dg-options "-O2 -mr10k-cache-barrier=store" } */
 
 /* Test that indirect calls are protected.  */
 
index 4d80783..1fdcee0 100644 (file)
@@ -1,6 +1,4 @@
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-O2 -mr10k-cache-barrier=store" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) -O2 -mr10k-cache-barrier=store" } */
 
 /* Test that indirect calls are protected.  */
 
index 5b03838..a3e7f0d 100644 (file)
@@ -1,2 +1,2 @@
-/* { dg-mips-options "-O2 -mr10k-cache-barrier=store -mips2" } */
+/* { dg-options "-O2 -mr10k-cache-barrier=store -mips2" } */
 /* { dg-error "requires.*cache.*instruction" "" { target *-*-* } 0 } */
index ed439b1..3d06d0d 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -mabi=64 -mr10k-cache-barrier=store" } */
+/* { dg-options "-O2 -mabi=64 -mr10k-cache-barrier=store" } */
 
 /* Test that stores to constant cached addresses are protected
    by cache barriers.  */
index 8238f39..be2c7fb 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -mr10k-cache-barrier=store -mno-abicalls" } */
+/* { dg-options "-O2 -mr10k-cache-barrier=store -mno-abicalls" } */
 
 /* Test that in-range stores to the frame are not protected by
    cache barriers.  */
index e8280e8..9dd23ea 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -mr10k-cache-barrier=store -mno-abicalls" } */
+/* { dg-options "-O2 -mr10k-cache-barrier=store -mno-abicalls" } */
 
 void bar (int *x);
 
index 6e21ec3..a6b53a9 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -mr10k-cache-barrier=store -mno-abicalls -mabi=64" } */
+/* { dg-options "-O2 -mr10k-cache-barrier=store -mno-abicalls -mabi=64" } */
 
 /* Test that in-range stores to static objects do not get an unnecessary
    cache barrier.  */
index f014aa0..c52caaa 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -mr10k-cache-barrier=store -mabi=64" } */
+/* { dg-options "-O2 -mr10k-cache-barrier=store -mabi=64" } */
 
 int x[4];
 void bar (void);
index c98b4a8..3f73865 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -mr10k-cache-barrier=store -mno-abicalls" } */
+/* { dg-options "-O2 -mr10k-cache-barrier=store -mno-abicalls" } */
 
 void bar1 (void);
 void bar2 (void);
index 5394ae8..394bf48 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -mr10k-cache-barrier=store -G8" } */
+/* { dg-options "-O2 -mr10k-cache-barrier=store -G8" } */
 
 /* Test that in-range stores to components of static objects
    do not get an unnecessary cache barrier.  */
index cf795b6..67b52f9 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O2 -mr10k-cache-barrier=store -G8" } */
+/* { dg-options "-O2 -mr10k-cache-barrier=store -G8" } */
 
 /* Test that out-of-range stores to components of static objects
    are protected by a cache barrier.  */
index 393f108..4dc2b00 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-march=r3900" } */
+/* { dg-options "-march=r3900" } */
 /* { dg-final { scan-assembler "\tmult\t\[^\n\]*,\[^\n\]*," } } */
 
 NOMIPS16 int
index 4cc6212..f0a9b3a 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -ffast-math -mips4 -mhard-float -mgp64" } */
+/* { dg-options "-O2 -ffast-math isa=4 -mhard-float -mgp64" } */
 /* { dg-final { scan-assembler "rsqrt.d" } } */
 /* { dg-final { scan-assembler "rsqrt.s" } } */
 
index 03a0013..bc81039 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -ffast-math -mips4 -mhard-float -mgp64" } */
+/* { dg-options "-O2 -ffast-math isa=4 -mhard-float -mgp64" } */
 /* { dg-final { scan-assembler "rsqrt.d" } } */
 /* { dg-final { scan-assembler "rsqrt.s" } } */
 
index 76cee83..cfa771e 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -mips4 -mhard-float" } */
+/* { dg-options "-O2 isa=4 -mhard-float" } */
 /* { dg-final { scan-assembler-not "rsqrt.d" } } */
 /* { dg-final { scan-assembler-not "rsqrt.s" } } */
 
index 7f7da64..726c354 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -ffast-math -mips64 -mhard-float -mgp32" } */
+/* { dg-options "-O2 -ffast-math -mips64 -mhard-float -mgp32" } */
 /* { dg-final { scan-assembler-not "\trsqrt.d\t" } } */
 /* { dg-final { scan-assembler-times "\trsqrt.s\t" 2 } } */
 
index 9c8017c..f6a854e 100644 (file)
@@ -1,7 +1,5 @@
 /* Check that we can use the save instruction to save varargs.  */
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mips32r2 -mabi=32 -O2" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) isa_rev>=1 -mabi=32 -O2" } */
 
 #include <stdarg.h>
 
index de082d3..4a11bc2 100644 (file)
@@ -1,7 +1,5 @@
 /* Check that we can use the save instruction to save spilled arguments.  */
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mips32r2 -mabi=32 -O2" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) isa_rev>=1 -mabi=32 -O2" } */
 
 MIPS16 void
 foo (int *a, int b, int c)
index a73e83b..d45fe50 100644 (file)
@@ -1,8 +1,6 @@
 /* Check that we can use the save instruction to save spilled arguments
    when the argument save area is out of range of a direct load or store.  */
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mips32r2 -mabi=32 -O2" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) isa_rev>=1 -mabi=32 -O2" } */
 
 void bar (int *);
 
index 13f1f04..ef7722b 100644 (file)
@@ -1,7 +1,5 @@
 /* Check that we can use the save instruction to save $16, $17 and $31.  */
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-mips32r2 -mabi=32 -O2" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) isa_rev>=1 -mabi=32 -O2" } */
 
 void bar (void);
 
index a7e82ba..0dd823a 100644 (file)
@@ -1,7 +1,5 @@
 /* Check that we don't try to save the same register twice.  */
-/* { dg-do assemble { target mips16_attribute } } */
-/* { dg-mips-options "-mips32r2 -mgp32 -O2" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) isa_rev>=1 -mgp32 -O2" } */
 
 int bar (int, int, int, int);
 void frob (void);
index 6bf8ea7..819938f 100644 (file)
@@ -1,6 +1,6 @@
 /* Test SB-1 v2sf extensions.  */
 /* { dg-do compile } */ 
-/* { dg-mips-options "-march=sb1 -O2 -mpaired-single -mgp64 -ffast-math" } */
+/* { dg-options "-march=sb1 -O2 -mpaired-single -mgp64 -ffast-math" } */
 /* { dg-final { scan-assembler "div.ps" } } */ 
 /* { dg-final { scan-assembler "recip.ps" } } */ 
 /* { dg-final { scan-assembler "sqrt.ps" } } */ 
index 4bd4a4c..d0dc040 100644 (file)
@@ -1,6 +1,4 @@
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-O -mips32" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) -O isa_rev>=1" } */
 
 /* { dg-final { scan-assembler-times {slt      \$2,\$5,\$4} 1 } } */
 /* { dg-final { scan-assembler-times {sltu     \$2,\$5,\$4} 1 } } */
index c6c79d8..440c28b 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -mgp64" } */
+/* { dg-options "-O -mgp64" } */
 
 /* { dg-final { scan-assembler-not "and\t\|andi\t\|ext\t\|sll\t\|srl\t" } } */
 /* { dg-final { scan-assembler-times "slt\t\|slti?u\t" 12 } } */
index 445a324..b295e78 100644 (file)
@@ -1,6 +1,4 @@
-/* { dg-do compile { target mips16_attribute } } */
-/* { dg-mips-options "-O -mabi=o64" } */
-/* { dg-add-options mips16_attribute } */
+/* { dg-options "(-mips16) -O -mabi=o64" } */
 
 /* { dg-final { scan-assembler-not "and\t\|andi\t\|ext\t\|sll\t\|srl\t" } } */
 /* { dg-final { scan-assembler-times "slt\t\|slti?u\t" 8 } } */
index fd6e932..4046066 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -mabi=o64" } */
+/* { dg-options "-O -mabi=o64" } */
 
 /* { dg-final { scan-assembler "slt\t" } } */
 /* { dg-final { scan-assembler "sltu\t\|xor\t\|xori\t" } } */
index 2acfdef..f9a25cd 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-G4 -mexplicit-relocs" } */
+/* { dg-options "-G4 -mexplicit-relocs" } */
 
 /* { dg-final { scan-assembler     "%gp_?rel\\(l4a\\)" } } */
 /* { dg-final { scan-assembler     "%gp_?rel\\(l4b\\)" } } */
index 5479c81..5a9fff2 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-G4 -mexplicit-relocs -mno-local-sdata" } */
+/* { dg-options "-G4 -mexplicit-relocs -mno-local-sdata" } */
 
 /* { dg-final { scan-assembler-not "%gp_?rel\\(l4a\\)" } } */
 /* { dg-final { scan-assembler-not "%gp_?rel\\(l4b\\)" } } */
index 3cea3d3..f232324 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-G4 -mexplicit-relocs -mno-extern-sdata" } */
+/* { dg-options "-G4 -mexplicit-relocs -mno-extern-sdata" } */
 
 /* { dg-final { scan-assembler     "%gp_?rel\\(l4a\\)" } } */
 /* { dg-final { scan-assembler     "%gp_?rel\\(l4b\\)" } } */
index f88348d..7786c6d 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-G4 -mexplicit-relocs -mno-gpopt" } */
+/* { dg-options "-G4 -mexplicit-relocs -mno-gpopt" } */
 
 /* { dg-final { scan-assembler-not "%gp_?rel" } } */
 /* { dg-final { scan-assembler-not "\\\$gp" } } */
index d52726a..c6bc495 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* -mlong32 added because of PR target/38599.  */
-/* { dg-mips-options "-O -msmartmips -mlong32" } */
+/* { dg-options "-O -msmartmips -mlong32" } */
 
 NOMIPS16 int scaled_indexed_word_load (int a[], int b)
 {
index c369646..e9735b2 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -msmartmips" } */
+/* { dg-options "-O -msmartmips" } */
 
 NOMIPS16 int rotate_left (unsigned a, unsigned s)
 {
index 73561c8..ac4c94d 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -msmartmips" } */
+/* { dg-options "-O -msmartmips" } */
 
 NOMIPS16 int rotate_right (unsigned a, unsigned s)
 {
index dada19e..360f3c4 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -msmartmips" } */
+/* { dg-options "-O -msmartmips" } */
 
 #define S 13
 
index ee06361..b8b8294 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -msmartmips" } */
+/* { dg-options "-O -msmartmips" } */
 
 #define S 13
 
index 8f07db9..fc087ee 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-mgp64" } */
+/* { dg-options "-mgp64" } */
 typedef int int128_t __attribute__((mode(TI)));
 typedef unsigned int uint128_t __attribute__((mode(TI)));
 
index 025dc21..9f3e43c 100644 (file)
@@ -1,4 +1,5 @@
-/* { dg-do run { target mips64 } } */
+/* { dg-do run } */
+/* { dg-options "-mgp64" } */
 typedef int int128_t __attribute__((mode(TI)));
 typedef unsigned int uint128_t __attribute__((mode(TI)));
 
index 0607a70..7e54aae 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O -mgp64" } */
+/* { dg-options "-O -mgp64" } */
 
 #define TEST(ID, TYPE, SHIFT)                          \
   int __attribute__((nomips16))                                \
index 51125a4..423dc26 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O -mgp64" } */
+/* { dg-options "-O -mgp64" } */
 
 #define TEST(ID, TYPE, SHIFT)                          \
   int NOMIPS16                                         \
index 9ea55af..2ed4f2f 100644 (file)
@@ -1,7 +1,7 @@
 /* Make sure that mul/addu is preferred over mtlo/macc and that mul/subu
    is preferred over mtlo/msac.  */
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=vr5400" } */
+/* { dg-options "-O2 -march=vr5400" } */
 NOMIPS16 int f1 (int a, int b, int c) { return a + b * c; }
 NOMIPS16 int f2 (int a, int b, int c) { return a - b * c; }
 /* { dg-final { scan-assembler "\tmul\t.*\tmul\t" } } */
index 0ff3d47..7e8be5e 100644 (file)
@@ -1,7 +1,7 @@
 /* Make sure that mul/addu is preferred over mtlo/macc and that mul/subu
    is preferred over mtlo/msac.  */
 /* { dg-do compile } */
-/* { dg-mips-options "-O2 -march=vr5500" } */
+/* { dg-options "-O2 -march=vr5500" } */
 NOMIPS16 int f1 (int a, int b, int c) { return a + b * c; }
 NOMIPS16 int f2 (int a, int b, int c) { return a - b * c; }
 /* { dg-final { scan-assembler "\tmul\t.*\tmul\t" } } */