]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gas/testsuite/gas/xtensa/all.exp
2007-12-07 Bob Wilson <bob.wilson@acm.org>
[thirdparty/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:.*out of range" { 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_error "entry_align.s" "" "Xtensa entry alignment error"
51
52 gas_test "loop_misalign.s" "" "" "Xtensa Loop misalignment"
53 set testname "loop_misalign.s: Force loop misalignment"
54 objdump_start_no_subdir "a.out" "-d -j .text"
55 set x1 0
56 while 1 {
57 expect {
58 -re "^.*0:.*loop" { set x1 1 }
59 timeout { perror "timeout\n"; break }
60 eof { break }
61 }
62 }
63 objdump_finish
64 if [all_ones $x1] then { pass $testname } else { fail $testname }
65
66
67 gas_test "loop_align.s" "" "" "Xtensa autoalign loop"
68 set testname "loop_align.s: autoalign loop"
69 objdump_start_no_subdir "a.out" "-d -j .text"
70 set x1 0
71 while 1 {
72 expect {
73 -re "^.*2:.*loop" { set x1 1 }
74 timeout { perror "timeout\n"; break }
75 eof { break }
76 }
77 }
78 objdump_finish
79 if [all_ones $x1] then { pass $testname } else { fail $testname }
80
81 run_dump_test "short_branch_offset"
82 run_dump_test "pcrel"
83 }
84
85 if [info exists errorInfo] then {
86 unset errorInfo
87 }