OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [binutils/] [testsuite/] [binutils-all/] [arm/] [objdump.exp] - Blame information for rev 165

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 15 khays
#   Copyright 2004, 2007, 2009
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
if {![istarget "arm*-*-*"]} then {
19
  return
20
}
21
 
22
if {![is_remote host] && [which $OBJDUMP] == 0} then {
23
    perror "$OBJDUMP does not exist"
24
    return
25
}
26
 
27
send_user "Version [binutil_version $OBJDUMP]"
28
 
29
###########################
30
# Set up the test of movem.s
31
###########################
32
 
33
if {![binutils_assemble $srcdir/$subdir/thumb2-cond.s tmpdir/thumb2-cond.o]} then {
34
    return
35
}
36
 
37
if [is_remote host] {
38
    set objfile [remote_download host tmpdir/thumb2-cond.o]
39
} else {
40
    set objfile tmpdir/thumb2-cond.o
41
}
42
 
43
# Make sure that conditional instructions are correctly decoded.
44
 
45
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS --disassemble --start-address=6 $objfile"]
46
 
47
set want "bcc.w\[ \t\]*e12.*bx\[ \t\]*lr"
48
 
49
if [regexp $want $got] then {
50
    pass "thumb2-cond test1"
51
} else {
52
    fail "thumb2-cond test1"
53
}
54
 
55
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS --disassemble --start-address=10 $objfile"]
56
 
57
set want "bx\[ \t\]*lr"
58
 
59
if [regexp $want $got] then {
60
    pass "thumb2-cond test2"
61
} else {
62
    fail "thumb2-cond test2"
63
}
64
 
65
###########################
66
# Set up the test of multiple disassemblies
67
###########################
68
 
69
if {![binutils_assemble $srcdir/$subdir/simple.s tmpdir/simple.o]} then {
70
    return
71
}
72
 
73
if [is_remote host] {
74
    set objfile [remote_download host tmpdir/simple.o]
75
} else {
76
    set objfile tmpdir/simple.o
77
}
78
 
79
# Make sure multiple disassemblies come out the same
80
 
81
set got [binutils_run $OBJDUMP "-dr $objfile $objfile"]
82
 
83
set want "$objfile:\[ \]*file format.*$objfile:\[ \]*file format.*push.*add.*sub.*str.*add.*pop"
84
 
85
if [regexp $want $got] then {
86
    pass "multiple input files"
87
} else {
88
    fail "multiple input files"
89
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.