Commit | Line | Data |
---|---|---|
5bf135a7 NC |
1 | # Copyright 2012 |
2 | # Free Software Foundation, Inc. | |
3 | ||
4 | # This program is free software; you can redistribute it and/or modify | |
5 | # it under the terms of the GNU General Public License as published by | |
6 | # the Free Software Foundation; either version 3 of the License, or | |
7 | # (at your option) any later version. | |
8 | # | |
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. | |
13 | # | |
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. | |
17 | ||
252b5132 RH |
18 | # |
19 | # Some generic m68k tests | |
20 | # | |
60bcf0fa NC |
21 | if [istarget "m68hc11-*-*"] then { |
22 | return | |
23 | } | |
24 | if [istarget "m68hc12-*-*"] then { | |
25 | return | |
26 | } | |
27 | if [istarget "m6811-*-*"] then { | |
28 | return | |
29 | } | |
30 | if [istarget "m6812-*-*"] then { | |
31 | return | |
32 | } | |
9ab8ee21 | 33 | if { [istarget m68*-*-*] || [istarget fido*-*-*] } then { |
252b5132 RH |
34 | gas_test "t2.s" "" "" "cross-section branch" |
35 | if [istarget m68*-motorola-sysv] then { | |
36 | run_dump_test t2 | |
37 | } | |
38 | ||
39 | gas_test "pic1.s" "" "" "PIC generation" | |
40 | ||
41 | gas_test "disperr.s" "-m68020" "" "Incorrect Displacement too long error" | |
42 | ||
43 | gas_test_error "p2410.s" "" "out-of-range 'bras'" | |
44 | ||
4fa0e86f AM |
45 | # Reloc types etc. need changing for aout and coff to pass. |
46 | setup_xfail "*-*" | |
c4990c4b | 47 | clear_xfail "*-*-*elf*" "*-*-sysv4*" "*-*-rtems*" "*-*-*linux*" "*-*-*gnu*" "*-*-psos*" |
252b5132 | 48 | run_dump_test pcrel |
9ab8ee21 KH |
49 | |
50 | # Since fido is basically CPU32, it does not support those | |
51 | # instructions beyond CPU32. Disable those tests that test them. | |
52 | if ![istarget fido-*-*] then { | |
53 | run_dump_test operands | |
54 | run_dump_test cas | |
55 | run_dump_test bitfield | |
56 | } else { | |
57 | # Test fido-specific instructions. | |
58 | run_dump_test fido | |
59 | } | |
60 | ||
252b5132 | 61 | run_dump_test link |
1bc5dc87 KH |
62 | |
63 | # fido does not have a floating point unit. | |
64 | if ![istarget fido-*-*] then { | |
65 | run_dump_test fmoveml | |
66 | } | |
67 | ||
68eb2996 | 68 | run_dump_test mcf-mov3q |
25b07cd9 | 69 | run_dump_test mcf-movsr |
580b9172 | 70 | run_dump_test mode5 |
96e67898 | 71 | run_dump_test mode5 "{name {cf}} {as {-mcpu=5200}}" |
c3732716 JB |
72 | run_dump_test movem-offset |
73 | run_dump_test movem-offset "{name {cf}} {as {-mcpu=5485}}" | |
fd99574b NC |
74 | run_dump_test mcf-mac |
75 | run_dump_test mcf-emac | |
afa2158f | 76 | run_dump_test mcf-coproc |
c2fe9327 | 77 | run_dump_test mcf-fpu |
869ddf2a | 78 | run_dump_test mcf-trap |
ddefa7f5 | 79 | run_dump_test mcf-wdebug |
1c3f20b4 NC |
80 | if { [istarget *-*-elf] || [istarget *-*-linux*] } then { |
81 | run_dump_test arch-cpu-1 | |
82 | } | |
baee4c9e | 83 | run_dump_test cpu32 |
252b5132 | 84 | |
9a2e615a NS |
85 | run_dump_test br-isaa |
86 | run_dump_test br-isab | |
87 | run_dump_test br-isac | |
88 | ||
78336706 NS |
89 | run_dump_test ctrl-1 |
90 | run_dump_test ctrl-2 | |
91 | ||
6ffe3d99 NC |
92 | gas_test_error "p11673.s" "-march=isab" "movel immediate with offset unsupported on isab" |
93 | ||
32a96f36 | 94 | if { [istarget *-*-*aout] || [istarget *-*-netbsd] || [istarget *-*-openbsd*] } then { |
1c3f20b4 | 95 | run_dump_test p3041 |
b2b74248 | 96 | run_dump_test p3041data |
32a96f36 | 97 | run_dump_test p3041pcrel |
1c3f20b4 NC |
98 | } |
99 | ||
252b5132 RH |
100 | set testname "68000 operands" |
101 | gas_run "operands.s" "-m68000" "2>err.out" | |
102 | if ![string match "child process exited abnormally" $comp_output] then { | |
103 | send_log "$comp_output\n" | |
104 | verbose "$comp_output" 3 | |
105 | fail $testname | |
106 | } else { | |
eb22018c | 107 | if [regexp_diff "err.out" "$srcdir/$subdir/op68000.d"] then { |
252b5132 RH |
108 | fail $testname |
109 | } else { | |
110 | pass $testname | |
111 | } | |
112 | } | |
cf869cce NC |
113 | |
114 | if { [istarget m68k-*-linux*] } then { | |
115 | run_dump_test tls-gd-3 | |
116 | } | |
09ec0d17 | 117 | |
6f78ea24 IS |
118 | if { ! [istarget fido-*-*] } then { |
119 | # The testcase uses an invalid instruction for this architecture. | |
120 | run_dump_test pr11676 | |
121 | } | |
e143d25c AS |
122 | |
123 | run_dump_test pmove | |
252b5132 RH |
124 | } |
125 | if [info exists errorInfo] then { | |
126 | unset errorInfo | |
60bcf0fa | 127 | } |