Add Xtensa port
[deliverable/binutils-gdb.git] / gas / testsuite / gas / xtensa / all.exp
1 #
2 # Some generic xtensa tests
3 #
4 if [istarget xtensa*-*-*] then {
5 gas_test_error "j_too_far.s" "" "Check for jump out of range error"
6
7 set testname "j_too_far.s: error line number reporting"
8 gas_start "j_too_far.s" ""
9 set x1 0
10 while 1 {
11 expect {
12 -re ":4: Error:.*too large" { set x1 1 }
13 timeout { perror "timeout\n"; break }
14 eof { break }
15 }
16 }
17 gas_finish
18 if [all_ones $x1] then { pass $testname } else { fail $testname }
19
20
21 gas_test "entry_misalign.s" "" "" "Xtensa Entry misalignment"
22 set testname "entry_misalign.s: Force entry misalignment"
23 objdump_start_no_subdir "a.out" "-d -j .text"
24 set x1 0
25 while 1 {
26 expect {
27 -re "^.*2:.*entry" { set x1 1 }
28 timeout { perror "timeout\n"; break }
29 eof { break }
30 }
31 }
32 objdump_finish
33 if [all_ones $x1] then { pass $testname } else { fail $testname }
34
35
36 gas_test "entry_misalign2.s" "" "" "Xtensa Entry misalignment(2)"
37 set testname "entry_misalign2.s: Force entry misalignment(2)"
38 objdump_start_no_subdir "a.out" "-d -j .text"
39 set x1 0
40 while 1 {
41 expect {
42 -re "^.*2:.*entry" { set x1 1 }
43 timeout { perror "timeout\n"; break }
44 eof { break }
45 }
46 }
47 objdump_finish
48 if [all_ones $x1] then { pass $testname } else { fail $testname }
49
50 gas_test "entry_align.s" "" "" "Xtensa autoalign entry"
51 set testname "entry_align.s: autoalign entry"
52 objdump_start_no_subdir "a.out" "-d -j .text"
53 set x1 0
54 while 1 {
55 expect {
56 -re "^.*4:.*entry" { set x1 1 }
57 timeout { perror "timeout\n"; break }
58 eof { break }
59 }
60 }
61 objdump_finish
62 if [all_ones $x1] then { pass $testname } else { fail $testname }
63
64 gas_test "loop_misalign.s" "" "" "Xtensa Loop misalignment"
65 set testname "loop_misalign.s: Force loop misalignment"
66 objdump_start_no_subdir "a.out" "-d -j .text"
67 set x1 0
68 while 1 {
69 expect {
70 -re "^.*0:.*loop" { set x1 1 }
71 timeout { perror "timeout\n"; break }
72 eof { break }
73 }
74 }
75 objdump_finish
76 if [all_ones $x1] then { pass $testname } else { fail $testname }
77
78
79 gas_test "loop_align.s" "" "" "Xtensa autoalign loop"
80 set testname "loop_align.s: autoalign loop"
81 objdump_start_no_subdir "a.out" "-d -j .text"
82 set x1 0
83 while 1 {
84 expect {
85 -re "^.*2:.*loop" { set x1 1 }
86 timeout { perror "timeout\n"; break }
87 eof { break }
88 }
89 }
90 objdump_finish
91 if [all_ones $x1] then { pass $testname } else { fail $testname }
92
93
94 }
95
96 if [info exists errorInfo] then {
97 unset errorInfo
98 }
This page took 0.035068 seconds and 4 git commands to generate.