]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
mips.exp: Rewrite.
authorRichard Sandiford <rdsandiford@googlemail.com>
Sun, 21 Dec 2008 21:47:38 +0000 (21:47 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Sun, 21 Dec 2008 21:47:38 +0000 (21:47 +0000)
gcc/testsuite/
* 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.

From-SVN: r142875

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 fef141772e20705e3cedfa7f44ade8dc253a2332..f47f4d047148d786df40573942c1f7d4a419f0a0 100644 (file)
@@ -1,3 +1,325 @@
+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
index f4828f439e7d43598438529cbecba7809f11e6bf..1f2affe48fc880b22f197092ce4c01c4607a0c9d 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 ab5d8f8c480402e9b3f0cc2749b3b262d2179a8b..9f9cb3a3483c4d6b37c594bbbc69061a0453286e 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 34214e4476a85c13ae38b4b4161dfdb33f14784d..bc597ab2d2be885a6327dd4d846ec274017e16cd 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 8c991dd9ff1e461fae2d5de523e1bf6ba196ddbb..fb715362e08463749962e90390cd35f9ef7db6b2 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 8048f37459dd5d9abdcedeea2f62bac1f1b29096..d825e06176e3952206dd504deac0ecac7de7e1a1 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 d4dc8fe1bba98a37df665b37be14c517243fe834..23f528ad63fd91b13f464b84e26081c4778ac718 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 40c22e08cdce052b911d6197b200f116423d4cee..05cb40791576d8f75b5d2bd6ec013675340ee369 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 42d2dfbfadad4d1405d2b5cf641a129c09d27995..5c86b6c8cf9293e369e840564f509e1a36cf81a6 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 80ca92cf1a10e2b1050f449865746329e4ccdd4e..9ac7a2735adf77189ba4addb8923841f6c0f68e8 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 5f71c85ec4ab5dc1323ea775edf8de3b1bc33fc0..e178eb0f061a8a5b9d1ff8932b4f447b6a0eee75 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 d6e60c251ff30d761b9999eec4458939647a238d..60bbf9dfc4095e8878da9c7e1908fda0a75ebd3e 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 ee7c05048abf881f51e48da8aba57bd3ff218bee..2c925b86031c1f661a614cfbc548c44002ddc55d 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 7a58457d9294fe6fa03c7d24a2ce993267afbe2e..ee239e1f85fc7264775156131f1153ab66c8363f 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 18a1218eb388beaa9529c8886a75174187086598..1aeecafe1c87df4b7c2b3154d0a8853b6b24218f 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 5afa136c1c5f86a29035d404d7b6e0c61d5a0a62..21dc82be2b5243a372b72d50d56242793ceb3eb5 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 561bdf4bb15e16748206ab235839b6b95bee3243..61e66c20ffc63f6b1baf52f1ceea0fb66ce95503 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 1197fa92a2738fcfa1dcd247f4a287313837bcec..d1812c16520643e8ed3e70b023de4811b50ce3c6 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 42935bb02150230c6975b2bef34e523a2a5fd653..849bd923261376f733eb6b2df0f0e3b1f5112bce 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 30ceb73f461f157543aab978cd04c9ddbf9453c1..6ef55cde25e54c85ccc90dfd4f4eff0a860b46fe 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 97e93bcc0ab6425dde4cc55cd2e3e807d3839ea1..bb89e84f239e7973caed12a8c11582c400f62d42 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 9aa95c69afaa196ed86524234d931761b165c159..ab2c28a73215e4dd71cf6ecc4ab51f5215d5f171 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 ac8a7d80286ec3fc2bb0248799238cfe3d7a09a3..312938ae57d4c18a489fe016cc9a97419f0dc2b2 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 2d9368a8bd1e3eb525102b23de6c7372bd85d1de..426cbb28573d939c8dab86777b7754cf108b7709 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 77df1d2ba8718e1b4f16d3c4fae9b8421dd6ae6a..8186b84a27f21e68813406ec83feb8fd13962567 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 e72974befc75ba72f18790d380ee7b4b3c17feaa..76f3b86ec5d9e516c93e143b23096a61048090b7 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 a6dbfa3dfc7e9bbdeccd26f81b877bde4b8b5ccd..6ac908a71bb31efb0585427195da36be1f6789ce 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 4bf16e175a9bb74ac23c9308709b06f1d3c66187..e1677b6577a31709389b88b8f0712d5587089751 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 160f9aedd3b6126ac8ee0492658a8021bbaf2e13..f767ae202891ead9e96fdc7ec4b77ea21e6df28b 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 7e1efc85ab98cb54390570c9b9ad4f198f4cab47..b0779e0ec34de27f709971e728df6fb6189ba560 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 8d8fe095e34fd403ea2b008fa4f9f5fe0a57ecd6..4a690f59ed159f3026df691e125baaa9834e27ea 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 fd7d0364bd79fb71e3f7af21e86791fc408e7eaa..bb5fd743af79ea9bc954dc039fc9873f313938e5 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 900a697c99ecf4dfc95dad4a8422eddfb3787dc3..bac01913405d21f514d9ab9d4c922fe1406fc824 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 de74e9724ee8aba62333ebb3debbaa5f2eaac93f..bec7951c1d4f5fbc48171612bcb16af8371f5969 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 0c962ee267f1da49f238ab3ac1cafdd8ba013a29..864ab8c1ee4cac3fd89164a1493b245339a51fa8 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 15a0704f2c98341853cc171ee9394e63589a69bf..62fd70f5f09e7fc8ca96aa364c11472cc6945ba1 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 1f81e5bc66c491d0c0f67eacfb7556aaa825e4aa..d8bdb4516decad9941a28a7075e5321ab7957cdf 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 bbe985695da9325f951d2850f4a7f552aa1bda47..d4b558e0115f5c9ae3f2ab330eec42559588bc43 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 6e990a63fa6fbef392249484ef29e9efdc8df70a..d48ed263c82661d3c1c0bf53f5958b1a92f87c71 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 8373c42d949b83f3d1ae8b844be359862701f2e6..88afad339c9b72130e6a1edb952786c0d19bba02 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 adb32a2eed1317eedbdbaf0d4f1ce038d1ff175d..513fc6130a545911401a32974ac97367b8d28b67 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 3c217b984cd0f4e924583a4becd6a63b53898e13..ebf3ca3056214a32c564c2fcad00aa2e7df83afa 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 528a30bbddd078b049a20394857129c767225f2a..93f78134e4e29260fd98a037668caf1050ebfc79 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 f03a7a0614750d4bc95d0d72d8d5edd524741f42..554975ccca18c1eb6df30bdfa0c4d9693d48ef85 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 038dd5ecd49318f23890cf2ccd47b52ff6a5b77f..4f27041bedbbc1b7054d709b7b6a817b4a116edb 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 4318943049692c557f345448a89e80aed996c680..207fc66b062d20b26b48545bbed4f5d9708dcfda 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 7acb2374d5a63746c1e87169bf50c927432358fe..be32b57ae4f5ef307a9cbe08889d82695c1e9246 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 86ab8a26eea2d76e3260621c5f6a99231a1c7810..c14e949f229dbc61ed7a26cc766258f8626988fc 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 2c75deddeca195ac227f6ff86229d782a04a95ed..32861f9750bc5343f6de08c2db80a353132391b6 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 e7b9251ceb4936b1326e41c3f3d9d614a63a4e7e..2555d5306d7f2810d1ce2aebc448f7007c9da801 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 5089b99e08dcb8d920c5eb422c8041857325d2a5..964dc222291154f5a311a882ba6c2d47e37f2a2b 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 55183396f07cb3be2c012244860a8e79a6e98e79..68724eb376f7c63f2a4cde716659a22975aa525c 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 48840accd62909c921b491c6c82ab8ca9b638ad8..f4eb492e4e46d53fbf20189c32ce48f95463a685 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 aaeba4f2836f8209179ef2ceed89db6adde1ab43..18708cb450aa64e74c8b1d4daedd746237fac179 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 5cc32cafe43e42c38591f155bf19637fc2d7c4cd..d3399d10ceec61acc93f8fa509e5276d34c5f826 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 91b883d46b5ed7b8773885d2dcf066b437a0f188..8b307c6e621eca1b3fc8db977b596a63e5ed8064 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 ff4e975618cb33ecdc685190886ced95fcf44afc..a2e2fbfefe305d0085e5b8d2caa5b70c8a4fde93 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 08208f2c2d7f78d9ef5281581d030829da1dad8e..2fb16aa1d07f7ab36ee48ecb0c3961d1d529168a 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 19e66f96b7829e9764bdd9b3c19cec1a3e3f97a6..cae48a0e93adbd4d87458afdb40e58aaaa97c9ab 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 9c1090bb4bac89f93ee8b3600ec82919be9a295a..3e1c259f89a6ba006c0f12447127f4bf0cadd0f7 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 db2190d18dc11d762c3ad750625c7b26777faed4..92977e04e38d9555ca28bde58e40912f0212faaf 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 fe21ee2a1d980aac05dfab58b56c05c196582227..3f4f833ba5eda978b627fa404edad9380248ca83 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 a32c6874eaf3af908d846aeb5ee31630467cda70..34784d01ce2e1a1541c31e146441003637b05c04 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 4f26f0694e44f18374835d05264845491633e279..282cf761b374a1ff86f21d5c58a00a0227411e74 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 7159d381b85013d7f5ae4594f0ae495fd1dedd77..848e5ea25ed0882b1e95ec9af2e82e8ee5d29f80 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 f1933feccc12f52b9ee88c160e9f361803c5faf4..7f2611397ba805e2fcfcec9bd324e1bc51608af1 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 4736edd24ee88bfb7917c160e737bf2943da68b6..3abd10417d77c2c820ef9328d8e33f483823706d 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 ade9e5e9c0a36f8c3b8d390ff16ea6cb71b01461..8b6901b7fc7d4f8960fcbb44a960ac303730c698 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 c12d08e05214c18e329a4b638c981d1bb8bdb764..74df7de1481215e308aff42820912928608d9e11 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 eaae78017542b7e68e78dc88222b9d8222cd72e0..3a03ba3491b475eb3ed2a40bc9e939f869816409 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 faf50fc69ca1cafc01abcba3012c8665844fb823..b47a2ceb2db71a1c29b0283a912997a4e7bad874 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 b53f4b05b61081e3adb6f51c71a679476e191105..78a12440a2ed347d4063326829cc999d54e57616 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 77047af60b953e1ecbca185282f5835b360c9845..9e19354d1a600ef143746490557604b4fb2db878 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 62e659a93fe98c01777fa8f86e276bd5a8f15b79..485555c39ffea6925380035d9d3293df6fc786df 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 325bfceb029d29d84815d19faa1d91c3960caaeb..eba7983707b5dd3c6739eacbbd3d10d1d709eff7 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 761be46e0327709981891e44a66192d4d3513c66..e85727c42d7bdceb60c884376bfc7e6e8976d31f 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 7d2d5f16150c57d5f072c6363ebacc645fb5fb29..5e554c497d86e6d912c11e1fa29fa0a97d55f1f5 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 d8293b28844f7904dc5fb1f2258fc1e9f9dc0611..fd7289ceaf7107d6eac91ce72d750455c0cd0268 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 4953292c0629e811f5361afc5d5991816f634692..6f1f13875514245c03d39b6f3c6fbdd0bde81bb1 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 e4cae5ea61df8e5c0cd37724e3290d5a44039283..ae3565f479507d970daf8ba5574bf2f02c05fb59 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 c0cdf495896808f9986aee398edaf166f5f2b16f..53881a4b08587f034099f26d84a4be78344dafa2 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 daadd416c035249b9469a19d679eb27edf6a217f..eab7a68454c369f26a608095b97e3e39159c359d 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 8526a5e18063326b563ea034e5e59634fe125c7f..6b479f59c718391ad7dffc1a01706efcf33cc76d 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 8bdf99fbb24861d59681b82bbb3a3264fdbb1bf2..f325af74698dfe086112314f4961642c1d9cff8c 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 780194dc7e633be23a8643d6e0227bf7b19a649c..1ad1c91f3e1eecd22e9d3c906f2dad73e7a315a4 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 bbb6783d4a0c70c287a55c983e532f23e88b286c..4e5afadceb25884ae9231c380a12ba5d47b95962 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 bcda15cf4554734967c2c53b23e7c3b1f90b1a3b..93ed0fc6f06ae8d0e5dbff40cd9d4fa32d4beee8 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 0fc680e5979371bc878e820cc173b43824b5ec2d..35092a8ad935e321e28b7b4cebafb03008301a3f 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 254f3e75d542a70798b2b36e9399b5d196ab71c3..04161ce3a2188de7f9ea261c458b9f9b83a149f2 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 fc1574e96676578e1ee0ef2e90eb3d50317d8474..a9768f15bf8841871656d16f2c84f5ee899e467a 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 b3cc5105554da85a8b01d78751f270d7cb0f8130..b0b4817a47f4b638555c3499cec7a6409bf89a7f 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 2bc54f864712fe91e92a21442d3a55a64bdae3a4..9c1ccd5f926716be473a2bac7c224616e7292301 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 4e50b20cda6a5d5a5622d2bceaaf64a8d1cbce86..f3eda7500db8d5f5aaefe71fc1bf2d245ebd3caa 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 393ebfc71e9da4b1d06dbff3db09c70338d13dbb..eb3f8f9a864934f11edfa1bd2f6fdb1d0434827f 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 3c8850bb1aa2fc8545747fb9e4de229ea27691c8..dc815748ebd74191475f48e55806331eb01d5f82 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 909a89a244078411b996cf632335aa4cab7245ae..7df590f5c308b1b2db32d8cb2a4b0cc6fe54dee6 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 058ff2c3c8ee00d0f2ab44782fb44384750dcd2e..7f9cbdb1b8453cd07142cdba00afe05366161719 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 a98e579e73195ad29eafc1349a3afa1d74f2e84f..c07dbe50580555344fcd2e4940ac9335f94661dd 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 30715ea31a37627b2efeb2bbfb2d3b2587a9ba6a..848414540f0ec1a7ad9e4257b7936daf80e85e22 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 0eef933b2ee2534ee6fa144d9f2df0cf7e0dd0c2..d5d09f99869a2da9a53acd4169e3726a08ed3071 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 042a73066b13342a1138ca08573b08639ec840f0..c80f2b9c893130015405ff4c1752a82146da1a74 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 fdfedcbeae31a10f7ce0b905b6e0553c4ee3c7f6..3875391b5359e8e9afc64af9acc1d1a7781b9eea 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 c47b57dc5c5936d847aba3f3629640509dd069ac..9e6c6600617783f6e8b5f812880994d591a9a910 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 d7b33b1afc81eb4eee5379e9f2f6dd2d2298602a..baec12c1ce6f9c329acad301d54612c0ea1defce 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 a7c9545df3f97afde5659f99a22f778a2f3c5e09..e9ed4c03f5f7dec3628aa96ad9d5ea0bda1bb682 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 54efb80e464e42e63319229259534bb124bdcd29..b4452d09105c7b8fca472fe3ad86b7ea84889695 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 9b748887adeb55d9d6c27710793e779e0a238bff..94d2f80efc7591b31769792a8e6d147bf82f5e0f 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 fc198dc3d0982f5267c5b3bf4fc39a3696e94edc..5b8b2522866268649d640e7df1b927b8aba2945a 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 cfec230ceb120af353c32b55c32e54ae5a647e5d..65a1104ba39f086a7d2e843154228b693e149e9c 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 07ce7741b0643dcf985a9b4b53fa8129fcd196ad..f7988553394a231349efc42de70102f5cdcbbaed 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 df1cec707aa5f060e16d6039ec201bf28c6aba20..2a10f91bd54e3948b637387532e242b88e70f6be 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 92f14e1f3bcff2c517c8613469c8df061d29f00e..c0f9d332a5944053693e7f3da910c1e4631dffa6 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 8e66e0a1901e010a92bd1fd9594963f3f2f5d94d..e1496d9d6a7f8d52367bdba5a6e2388abdb31a1c 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 edab378c218138872080ddffa7816b6109783bd0..bc81cfa7e03727602c908f55d8bbab57817befbd 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 3b4e10777a42ebc7e2652f8a76696022d6ccb18f..747450390568cd617ce90627ce4aa738c1141b3e 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 96945e10e8ce9ae241ad08d1d8a29e23440d4f0c..28bb9aae7fa23efe2514b987d5b5e874a7311ce8 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 df43c415cd1b709939bd6f3db8a6bdcb55850fca..d077f2fae6ed21d65d0afe5c5f7a4de6d5f901c6 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 c82f68ee38f8cd72f68e26a95814a02048ecf0bf..e6a271e246bbf2bb641c757a7a46e2ceb76d545e 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 f0f3fda403ec1de5045cf7f8da1d3807b05a2122..cbf347b29c9d35c5c827de37e0b53e436032a2c8 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 08f18da6ff20acc8695abeda72ad948f57480b56..c00ea3e0b494aeb47764bc252bb0c5013245de03 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 5d231983b22b6eaa04191575b626260fa620aee0..9501e9cbeac31f5592d0c2dfefdcd717cfea9125 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 31cf22cfcd42182ad304796188e5ca50df86f10c..1b3031ff19d3ceddc87a1b63d1b82fe3ae970afc 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 9257612cc17194d7b73950dd7e46f979939ed914..cf57323db1acaf07114d7e40bdd6ee95cc819c10 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 1f216b7937e91d9f833dc6d2bb78830b280f343f..1a930c9ac06cc022b766e71df8929bf9e5f7cc36 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 bb578099a5b86f790602f2e09b33e92e215adb71..d42acc1d77caecee2dd2c9b5a6f77631357d085e 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 c3e0b422a307669b8ac98df639217d1a203ce9a8..e6481777addb0076e34c23e697ed55290aba9bf9 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 ec6bbc5faafd8b3fbe424377bdb3927e690e0903..803ea77df742e14a951ad772996d879c6d2ab17c 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 09c22e76632b410ca6b65d3aeb2c885b224ff06e..e6cdc2c1a9a91aa566fcf44cb6059dab509c800d 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 97dccf2fd9724cb125d0292e69db54b0e3ea6fbf..c44f34f4f0eccc5149a85648e4c10e167f4237eb 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 df08a6304a4ad42dcf2f3a8fc1e67049a1c5e591..d41c31299144ba145fd72e9a4d67099c0cc896b7 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 675da64a5e1ecd5bc0fe8de7404b8d489964d98b..dcb124a71983cca773408d2f3818754b83c6eab3 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 afe01cb516230908191036a523987fec005dd308..ee4ca3d8da0631860ffe632fb49065de798806e7 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 df195668701a19f56e81865db087b6de0ea16887..ca90cee9ea56cb6b25092617150c17f1b2469ac1 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 7517540cdc46ac704a46d7277056903f16233851..49d67f24a6c9a7cf9255915d20ea41dbe0deb726 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 187cb71c7283816a5bdaa4a89b958fefbc98c23d..ae80403464400df4db4308d7e8cb207b5e714ae6 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 36cb91bcfa542da237106816e4cf9f8a8fdea131..186dc47d6f7225bcbd9f2d282eaf175f291ff668 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 ee5dd6a9cf902cdf460b51327921074908d3377e..272c64818e31a69157cb08ee757950fa6cc2cb12 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 fb655db87308c54775b3f3b81a6cc36dc44cd291..8f5fd647b37931e6a0b208f389d339a7a2df338e 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 f8bc5c93ef417bc03eb45e9c66873fad7efb9819..ac0cc1ef79b1666ca8c49346d4105faf730f7b1a 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 d65c44cf9f9743f09e0eb17d7d97230763d5e8af..c954b444cb021235706724e47fd86cba3f884968 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 bde44e54366aff65d72af67a35a3c64ea7ee1624..f4ae791f1a0e325913474b9fd1d48bdd726fc956 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 f79216860bacf1f56d51e6fe5ef3a18ddaeb506f..b9aa21fe4f4c6a91e7e75f0e0e1705cc93ae517c 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 e5daa291af05ea0fb0fca00bd361d33f9e85f254..20691ff2c4b9a9d8ce456c0b2ae26d5171ea19ac 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 5ef08da6f3491332c8b39b3f62d6fa148461d7da..67125f78a67171d04275d4399cd7c97e2e3335d3 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 bd3b10ab69cba7fc65d210ab151beb0aa772db0f..123d48799ed8160e219f690c0e0d77ad64085074 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 cce3710881d773bb4bb80c78f9d987136c7fc20c..90e4d838d892e46af34a67349b8ea3142f84e25e 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 381fdef08fb4845235e1f41422d4ce99a03394e3..df726186128a83bf8d2f4bd381e43724963dd0f1 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 6d1d7e8c0ecf43ab766cbc9aff4d1209c5a9be07..ee7f3d54d5d93b685a7d0daddcc4558e955f7359 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 6433397f4e3cca3f4e774a4a2b39ab716418b86d..d1f50a8fbefc3326b0bff132d4a81eb8e0b3aa4d 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 97aacc58a2a2e5ab2eeb5795255b340ad3e15e1e..8dd5be1676598668967e6d10db3a4596311afc68 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 24fd72884e7d77e29f8f6d079a2054ba3b62b6f3..6629dbb5844889576dee181a8ffbd1075d152d64 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 6be7ef58643c777fe8d55985e1f49501a47d0a3e..55bf23eae4e74ecb849d201469bd53fb7519ed33 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 fd01f12181d5e9f1ec72b03d03cf578b293fe41f..bcc37d29e34ba71dc9f408adef2f2d700f34c3f8 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 27dc6b3d2b745d15528dcbc524219a133911f3da..ac85e23784640268aecbca43d81c5a8e63dd34b2 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 c60ee933ffab27b98afb4cb0dff1745213445d65..2dcff0aad1c11d1a2b7434e10ea56d2ad00eca26 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 1cbf7a63c5186de334194caeaa3d2648bbdc6f9a..b8b8c1bc32470796d9842c3b25649ef1b18656d3 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 2e8e4e61033fb5b7ff87ccdedc819f51b6476d7a..6b2308c0bba51683ae6f79078234d9a9ed77fed5 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 bdaa0b927ef411ef2c1ddf4886c9d15e91f40feb..b0f4be143fc2fd21f9ab471493891751c11d3361 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 7847cf9411b246fd82991419120d3af7f01f5dd0..fc5df639d02bc4d64586da7cc2b4227191ef681f 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 d7610f82e3277554e13c14b4d2a2480472ff7b1f..9d0e9302a54e0b2facf8bf9f3f138be7c76a9c22 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 475fa21e8dcd06752081862073aacd5c4bdebe37..7e6a578a19ceec9e310416d1ac0ce951ea32a12d 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 31251e74763b7ec52db04d7a393c8187ec9471fa..e7a4738b96fbd97b6264f33dc667fb3096eb97ac 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 2554af6c8218fbb036f92851f844f45d69e8b67e..54d2e9c04aa5a22c3280fff09b5e80de3e800a6a 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 3199cd7ad2ad3e6eecaad76e749808a6271c9551..c07660a2e66ee1f231cd979fe91546fd0c689f80 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 994e51b77387c3b131fb44d32a489b0f800fb279..83e068c54fd3f12b89c20dfb6696286b4696da30 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 522d0eaa4e32f19f2a4bacea61b3f5e10f40b442..899f145844bdd5469766f96be065994b738f1ed0 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 88a71001be9e0e9ea02c4e04205c167d530c0bc5..e61bcb361c022af5124d6d0c0d92aabcf0324918 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 bf90f2791749147d3d17c842a738d488f17fb57a..25c2e8d4c83a1bec2757ee2415ee6316d0a72fa7 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 e19c93291a26125de39a86d9aa62143d56c673e7..ead5888cc079167247835b728df6b8ee4a3cc547 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 34251e47fdf805b1c2f93e4d64d9400415bc197e..78e761f71c5e638b2a26911fa826350f64f87679 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 a550480ddd7eb53ab97cba5b8368e56ad0d0ef21..ca6a1e6984d806a5fbc2dd0d04028685f0f2a7c2 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do link } */
-/* { dg-mips-options "-O2" } */
+/* { dg-options "-O2" } */
 
 volatile int gv;
 const char *ptrs[2];
index 3cdcd4a72cac4f25a12c8bde223c61e705bab6d9..2da436f71b898ec0ccc3b98ac629cd191e404c84 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-ffast-math -mips64 -mgp32" } */
+/* { dg-options "-ffast-math -mips64 -mgp32" } */
 
 double
 foo (void)
index 34300980695f8eb4aa0b1c8edc05fbe014c831c4..9ecc4d06ea6fb9f7f6cc6c97c2bac5ce6054d3fb 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 a356b787035a27069898a6925566532056db0c66..14e3a75f1bb24bcad8c17a94f201da247e958c60 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 fd13d8ac876359b3513485e31e6e035f82ef6163..b271e2bf416b152f60842d4d9f2ea583abd68b0e 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 405d7fcf033196ab1c12bde2e1d90793bb8640a2..68c4b7ef2392103540d44b28a93c7ca5866eb263 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 be6816fda9be972e6c5c649e5a03d6b5d1e4b2d4..d1082d910d8825a10282649a7e14bb73a8215704 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 7e8026f1e5f7b8c359d9d66f531ab291298f2475..d4163910900b8795ceb0bf4cc17a6a351802dc72 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 fa5a416ce200537191dd21673655f487711d18c7..3e955abf549bc7100f04e574c4826138b7b9ed7f 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 4d807833abb4bb9e24f47255f87939d864091405..1fdcee0e25a0fa5dbad02bd7a1f139f2e6407cb3 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 5b03838ca2c0b6272884c1b8d1dfff20d0704b2c..a3e7f0db92c42da813c6be2e4d5d6a5b42c3c6a8 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 ed439b143f5b7042ad48ed5ad7870f69e41a8df4..3d06d0ddb6e9382b344bf50b2df64b16e06f65a4 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 8238f39b04c9af593385b6a08f4a647f12ad7372..be2c7fbd76e597bc19808b6bf2699839af967fb0 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 e8280e8af273b25714060a0783e160ef1b5c1e63..9dd23eafa781ec199a4c59f29a90982f62f8ef58 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 6e21ec3e3938ad80145caceed4ff725c7e41a072..a6b53a9ea3483d3581a54d90b2c096571d5ffc1f 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 f014aa0dcdcbc2a270468c05f432764ea4556756..c52caaa1ad2696bca86f65d2968a8fbea5dc106d 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 c98b4a8a0fe3ae1efb4687fbf5f12aa796737d53..3f738654cc166e04cf3f8e8ae719905546e62825 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 5394ae8067ee8c306f960b0df34c0daec1596df2..394bf486f3829529706c493f52686c5013a03f7e 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 cf795b6e7326d8f878f0762ad5051c228a25572e..67b52f92d35be897aa214543af7514d3a413a0b0 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 393f1086e072d7e2eb9cee41c1e75601485a0b34..4dc2b003f358080c0e001cf36f10920a89a66632 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 4cc6212c351d1bce23eeef34cafe913c4b351e08..f0a9b3aed62429978d2290fc5f5438d78de7ac36 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 03a001356f0b6074277daf629c2cda7cbd18e62d..bc81039d523a125bc6f2747fec20f0b450e59022 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 76cee835eb6d17ba6387c04c910bb419396c99fd..cfa771ef86be6de1c53beb063277a9c42e7a47da 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 7f7da6452edf8393d60304f959720ffa9d7d9c3c..726c35403dcb9e8b61b1d3cca98301a61d4f70f2 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 9c8017c7c6595886e02e1aaca94ffa1c139a5118..f6a854ee9f3b18f5742c77af76a7f1e6ce8b1166 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 de082d331cda9d8a5e809aa24b8494add6b393c9..4a11bc2108315da84b0986789c8a6398f1dcb52b 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 a73e83b9fffd3be109d0e7ba70a91f39974e0d3a..d45fe50ea6bd75bd5b6a21bd0a6ca75323346911 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 13f1f0454ee74c94b6ee35d3f1c593be2f4264a5..ef7722bce0948793bdeb7239434fdb426906b674 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 a7e82ba144fd4159b6c8caae4c30a97a53db4cf3..0dd823a68138040b04be0a1b47af765d4e9c334a 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 6bf8ea7abf8ebae976b87e73dac7b8aa02cf867d..819938fcdc0f67ba73fb1d6fce44d51d3e8e0486 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 4bd4a4c2fb20e46fc43a50d23dd41e1f94e25024..d0dc040151c0fe72de68bc70b659351ebf625b5b 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 c6c79d8cb61e1d5ca77a0b0318635a25d70626c9..440c28b84bf3bd4aeab6aefeea04e6830eff0af0 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 445a324bb8a4d832b54fbc9d95c237b93af6a3e6..b295e782c2df63fb0a6042e441cdc9fe66caa29d 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 fd6e9326789a50f0e7265e1340b0c5f3dc3ed25f..40460666c7f2815910407a9ead7ac3d344c9a0d3 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 2acfdef384d71149b728f8174d72121556006223..f9a25cdc9f789e6787febada683d5c70e51eeb9c 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 5479c81337513a7a6a8d43b939b1d367c0965766..5a9fff2da1da1772796a1bf5d0508f14590ce77d 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 3cea3d3e70cd6a5067c53e26eaa8e2ae9f874445..f232324954f40511f52938dab67a373f3fbf2ebe 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 f88348dcadbb9087052192cb7c01e684b3f040cc..7786c6db9e4c1465c075d0f4d213a9c22e1ef913 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 d52726a45f93052fc4af8692de3277552ad63691..c6bc495c8de4c121848d3b68b73d2fab3623943a 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 c36964624f52c2358b612643fb8a2579d359fddb..e9735b20a52e135c2b8999310dab90f8199a7cd7 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 73561c8b3c172a7c936a7ef190e3dc98fd7e93f7..ac4c94df8e2d59b433cdacbd65d67f13c0a26436 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 dada19efc719068b825d8a97c41efcdfdc70ff29..360f3c463ff39ccffff897488a5eb9bb3a175633 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -msmartmips" } */
+/* { dg-options "-O -msmartmips" } */
 
 #define S 13
 
index ee063614d7406c63f0593b770a7299aaa459993d..b8b82944540566480eef1b2510e61822d2f5dbd2 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-mips-options "-O -msmartmips" } */
+/* { dg-options "-O -msmartmips" } */
 
 #define S 13
 
index 8f07db985590aa6409043f40cc865eba966c625b..fc087ee1c351663d76fd03a0fcd4ce6ad8e42786 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 025dc21810a2dad0f4cd3f9f6717218c141aa5fd..9f3e43c41bded6487b26bb13b8be5f8513c85912 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 0607a700482f7db84ca4e8aa43d5882aacac1b2f..7e54aae3ebaa67e2bf083a8a9f670bc0edb29946 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O -mgp64" } */
+/* { dg-options "-O -mgp64" } */
 
 #define TEST(ID, TYPE, SHIFT)                          \
   int __attribute__((nomips16))                                \
index 51125a4819020a11475f3bfa4926814c3aba4a66..423dc26f4dafa3232a8f1ad5b59aea005b540a51 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-mips-options "-O -mgp64" } */
+/* { dg-options "-O -mgp64" } */
 
 #define TEST(ID, TYPE, SHIFT)                          \
   int NOMIPS16                                         \
index 9ea55af44a52a591b746766f9030bdedd8ace9a1..2ed4f2f9b064a7f6995aac13eb9947de7e9dbb8c 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 0ff3d47de7019c967587ec64e4701ce3d2287635..7e8be5e42837db353bf100bffec0f6185e26107f 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" } } */