blob: ab37dd8bc32d7f3e555a893f5e5e3a87c5466a05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# Copyright (C) 2012-2016 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
# Test x930509a -- correct assembly of differences involving forward
# references.
#
proc do_930509a_tic4x {} {
set testname "difference between forward references (tic4x version)"
set x 0
gas_start "../all/x930509.s" "-al"
while 1 {
# We need to accomodate both byte orders here.
# If ".long" means an 8-byte value on some target someday, this test will have
# to be fixed.
expect {
-re "^ +1 .... 00 ?00 ?00 ?00" { fail $testname; set x 1 }
-re "^ +1 .... 01 ?00 ?00 ?00" { pass $testname; set x 1 }
-re "^ +1 .... 00 ?00 ?00 ?01" { pass $testname; set x 1 }
-re "\[^\n\]*\n" { }
timeout { perror "timeout\n"; break }
eof { break }
}
}
gas_finish
if !$x then { fail $testname }
}
#
# TI TMS320C4X tests.
#
if [istarget *c4x*-*-*] then {
do_930509a_tic4x
# Test zero-based disassemble test
run_dump_test "zeros"
# Test the register names on the c3x and on the c4x
run_dump_test "registers_c3x"
run_dump_test "registers_c4x"
# Make sure the c4x registers dont work on c3x
gas_test_error "registers.s" "-m30 --defsym TEST_C4X=1" "c4x register usage in c3x"
# Test data storage
run_dump_test "data"
# Test flonums
run_dump_test "float"
# Test all addressing modes
run_dump_test "addressing_c3x"
run_dump_test "addressing_c4x"
# Make sure the c4x addressing dont work on c3x
gas_test_error "addressing.s" "-m30 --defsym TEST_C4X=1" "c4x addressing usage in c3x"
# Test float instructions
run_dump_test "opcodes_c3x"
run_dump_test "opcodes_c4x"
run_dump_test "opcodes_new"
# Make sure the c4x ops dont work on c3x
#gas_test_error "opcodes.s" "-m30 --defsym TEST_C4X=1" "c4x instruction usage in c3x"
# -- for some reason this test crashes dejagnu, hence disabled!
}
|