gas:
[deliverable/binutils-gdb.git] / gas / testsuite / gas / arm / arm.exp
1 #
2 # Some ARM tests
3 #
4 proc run_errors_test { name opts tname} {
5 global srcdir subdir
6 set testname "$tname"
7 set file $srcdir/$subdir/$name
8 gas_run ${name}.s $opts ">&${name}.out"
9 if { [regexp_diff "${name}.out" "${file}.l"] } then {
10 fail $testname
11 verbose "output is [file_contents "${name}.out"]" 2
12 return
13 }
14 pass $testname
15 }
16
17 if {[istarget *arm*-*-*] || [istarget "xscale-*-*"]} then {
18
19 if {[istarget *-wince-*]} then {
20 run_dump_test "wince_inst"
21 run_dump_test "wince_ldconst"
22 run_dump_test "wince_arm7t"
23 run_dump_test "wince_copro"
24 } else {
25 run_dump_test "inst"
26 run_dump_test "ldconst"
27 run_dump_test "arm7t"
28 run_dump_test "copro"
29 }
30
31 gas_test "arm3.s" "-mcpu=arm3" $stdoptlist "Arm 3 instructions"
32 gas_test "arm6.s" "-mcpu=arm6" $stdoptlist "Arm 6 instructions"
33 gas_test "arm7dm.s" "-mcpu=arm7dm" $stdoptlist "Arm 7DM instructions"
34 gas_test "arch4t.s" "-march=armv4t" $stdoptlist "Arm architecture 4t instructions"
35 gas_test "immed.s" "" $stdoptlist "immediate expressions"
36 gas_test "float.s" "-mcpu=arm7tdmi -mfpu=fpa" $stdoptlist "Core floating point instructions"
37 gas_test "offset.s" "" $stdoptlist "OFFSET_IMM regression"
38
39 run_dump_test "armv1"
40 run_dump_test "arch5tej"
41 run_dump_test "fpa-monadic"
42 run_dump_test "fpa-dyadic"
43 run_dump_test "fpa-mem"
44 run_dump_test "vfp1xD"
45 run_dump_test "vfp1"
46 run_dump_test "vfp2"
47 run_dump_test "xscale"
48 run_dump_test "adrl"
49 run_dump_test "reg-alias"
50 run_dump_test "maverick"
51 run_dump_test "archv6"
52 run_dump_test "thumbv6"
53 run_dump_test "thumbv6k"
54 run_dump_test "arch6zk"
55
56 run_errors_test "vfp-bad" "-mfpu=vfp" "VFP errors"
57 run_errors_test "req" "-mcpu=arm7m" ".req errors"
58 run_errors_test "armv1-bad" "-mcpu=arm7m" "ARM v1 errors"
59 run_errors_test "r15-bad" "" "Invalid use of r15 errors"
60
61 if {[istarget *-*-*coff] || [istarget *-*-pe] || [istarget *-*-wince] ||
62 [istarget *-*-*aout*] || [istarget *-*-netbsd] || [istarget *-*-riscix*]} then {
63 # COFF and aout based ports use a different naming convention for local labels.
64 run_errors_test "undefined_coff" "" "Undefined local label error"
65 } else {
66 # For ELF based ports we can run some additional tests as well.
67 run_errors_test "undefined" "" "Undefined local label error"
68
69 run_dump_test "pic"
70 run_dump_test "mapping"
71 gas_test "bignum1.s" "" $stdoptlist "bignums"
72 run_dump_test "unwind"
73 }
74
75 if {! [istarget arm*-*-aout] && ![istarget arm-*-pe]} then {
76 # The arm-aout port does not support Thumb mode.
77 gas_test "thumb.s" "-mcpu=arm7t" $stdoptlist "Thumb instructions"
78 }
79 }
80
81 # Not all arm targets are bi-endian, so only run this test on ones
82 # we know that are. FIXME: We should probably also key off armeb/armel.
83
84 if [istarget arm-*-pe] {
85 run_dump_test "le-fpconst"
86
87 # Since big-endian numbers have the normal format, this doesn't exist.
88 #run_dump_test "be-fpconst"
89 }
90
91 if [istarget xscale-*] {
92 run_dump_test "iwmmxt"
93 run_errors_test "iwmmxt-bad" "-mcpu=iwmmxt" "iWMMXt errors"
94 }
This page took 0.035164 seconds and 5 git commands to generate.