#
# Some ARM tests
#
-proc run_errors_test { name opts tname} {
- global srcdir subdir
- set testname "$tname"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&${name}.out"
- if { [regexp_diff "${name}.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "${name}.out"]" 2
- return
- }
- pass $testname
-}
-
-if {[istarget *arm*-*-*] || [istarget "xscale-*-*"]} then {
-
- if {[istarget *-wince-*]} then {
- run_dump_test "wince_inst"
- run_dump_test "wince_ldconst"
- run_dump_test "wince_arm7t"
- run_dump_test "wince_copro"
- } else {
- run_dump_test "inst"
- run_dump_test "ldconst"
- run_dump_test "arm7t"
- run_dump_test "copro"
- }
-
- run_dump_test "arm3"
- run_dump_test "arm6"
- run_dump_test "arm7dm"
- run_dump_test "arch4t"
- run_dump_test "immed"
- run_dump_test "float"
- run_dump_test "offset"
- run_dump_test "armv1"
- run_dump_test "arch5tej"
- run_dump_test "fpa-monadic"
- run_dump_test "fpa-dyadic"
- run_dump_test "fpa-mem"
- run_dump_test "vfp1xD"
- run_dump_test "vfp1"
- run_dump_test "vfp2"
- run_dump_test "xscale"
- run_dump_test "adrl"
- run_dump_test "reg-alias"
- run_dump_test "maverick"
- run_dump_test "archv6"
- run_dump_test "archv6t2"
- run_dump_test "thumbv6"
- run_dump_test "thumbv6k"
- run_dump_test "arch6zk"
- run_dump_test "tcompat"
- run_dump_test "tcompat2"
- run_dump_test "iwmmxt"
- run_dump_test "macro1"
-
- run_errors_test "vfp-bad" "-mfpu=vfp" "VFP errors"
- run_errors_test "req" "-mcpu=arm7m" ".req errors"
- run_errors_test "armv1-bad" "-mcpu=arm7m" "ARM v1 errors"
- run_errors_test "r15-bad" "" "Invalid use of r15 errors"
- run_errors_test "archv6t2-bad" "-march=armv6t2" "Invalid V6T2 instructions"
- run_errors_test "t16-bad" "-march=armv6k" "Valid ARM, invalid Thumb"
- run_errors_test "iwmmxt-bad" "-mcpu=iwmmxt" "iWMMXt errors"
-
- if {[istarget *-*-*coff] || [istarget *-*-pe] || [istarget *-*-wince] ||
- [istarget *-*-*aout*] || [istarget *-*-netbsd] || [istarget *-*-riscix*]} then {
- # COFF and aout based ports use a different naming convention for local labels.
- run_errors_test "undefined_coff" "" "Undefined local label error"
- } else {
- # For ELF based ports we can run some additional tests as well.
- run_errors_test "undefined" "" "Undefined local label error"
-
- run_dump_test "pic"
- run_dump_test "mapping"
- run_dump_test "bignum1"
- run_dump_test "unwind"
- run_dump_test "tls"
- }
-
- # The arm-aout port does not support Thumb branch relocations.
- if {! [istarget arm*-*-aout] && ![istarget arm-*-pe]} then {
- run_dump_test "thumb"
- run_dump_test "thumb32"
- }
- # Not all arm targets are bi-endian, so only run this test on ones
- # we know that are. FIXME: We should probably also key off armeb/armel.
- if [istarget *-*-pe] {
- run_dump_test "le-fpconst"
- }
+if {[istarget *arm*-*-*] || [istarget *xscale*-*-*]} {
+ run_dump_tests [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
}