1 # Copyright (C) 2012-2018 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
18 # Some generic xtensa tests
20 if [istarget xtensa*-*-*] then {
21 gas_test_error "j_too_far.s" "" "Check for jump out of range error"
23 set testname "j_too_far.s: error line number reporting"
24 gas_start "j_too_far.s" ""
28 -re ":4: Error:.*out of range" { set x1 1 }
29 timeout { perror "timeout\n"; break }
34 if [all_ones $x1] then { pass $testname } else { fail $testname }
37 gas_test "entry_misalign.s" "" "" "Xtensa Entry misalignment"
38 set testname "entry_misalign.s: Force entry misalignment"
39 objdump_start_no_subdir "a.out" "-d -j .text"
43 -re "^.*2:.*entry" { set x1 1 }
44 timeout { perror "timeout\n"; break }
49 if [all_ones $x1] then { pass $testname } else { fail $testname }
52 gas_test "entry_misalign2.s" "" "" "Xtensa Entry misalignment(2)"
53 set testname "entry_misalign2.s: Force entry misalignment(2)"
54 objdump_start_no_subdir "a.out" "-d -j .text"
58 -re "^.*2:.*entry" { set x1 1 }
59 timeout { perror "timeout\n"; break }
64 if [all_ones $x1] then { pass $testname } else { fail $testname }
66 gas_test_error "entry_align.s" "" "Xtensa entry alignment error"
68 gas_test "loop_misalign.s" "" "" "Xtensa Loop misalignment"
69 set testname "loop_misalign.s: Force loop misalignment"
70 objdump_start_no_subdir "a.out" "-d -j .text"
74 -re "^.*0:.*loop" { set x1 1 }
75 timeout { perror "timeout\n"; break }
80 if [all_ones $x1] then { pass $testname } else { fail $testname }
83 gas_test "loop_align.s" "" "" "Xtensa autoalign loop"
84 set testname "loop_align.s: autoalign loop"
85 objdump_start_no_subdir "a.out" "-d -j .text"
89 -re "^.*2:.*loop" { set x1 1 }
90 timeout { perror "timeout\n"; break }
95 if [all_ones $x1] then { pass $testname } else { fail $testname }
97 run_dump_test "short_branch_offset"
99 run_dump_test "weak-call"
100 run_dump_test "jlong"
101 run_dump_test "trampoline"
102 run_list_test "trampoline-2"
103 run_dump_test "first_frag_align"
104 run_dump_test "auto-litpools"
105 run_dump_test "auto-litpools-first1"
106 run_dump_test "auto-litpools-first2"
108 run_dump_test "init-fini-literals"
111 if [info exists errorInfo] then {