2 # Some generic xtensa tests
4 if [istarget xtensa
*-*-*] then {
5 gas_test_error
"j_too_far.s" "" "Check for jump out of range error"
7 set testname
"j_too_far.s: error line number reporting"
8 gas_start
"j_too_far.s" ""
12 -re
":4: Error:.*out of range" { set x1 1 }
13 timeout
{ perror
"timeout\n"; break }
18 if [all_ones $x1
] then { pass $testname
} else { fail $testname
}
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"
27 -re
"^.*2:.*entry" { set x1 1 }
28 timeout
{ perror
"timeout\n"; break }
33 if [all_ones $x1
] then { pass $testname
} else { fail $testname
}
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"
42 -re
"^.*2:.*entry" { set x1 1 }
43 timeout
{ perror
"timeout\n"; break }
48 if [all_ones $x1
] then { pass $testname
} else { fail $testname
}
50 gas_test_error
"entry_align.s" "" "Xtensa entry alignment error"
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"
58 -re
"^.*0:.*loop" { set x1 1 }
59 timeout
{ perror
"timeout\n"; break }
64 if [all_ones $x1
] then { pass $testname
} else { fail $testname
}
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"
73 -re
"^.*2:.*loop" { set x1 1 }
74 timeout
{ perror
"timeout\n"; break }
79 if [all_ones $x1
] then { pass $testname
} else { fail $testname
}
81 run_dump_test
"short_branch_offset"
84 if [info exists errorInfo
] then {