aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/mips/mips.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/mips/mips.exp')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/mips/mips.exp83
1 files changed, 63 insertions, 20 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/mips/mips.exp b/gcc-4.9/gcc/testsuite/gcc.target/mips/mips.exp
index ec0b6f80c..abf66d33c 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/mips/mips.exp
+++ b/gcc-4.9/gcc/testsuite/gcc.target/mips/mips.exp
@@ -234,6 +234,7 @@ set mips_option_groups {
dump_pattern "-dp"
endianness "-E(L|B)|-me(l|b)"
float "-m(hard|soft)-float"
+ fpu "-m(double|single)-float"
forbid_cpu "forbid_cpu=.*"
fp "-mfp(32|xx|64)"
gp "-mgp(32|64)"
@@ -242,10 +243,18 @@ set mips_option_groups {
mips16 "-mips16|-mno-mips16|-mflip-mips16"
mips3d "-mips3d|-mno-mips3d"
pic "-f(no-|)(pic|PIC)"
+ cb "-mcompact-branches=.*"
profiling "-pg"
small-data "-G[0-9]+"
warnings "-w"
dump "-fdump-.*"
+ ins "HAS_INS"
+ dmul "NOT_HAS_DMUL"
+ ldc "HAS_LDC"
+ movn "HAS_MOVN"
+ madd "HAS_MADD"
+ maddps "HAS_MADDPS"
+ lsa "(|!)HAS_LSA"
}
for { set option 0 } { $option < 32 } { incr option } {
@@ -864,6 +873,8 @@ proc mips-dg-finish {} {
# | |
# -modd-spreg -mno-odd-spreg
# | |
+# -mdouble-float -msingle-float
+# | |
# -mabs=2008/-mabs=legacy <no option>
# | |
# -mhard-float -msoft-float
@@ -953,7 +964,12 @@ proc mips-dg-options { args } {
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 "-mfp32" "-mhard-float"
+ mips_option_dependency options "-mfpxx" "-mhard-float"
mips_option_dependency options "-mfp64" "-modd-spreg"
+ mips_option_dependency options "-mfp64" "-mdouble-float"
+ mips_option_dependency options "-mfp32" "-mdouble-float"
+ mips_option_dependency options "-mfpxx" "-mdouble-float"
mips_option_dependency options "-mabs=2008" "-mhard-float"
mips_option_dependency options "-mabs=legacy" "-mhard-float"
mips_option_dependency options "-mrelax-pic-calls" "-mno-plt"
@@ -998,25 +1014,20 @@ proc mips-dg-options { args } {
set arch "-march=loongson2f"
}
} else {
- if { ![regexp {^(isa(?:|_rev))(=|<=|>=)([0-9]*)-?([0-9]*)$} \
- $spec dummy prop relation minvalue maxvalue nocpus] } {
+ if { ![regexp {^(isa(?:|_rev))(=|<=|>=)([0-9]*)$} \
+ $spec dummy prop relation value nocpus] } {
error "Unrecognized isa specification: $spec"
}
- if { ![string equal $maxvalue ""] && ![string equal $relation "="] } {
- error "Unsupported use of isa ranges: $spec"
- } else if { [string equal $maxvalue ""] } {
- set maxvalue $minvalue
- }
set current [mips_arch_info $arch $prop]
if { $force_generic_isa_p
- || ($current < $minvalue && ![string equal $relation "<="])
- || ($current > $maxvalue && ![string equal $relation ">="])
+ || ($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$maxvalue"
+ set arch "-mips$value"
} elseif { $value == 0 } {
set arch "-mips4"
} else {
@@ -1025,8 +1036,8 @@ proc mips-dg-options { args } {
} else {
set arch "-mips64"
}
- if { $maxvalue > 1 } {
- append arch "r$maxvalue"
+ if { $value > 1 } {
+ append arch "r$value"
}
}
}
@@ -1058,14 +1069,29 @@ proc mips-dg-options { args } {
# 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 6 or better ISA for:
+ #
+ # - When the LSA instruction is required
+ # - When only using compact branches
+ if { $isa_rev < 6
+ && ([mips_have_test_option_p options "HAS_LSA"]
+ || [mips_have_test_option_p options "-mcompact-branches=always"]) } {
+ if { $gp_size == 32 } {
+ mips_make_test_option options "-mips32r6"
+ } else {
+ mips_make_test_option options "-mips64r6"
+ }
# We need a revision 2 or better ISA for:
#
# - the combination of -mgp32 -mfp64
# - the DSP ASE
- if { $isa_rev < 2
+ } elseif { $isa_rev < 2
&& (($gp_size == 32 && [mips_have_test_option_p options "-mfp64"])
|| [mips_have_test_option_p options "-msynci"]
|| [mips_have_test_option_p options "-mdsp"]
+ || [mips_have_test_option_p options "HAS_INS"]
+ || [mips_have_test_option_p options "HAS_MADD"]
+ || [mips_have_test_option_p options "HAS_MADDPS"]
|| [mips_have_test_option_p options "-mdspr2"]) } {
if { $gp_size == 32 } {
mips_make_test_option options "-mips32r2"
@@ -1087,6 +1113,12 @@ proc mips-dg-options { args } {
} else {
mips_make_test_option options "-mips64"
}
+ # We need MIPS IV or higher for:
+ #
+ #
+ } elseif { $isa < 3
+ && [mips_have_test_option_p options "HAS_MOVN"] } {
+ mips_make_test_option options "-mips4"
# We need MIPS III or higher for:
#
# - the "cache" instruction
@@ -1105,22 +1137,31 @@ proc mips-dg-options { args } {
&& ([mips_have_test_option_p options "-mbranch-likely"]
|| [mips_have_test_option_p options "-mfix-r10000"]
|| ($gp_size == 32
- && [mips_have_test_option_p options "-mfpxx"])) } {
+ && ([mips_have_test_option_p options "-mfpxx"]
+ || [mips_have_test_option_p options "HAS_LDC"]))) } {
mips_make_test_option options "-mips2"
+ # We need to use octeon's base ISA if a test must not run with an
+ # architecture that supports dmul.
+ } elseif { [regexp -- "^-march=octeon.*\$" $arch]
+ && [mips_have_test_option_p options "NOT_HAS_DMUL"] } {
+ mips_make_test_option options "-mips${isa}r${isa_rev}"
# Check whether we need to switch from mips*r6 down to mips*r5 due
# to options that are incompatible with mips*r6. If we do, use
# -mnan=2008 because r6 is nan2008 by default and without this flag
# tests that include stdlib.h will fail due to not finding
# stubs-o32_hard.h (r6 compilers only have stubs-o32_hard_2008.h)
} elseif { $isa_rev > 5
- && ([mips_have_test_option_p options "-mdsp"]
- || [mips_have_test_option_p options "-mdspr2"]
- || [mips_have_test_option_p options "-mips16"]
+ && ([mips_have_test_option_p options "-mips16"]
+ || [mips_have_test_option_p options "-mmicromips"]
|| [mips_have_test_option_p options "-mfp32"]
|| [mips_have_test_option_p options "-mfix-r10000"]
+ || [mips_have_test_option_p options "NOT_HAS_DMUL"]
+ || [mips_have_test_option_p options "HAS_MOVN"]
+ || [mips_have_test_option_p options "HAS_MADD"]
|| [mips_have_test_option_p options "-mpaired-single"]
|| [mips_have_test_option_p options "-mnan=legacy"]
- || [mips_have_test_option_p options "-mabs=legacy"]) } {
+ || [mips_have_test_option_p options "-mabs=legacy"]
+ || [mips_have_test_option_p options "!HAS_LSA"]) } {
if { $gp_size == 32 } {
mips_make_test_option options "-mips32r5"
} else {
@@ -1254,7 +1295,9 @@ proc mips-dg-options { args } {
}
if { $isa_rev < 1 } {
mips_make_test_option options "-mno-paired-single"
- mips_make_test_option options "-mno-odd-spreg"
+ if { ![mips_have_test_option_p options "-mgp64"] } {
+ mips_make_test_option options "-mno-odd-spreg"
+ }
}
if { $isa_rev < 2 } {
if { $gp_size == 32 } {
@@ -1262,9 +1305,9 @@ proc mips-dg-options { args } {
}
mips_make_test_option options "-mno-dsp"
mips_make_test_option options "-mno-synci"
+ mips_make_test_option options "-mnan=legacy"
}
if { $isa_rev > 5 } {
- mips_make_test_option options "-mno-dsp"
mips_make_test_option options "-mno-mips16"
if { [mips_have_test_option_p options "-mdsp"] } {
mips_make_test_option options "-mfp64"