2
# Free Software Foundation, Inc.
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.
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.
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.
19
# Some generic xtensa tests
21
if [istarget xtensa*-*-*] then {
22
gas_test_error "j_too_far.s" "" "Check for jump out of range error"
24
set testname "j_too_far.s: error line number reporting"
25
gas_start "j_too_far.s" ""
29
-re ":4: Error:.*out of range" { set x1 1 }
30
timeout { perror "timeout\n"; break }
35
if [all_ones $x1] then { pass $testname } else { fail $testname }
38
gas_test "entry_misalign.s" "" "" "Xtensa Entry misalignment"
39
set testname "entry_misalign.s: Force entry misalignment"
40
objdump_start_no_subdir "a.out" "-d -j .text"
44
-re "^.*2:.*entry" { set x1 1 }
45
timeout { perror "timeout\n"; break }
50
if [all_ones $x1] then { pass $testname } else { fail $testname }
53
gas_test "entry_misalign2.s" "" "" "Xtensa Entry misalignment(2)"
54
set testname "entry_misalign2.s: Force entry misalignment(2)"
55
objdump_start_no_subdir "a.out" "-d -j .text"
59
-re "^.*2:.*entry" { set x1 1 }
60
timeout { perror "timeout\n"; break }
65
if [all_ones $x1] then { pass $testname } else { fail $testname }
67
gas_test_error "entry_align.s" "" "Xtensa entry alignment error"
69
gas_test "loop_misalign.s" "" "" "Xtensa Loop misalignment"
70
set testname "loop_misalign.s: Force loop misalignment"
71
objdump_start_no_subdir "a.out" "-d -j .text"
75
-re "^.*0:.*loop" { set x1 1 }
76
timeout { perror "timeout\n"; break }
81
if [all_ones $x1] then { pass $testname } else { fail $testname }
84
gas_test "loop_align.s" "" "" "Xtensa autoalign loop"
85
set testname "loop_align.s: autoalign loop"
86
objdump_start_no_subdir "a.out" "-d -j .text"
90
-re "^.*2:.*loop" { set x1 1 }
91
timeout { perror "timeout\n"; break }
96
if [all_ones $x1] then { pass $testname } else { fail $testname }
98
run_dump_test "short_branch_offset"
100
run_dump_test "weak-call"
101
run_dump_test "jlong"
104
if [info exists errorInfo] then {