1 # Copyright (C) 2012-2019 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
18 # Some generic m68k tests
20 if [istarget "m68hc11-*-*"] then {
23 if [istarget "m68hc12-*-*"] then {
26 if [istarget "m6811-*-*"] then {
29 if [istarget "m6812-*-*"] then {
32 if { [istarget m68*-*-*] || [istarget fido*-*-*] } then {
33 gas_test "t2.s" "" "" "cross-section branch"
35 gas_test "pic1.s" "" "" "PIC generation"
37 gas_test "disperr.s" "-m68020" "" "Incorrect Displacement too long error"
39 gas_test_error "p2410.s" "" "out-of-range 'bras'"
43 # Since fido is basically CPU32, it does not support those
44 # instructions beyond CPU32. Disable those tests that test them.
45 if ![istarget fido-*-*] then {
46 run_dump_test operands
48 run_dump_test bitfield
50 # Test fido-specific instructions.
56 # fido does not have a floating point unit.
57 if ![istarget fido-*-*] then {
61 run_dump_test mcf-mov3q
62 run_dump_test mcf-movsr
64 run_dump_test mode5 "{name {cf}} {as {-mcpu=5200}}"
65 run_dump_test movem-offset
66 run_dump_test movem-offset "{name {cf}} {as {-mcpu=5485}}"
68 run_dump_test mcf-emac
69 run_dump_test mcf-coproc
71 run_dump_test mcf-trap
72 run_dump_test mcf-wdebug
73 run_dump_test arch-cpu-1
83 gas_test_error "p11673.s" "-march=isab" "movel immediate with offset unsupported on isab"
85 gas_test_error "p13050-1.s" "-march=isab" "moveb (d8,An,Xi),(d16,An) unsupported on isab"
86 run_dump_test p13050-2
88 set testname "68000 operands"
89 gas_run "operands.s" "-m68000" "2>err.out"
90 if ![string match "child process exited abnormally" $comp_output] then {
91 send_log "$comp_output\n"
92 verbose "$comp_output" 3
95 if [regexp_diff "err.out" "$srcdir/$subdir/op68000.d"] then {
102 if { [istarget m68k-*-linux*] } then {
103 run_dump_test tls-gd-3
106 if { ! [istarget fido-*-*] } then {
107 # The testcase uses an invalid instruction for this architecture.
108 run_dump_test pr11676
113 if [info exists errorInfo] then {