1#
2# Some generic m68k tests
3#
4if [istarget "m68hc11-*-*"] then {
5   return
6}
7if [istarget "m68hc12-*-*"] then {
8   return
9}
10if [istarget "m6811-*-*"] then {
11   return
12}
13if [istarget "m6812-*-*"] then {
14   return
15}
16if [istarget m68*-*-*] then {
17    gas_test "t2.s" "" "" "cross-section branch"
18    if [istarget m68*-motorola-sysv] then {
19	run_dump_test t2
20    }
21
22    gas_test "pic1.s" "" "" "PIC generation"
23
24    gas_test "disperr.s" "-m68020" "" "Incorrect Displacement too long error"
25
26    gas_test_error "p2410.s" "" "out-of-range 'bras'"
27
28    # Reloc types etc. need changing for aout and coff to pass.
29    setup_xfail "*-*"
30    clear_xfail "*-*-*elf*" "*-*-sysv4*" "*-*-rtems" "*-*-*gnu*" "*-*-psos*"
31    run_dump_test pcrel
32    run_dump_test operands
33    run_dump_test cas
34    run_dump_test bitfield
35    run_dump_test link
36    run_dump_test fmoveml
37    run_dump_test mcf-mov3q
38    run_dump_test mode5
39    run_dump_test mcf-mac
40    run_dump_test mcf-emac
41    run_dump_test mcf-fpu
42    run_dump_test arch-cpu-1
43
44    set testname "68000 operands"
45    gas_run "operands.s" "-m68000" "2>err.out"
46    if ![string match "child process exited abnormally" $comp_output] then {
47	send_log "$comp_output\n"
48	verbose "$comp_output" 3
49	fail $testname
50    } else {
51	if [regexp_diff "err.out" "$srcdir/$subdir/op68000.d"] then {
52	    fail $testname
53	} else {
54	    pass $testname
55	}
56    }
57}
58if [info exists errorInfo] then {
59    unset errorInfo
60}
61