~ubuntu-branches/ubuntu/utopic/binutils-arm64-cross/utopic

« back to all changes in this revision

Viewing changes to binutils-2.23.52.20130611/gas/testsuite/gas/xtensa/all.exp

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-06-20 17:38:09 UTC
  • Revision ID: package-import@ubuntu.com-20130620173809-app8lzgvymy5fg6c
Tags: 0.7
Build-depend on binutils-source (>= 2.23.52.20130620-1~).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2012
 
2
# Free Software Foundation, Inc.
 
3
 
 
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.
 
8
 
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.
 
13
 
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.  
 
17
 
 
18
#
 
19
# Some generic xtensa tests
 
20
#
 
21
if [istarget xtensa*-*-*] then {
 
22
    gas_test_error "j_too_far.s" "" "Check for jump out of range error"
 
23
 
 
24
    set testname "j_too_far.s: error line number reporting"
 
25
    gas_start "j_too_far.s" ""
 
26
    set x1 0
 
27
    while 1 {
 
28
        expect {
 
29
            -re ":4: Error:.*out of range"      { set x1 1 }
 
30
            timeout                             { perror "timeout\n"; break }
 
31
            eof                                 { break }
 
32
        }
 
33
    }
 
34
    gas_finish
 
35
    if [all_ones $x1] then { pass $testname } else { fail $testname }
 
36
 
 
37
 
 
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"
 
41
    set x1 0
 
42
    while 1 {
 
43
        expect {
 
44
            -re "^.*2:.*entry" { set x1 1 }
 
45
            timeout            { perror "timeout\n"; break }
 
46
            eof                { break }
 
47
        }
 
48
    }
 
49
    objdump_finish
 
50
    if [all_ones $x1] then { pass $testname } else { fail $testname }
 
51
 
 
52
 
 
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"
 
56
    set x1 0
 
57
    while 1 {
 
58
        expect {
 
59
            -re "^.*2:.*entry" { set x1 1 }
 
60
            timeout            { perror "timeout\n"; break }
 
61
            eof                { break }
 
62
        }
 
63
    }
 
64
    objdump_finish
 
65
    if [all_ones $x1] then { pass $testname } else { fail $testname }
 
66
 
 
67
    gas_test_error "entry_align.s" "" "Xtensa entry alignment error"
 
68
 
 
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"
 
72
    set x1 0
 
73
    while 1 {
 
74
        expect {
 
75
            -re "^.*0:.*loop" { set x1 1 }
 
76
            timeout            { perror "timeout\n"; break }
 
77
            eof                { break }
 
78
        }
 
79
    }
 
80
    objdump_finish
 
81
    if [all_ones $x1] then { pass $testname } else { fail $testname }
 
82
 
 
83
 
 
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"
 
87
    set x1 0
 
88
    while 1 {
 
89
        expect {
 
90
            -re "^.*2:.*loop" { set x1 1 }
 
91
            timeout            { perror "timeout\n"; break }
 
92
            eof                { break }
 
93
        }
 
94
    }
 
95
    objdump_finish
 
96
    if [all_ones $x1] then { pass $testname } else { fail $testname }
 
97
 
 
98
    run_dump_test "short_branch_offset"
 
99
    run_dump_test "pcrel"
 
100
    run_dump_test "weak-call"
 
101
    run_dump_test "jlong"
 
102
}
 
103
 
 
104
if [info exists errorInfo] then {
 
105
    unset errorInfo
 
106
}