]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - binutils/testsuite/binutils-all/hppa/objdump.exp
Duplicate hppa*-*-*elf* behaviour for hppa*-*-linux*.
[thirdparty/binutils-gdb.git] / binutils / testsuite / binutils-all / hppa / objdump.exp
CommitLineData
252b5132
RH
1# Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
2
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 2 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
17# Please email any bugs, comments, and/or additions to this file to:
18# bug-dejagnu@prep.ai.mit.edu
19
20# This file was written by Rob Savoye <rob@cygnus.com>
21# and rewritten by Ian Lance Taylor <ian@cygnus.com>
22
23if ![istarget hppa*-*-*] then {
24 return
25}
26
c392c1bb
JL
27# These tests are not suitable for wide mode.
28if [istarget hppa*w-*-*] then {
29 return
30}
31
252b5132
RH
32if {[which $OBJDUMP] == 0} then {
33 perror "$OBJDUMP does not exist"
34 return
35}
36
37send_user "Version [binutil_version $OBJDUMP]"
38
39if {![binutils_assemble $srcdir/$subdir/addendbug.s tmpdir/addendbug.o]} then {
40 return
41}
42
43if [is_remote host] {
44 set objfile [remote_download host tmpdir/addendbug.o]
45} else {
46 set objfile tmpdir/addendbug.o
47}
48
49# Make sure the SOM BFD code sign extends constants in R_DATA_OVERRIDE fixups.
50
51set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -r $objfile"]
52
53if [istarget hppa*-*-*elf*] then {
54 set want "00000000 R_PARISC_DPREL21L\[ \]+is_idchar\\+0xffffffe0.*"
55} else {
56 set want "00000000 R_DP_RELATIVE\[ \]+is_idchar\\+0xffffffe0.*"
57}
58
59
60if [regexp $want $got] then {
61 pass "addendbug test"
62} else {
63 fail "addendbug test"
64}
40a825c3
JL
65
66###########################
67# Set up the test of freg.s
68###########################
69
70if {![binutils_assemble $srcdir/$subdir/freg.s tmpdir/freg.o]} then {
71 return
72}
73
74if [is_remote host] {
75 set objfile [remote_download host tmpdir/freg.o]
76} else {
77 set objfile tmpdir/freg.o
78}
79
80# Make sure that we get R float regs like we're supposed to
81
82set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS --disassemble $objfile"]
83
84set want "fmpyfadd,sgl fr4,fr4R,fr5R,fr5"
85
86if [regexp $want $got] then {
87 pass "freg test"
88} else {
89 fail "freg test"
90}