Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | # |
2 | # Some ARM tests | |
3 | # | |
2ad6300c RE |
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 | ||
077b8428 | 17 | if {[istarget *arm*-*-*] || [istarget "xscale-*-*"]} then { |
252b5132 RH |
18 | run_dump_test "inst" |
19 | ||
e28cd48c RE |
20 | run_dump_test "ldconst" |
21 | ||
50463d2a RE |
22 | run_dump_test "armv1" |
23 | ||
49e5c6c5 | 24 | run_errors_test "armv1-bad" "-mcpu=arm7m" "ARM v1 errors" |
2ad6300c | 25 | |
49e5c6c5 | 26 | gas_test "arm3.s" "-mcpu=arm3" $stdoptlist "Arm 3 instructions" |
252b5132 | 27 | |
49e5c6c5 | 28 | gas_test "arm6.s" "-mcpu=arm6" $stdoptlist "Arm 6 instructions" |
252b5132 | 29 | |
49e5c6c5 | 30 | gas_test "arm7dm.s" "-mcpu=arm7dm" $stdoptlist "Arm 7DM instructions" |
252b5132 RH |
31 | |
32 | run_dump_test "arm7t" | |
33 | ||
f598fd5e NC |
34 | if {! [istarget arm*-*-aout]} then { |
35 | # The arm-aout port does not support Thumb mode. | |
36 | gas_test "thumb.s" "-mcpu=arm7t" $stdoptlist "Thumb instructions" | |
37 | } | |
252b5132 | 38 | |
49e5c6c5 | 39 | gas_test "arch4t.s" "-march=armv4t" $stdoptlist "Arm architecture 4t instructions" |
252b5132 | 40 | |
ea6ef066 RE |
41 | run_dump_test "arch5tej" |
42 | ||
252b5132 RH |
43 | gas_test "copro.s" "" $stdoptlist "Co processor instructions" |
44 | ||
45 | gas_test "immed.s" "" $stdoptlist "immediate expressions" | |
46 | ||
47 | gas_test "float.s" "" $stdoptlist "Core floating point instructions" | |
077b8428 | 48 | |
50463d2a RE |
49 | run_dump_test "fpa-monadic" |
50 | ||
51 | run_dump_test "fpa-dyadic" | |
52 | ||
53 | run_dump_test "fpa-mem" | |
54 | ||
bfae80f2 RE |
55 | run_dump_test "vfp1xD" |
56 | ||
57 | run_dump_test "vfp1" | |
58 | ||
03b1477f | 59 | run_errors_test "vfp-bad" "-mfpu=vfp" "VFP errors" |
bfae80f2 | 60 | |
077b8428 | 61 | run_dump_test "xscale" |
ca6489f9 PB |
62 | |
63 | run_dump_test "adrl" | |
64 | ||
cce4814f NC |
65 | run_dump_test "maverick" |
66 | ||
ca6489f9 PB |
67 | if {[istarget *-*-elf*] || [istarget *-*-linux*]} then { |
68 | run_dump_test "pic" | |
69 | } | |
252b5132 RH |
70 | } |
71 | ||
72 | # Not all arm targets are bi-endian, so only run this test on ones | |
73 | # we know that are. FIXME: We should probably also key off armeb/armel. | |
74 | ||
75 | if [istarget arm-*-pe] { | |
76 | run_dump_test "le-fpconst" | |
77 | ||
78 | # Since big-endian numbers have the normal format, this doesn't exist. | |
79 | #run_dump_test "be-fpconst" | |
80 | } | |
03b1477f | 81 |