File: all.exp

package info (click to toggle)
binutils 2.31.1-11
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 307,644 kB
  • sloc: ansic: 1,161,122; asm: 638,494; cpp: 128,815; exp: 68,557; makefile: 55,816; sh: 22,360; yacc: 14,238; lisp: 13,272; perl: 2,111; ada: 1,681; lex: 1,652; pascal: 1,446; cs: 879; sed: 195; python: 154; xml: 95; awk: 25
file content (117 lines) | stat: -rw-r--r-- 3,763 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Copyright (C) 2012-2018 Free Software Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  

#
# Some generic xtensa tests
#
if [istarget xtensa*-*-*] then {
    gas_test_error "j_too_far.s" "" "Check for jump out of range error"

    set testname "j_too_far.s: error line number reporting"
    gas_start "j_too_far.s" ""
    set x1 0
    while 1 {
        expect {
            -re ":4: Error:.*out of range"      { set x1 1 }
            timeout                             { perror "timeout\n"; break }
            eof                                 { break }
        }
    }
    gas_finish
    if [all_ones $x1] then { pass $testname } else { fail $testname }


    gas_test "entry_misalign.s" "" "" "Xtensa Entry misalignment"
    set testname "entry_misalign.s: Force entry misalignment"
    objdump_start_no_subdir "a.out" "-d -j .text"
    set x1 0
    while 1 {
	expect {
	    -re "^.*2:.*entry" { set x1 1 }
	    timeout            { perror "timeout\n"; break }
	    eof                { break }
	}
    }
    objdump_finish
    if [all_ones $x1] then { pass $testname } else { fail $testname }


    gas_test "entry_misalign2.s" "" "" "Xtensa Entry misalignment(2)"
    set testname "entry_misalign2.s: Force entry misalignment(2)"
    objdump_start_no_subdir "a.out" "-d -j .text"
    set x1 0
    while 1 {
	expect {
	    -re "^.*2:.*entry" { set x1 1 }
	    timeout            { perror "timeout\n"; break }
	    eof                { break }
	}
    }
    objdump_finish
    if [all_ones $x1] then { pass $testname } else { fail $testname }

    gas_test_error "entry_align.s" "" "Xtensa entry alignment error"

    gas_test "loop_misalign.s" "" "" "Xtensa Loop misalignment"
    set testname "loop_misalign.s: Force loop misalignment"
    objdump_start_no_subdir "a.out" "-d -j .text"
    set x1 0
    while 1 {
	expect {
	    -re "^.*0:.*loop" { set x1 1 }
	    timeout            { perror "timeout\n"; break }
	    eof                { break }
	}
    }
    objdump_finish
    if [all_ones $x1] then { pass $testname } else { fail $testname }


    gas_test "loop_align.s" "" "" "Xtensa autoalign loop"
    set testname "loop_align.s: autoalign loop"
    objdump_start_no_subdir "a.out" "-d -j .text"
    set x1 0
    while 1 {
	expect {
	    -re "^.*2:.*loop" { set x1 1 }
	    timeout            { perror "timeout\n"; break }
	    eof                { break }
	}
    }
    objdump_finish
    if [all_ones $x1] then { pass $testname } else { fail $testname }

    run_dump_test "short_branch_offset"
    run_dump_test "pcrel"
    run_dump_test "weak-call"
    run_dump_test "jlong"
    run_dump_test "trampoline"
    run_list_test "trampoline-2"
    run_dump_test "first_frag_align"
    run_dump_test "auto-litpools"
    run_dump_test "auto-litpools-2"
    run_dump_test "auto-litpools-3"
    run_dump_test "auto-litpools-4"
    run_dump_test "auto-litpools-first1"
    run_dump_test "auto-litpools-first2"
    run_dump_test "loc"
    run_dump_test "init-fini-literals"
    run_dump_test "text-section-literals-1"
}

if [info exists errorInfo] then {
    unset errorInfo
}