Add copyright notices
[deliverable/binutils-gdb.git] / gas / testsuite / gas / tic4x / tic4x.exp
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
18 #
19 # Test x930509a -- correct assembly of differences involving forward
20 # references.
21 #
22 proc do_930509a_tic4x {} {
23 set testname "difference between forward references (tic4x version)"
24 set x 0
25 gas_start "../all/x930509.s" "-al"
26 while 1 {
27 # We need to accomodate both byte orders here.
28 # If ".long" means an 8-byte value on some target someday, this test will have
29 # to be fixed.
30 expect {
31 -re "^ +1 .... 00 ?00 ?00 ?00" { fail $testname; set x 1 }
32 -re "^ +1 .... 01 ?00 ?00 ?00" { pass $testname; set x 1 }
33 -re "^ +1 .... 00 ?00 ?00 ?01" { pass $testname; set x 1 }
34 -re "\[^\n\]*\n" { }
35 timeout { perror "timeout\n"; break }
36 eof { break }
37 }
38 }
39 gas_finish
40 if !$x then { fail $testname }
41 }
42
43
44 #
45 # TI TMS320C4X tests.
46 #
47 if [istarget *c4x*-*-*] then {
48 do_930509a_tic4x
49
50 # Test zero-based disassemble test
51 run_dump_test "zeros"
52
53 # Test the register names on the c3x and on the c4x
54 run_dump_test "registers_c3x"
55 run_dump_test "registers_c4x"
56
57 # Make sure the c4x registers dont work on c3x
58 gas_test_error "registers.s" "-m30 --defsym TEST_C4X=1" "c4x register usage in c3x"
59
60 # Test data storage
61 run_dump_test "data"
62
63 # Test flonums
64 run_dump_test "float"
65
66 # Test all addressing modes
67 run_dump_test "addressing_c3x"
68 run_dump_test "addressing_c4x"
69
70 # Make sure the c4x addressing dont work on c3x
71 gas_test_error "addressing.s" "-m30 --defsym TEST_C4X=1" "c4x addressing usage in c3x"
72
73 # Test float instructions
74 run_dump_test "opcodes_c3x"
75 run_dump_test "opcodes_c4x"
76 run_dump_test "opcodes_new"
77
78 # Make sure the c4x ops dont work on c3x
79 #gas_test_error "opcodes.s" "-m30 --defsym TEST_C4X=1" "c4x instruction usage in c3x"
80 # -- for some reason this test crashes dejagnu, hence disabled!
81 }
This page took 0.032809 seconds and 4 git commands to generate.