* NEWS: Mention new ARM command-line options and VFP support.
[binutils-gdb.git] / gas / testsuite / gas / arm / arm.exp
index f21c54df31058894cca18581d4046eb34e658446..4faa8ce449bb1c96bba81fea57539fde83b18c4e 100644 (file)
@@ -1,26 +1,65 @@
 #
 # Some ARM tests
 #
-if [istarget arm-*-*] then {
+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 {
     run_dump_test "inst"
 
-    gas_test "arm3.s" "" $stdoptlist "Arm 3 instructions"
+    run_dump_test "ldconst"
+
+    run_dump_test "armv1"
+
+    run_errors_test "armv1-bad" "-marm1" "ARM v1 errors"
 
-    gas_test "arm6.s" "" $stdoptlist "Arm 6 instructions"
+    gas_test "arm3.s" "-marm3" $stdoptlist "Arm 3 instructions"
 
-    gas_test "arm7dm.s" "" $stdoptlist "Arm 7DM instructions"
+    gas_test "arm6.s" "-marm6" $stdoptlist "Arm 6 instructions"
+
+    gas_test "arm7dm.s" "-marm7dm" $stdoptlist "Arm 7DM instructions"
 
     run_dump_test "arm7t"
 
-    gas_test "thumb.s" "" $stdoptlist "Thumb instructions"
+    gas_test "thumb.s" "-marm7t" $stdoptlist "Thumb instructions"
 
-    gas_test "arch4t.s" "" $stdoptlist "Arm architecture 4t instructions"
+    gas_test "arch4t.s" "-marmv4t" $stdoptlist "Arm architecture 4t instructions"
 
     gas_test "copro.s" "" $stdoptlist "Co processor instructions"
 
     gas_test "immed.s" "" $stdoptlist "immediate expressions"
 
     gas_test "float.s" "" $stdoptlist "Core floating point instructions"
+
+    run_dump_test "fpa-monadic"
+
+    run_dump_test "fpa-dyadic"
+
+    run_dump_test "fpa-mem"
+
+    run_dump_test "vfp1xD"
+
+    run_dump_test "vfp1"
+
+    run_errors_test "vfp-bad" "-mfpu=vfp" "VFP errors"
+
+    run_dump_test "xscale"
+
+    run_dump_test "adrl"
+
+    if {[istarget *-*-elf*] || [istarget *-*-linux*]} then {
+       run_dump_test "pic"
+    }
 }
 
 # Not all arm targets are bi-endian, so only run this test on ones
@@ -32,3 +71,7 @@ if [istarget arm-*-pe] {
     # Since big-endian numbers have the normal format, this doesn't exist.
     #run_dump_test "be-fpconst"
 }
+
+if [istarget arm9e-*] {
+    run_dump_test "maverick"
+}