2004-10-05 Ulrich Weigand <uweigand@de.ibm.com>
[deliverable/binutils-gdb.git] / gas / testsuite / gas / arm / arm.exp
CommitLineData
252b5132
RH
1#
2# Some ARM tests
3#
2ad6300c
RE
4proc 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
077b8428 17if {[istarget *arm*-*-*] || [istarget "xscale-*-*"]} then {
252b5132 18
250355db
NC
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 }
e28cd48c 30
49e5c6c5 31 gas_test "arm3.s" "-mcpu=arm3" $stdoptlist "Arm 3 instructions"
49e5c6c5 32 gas_test "arm6.s" "-mcpu=arm6" $stdoptlist "Arm 6 instructions"
49e5c6c5 33 gas_test "arm7dm.s" "-mcpu=arm7dm" $stdoptlist "Arm 7DM instructions"
49e5c6c5 34 gas_test "arch4t.s" "-march=armv4t" $stdoptlist "Arm architecture 4t instructions"
252b5132 35 gas_test "immed.s" "" $stdoptlist "immediate expressions"
2fd303f5 36 gas_test "float.s" "-mcpu=arm7tdmi -mfpu=fpa" $stdoptlist "Core floating point instructions"
376eb240 37 gas_test "offset.s" "" $stdoptlist "OFFSET_IMM regression"
077b8428 38
376eb240
NC
39 run_dump_test "armv1"
40 run_dump_test "arch5tej"
50463d2a 41 run_dump_test "fpa-monadic"
50463d2a 42 run_dump_test "fpa-dyadic"
50463d2a 43 run_dump_test "fpa-mem"
bfae80f2 44 run_dump_test "vfp1xD"
bfae80f2 45 run_dump_test "vfp1"
e45d0630 46 run_dump_test "vfp2"
077b8428 47 run_dump_test "xscale"
ca6489f9 48 run_dump_test "adrl"
376eb240
NC
49 run_dump_test "reg-alias"
50 run_dump_test "maverick"
09d92015 51 run_dump_test "archv6"
09d92015 52 run_dump_test "thumbv6"
0dd132b6 53 run_dump_test "arch6zk"
376eb240
NC
54
55 run_errors_test "vfp-bad" "-mfpu=vfp" "VFP errors"
56 run_errors_test "req" "-mcpu=arm7m" ".req errors"
57 run_errors_test "armv1-bad" "-mcpu=arm7m" "ARM v1 errors"
4249f881 58 run_errors_test "r15-bad" "" "Invalid use of r15 errors"
376eb240 59 run_errors_test "undefined" "" "Undefined local label error"
4249f881 60
ca6489f9
PB
61 if {[istarget *-*-elf*] || [istarget *-*-linux*]} then {
62 run_dump_test "pic"
6057a28f 63 run_dump_test "mapping"
1f216d09 64 gas_test "bignum1.s" "" $stdoptlist "bignums"
ca6489f9 65 }
8fbf1ae5 66
376eb240
NC
67 if {! [istarget arm*-*-aout] && ![istarget arm-*-pe]} then {
68 # The arm-aout port does not support Thumb mode.
69 gas_test "thumb.s" "-mcpu=arm7t" $stdoptlist "Thumb instructions"
70 }
252b5132
RH
71}
72
73# Not all arm targets are bi-endian, so only run this test on ones
74# we know that are. FIXME: We should probably also key off armeb/armel.
75
76if [istarget arm-*-pe] {
77 run_dump_test "le-fpconst"
78
79 # Since big-endian numbers have the normal format, this doesn't exist.
80 #run_dump_test "be-fpconst"
81}
03b1477f 82
e16bb312
NC
83if [istarget xscale-*] {
84 run_dump_test "iwmmxt"
8bfee9a1 85 run_errors_test "iwmmxt-bad" "-mcpu=iwmmxt" "iWMMXt errors"
e16bb312 86}
This page took 0.245237 seconds and 4 git commands to generate.