2008-10-01 H.J. Lu <hongjiu.lu@intel.com>
[deliverable/binutils-gdb.git] / binutils / testsuite / binutils-all / hppa / objdump.exp
CommitLineData
32866df7 1# Copyright 1993, 1994, 1995, 1997, 1999, 2000, 2002, 2007
8c2bc687 2# Free Software Foundation, Inc.
252b5132
RH
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
32866df7 6# the Free Software Foundation; either version 3 of the License, or
252b5132
RH
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
b43b5d5f 16# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
252b5132
RH
17
18# Please email any bugs, comments, and/or additions to this file to:
19# bug-dejagnu@prep.ai.mit.edu
20
21# This file was written by Rob Savoye <rob@cygnus.com>
22# and rewritten by Ian Lance Taylor <ian@cygnus.com>
23
24if ![istarget hppa*-*-*] then {
25 return
26}
27
c392c1bb
JL
28# These tests are not suitable for wide mode.
29if [istarget hppa*w-*-*] then {
30 return
31}
32
ec1428fa 33# elf hppa assembler doesn't support .subspa
e28e05a3 34if {[istarget *64*-*-*] || [istarget *-*-*elf*] || [istarget *-*-linux*]} then {
ec1428fa
AM
35 return
36}
37
252b5132
RH
38if {[which $OBJDUMP] == 0} then {
39 perror "$OBJDUMP does not exist"
40 return
41}
42
43send_user "Version [binutil_version $OBJDUMP]"
44
45if {![binutils_assemble $srcdir/$subdir/addendbug.s tmpdir/addendbug.o]} then {
46 return
47}
48
49if [is_remote host] {
50 set objfile [remote_download host tmpdir/addendbug.o]
51} else {
52 set objfile tmpdir/addendbug.o
53}
54
55# Make sure the SOM BFD code sign extends constants in R_DATA_OVERRIDE fixups.
56
57set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -r $objfile"]
58
59if [istarget hppa*-*-*elf*] then {
60 set want "00000000 R_PARISC_DPREL21L\[ \]+is_idchar\\+0xffffffe0.*"
61} else {
62 set want "00000000 R_DP_RELATIVE\[ \]+is_idchar\\+0xffffffe0.*"
63}
64
65
66if [regexp $want $got] then {
67 pass "addendbug test"
68} else {
69 fail "addendbug test"
70}
40a825c3
JL
71
72###########################
73# Set up the test of freg.s
74###########################
75
76if {![binutils_assemble $srcdir/$subdir/freg.s tmpdir/freg.o]} then {
77 return
78}
79
80if [is_remote host] {
81 set objfile [remote_download host tmpdir/freg.o]
82} else {
83 set objfile tmpdir/freg.o
84}
85
86# Make sure that we get R float regs like we're supposed to
87
88set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS --disassemble $objfile"]
89
90set want "fmpyfadd,sgl fr4,fr4R,fr5R,fr5"
91
92if [regexp $want $got] then {
93 pass "freg test"
94} else {
95 fail "freg test"
96}
This page took 0.369018 seconds and 4 git commands to generate.