2000-10-31 Philip Blundell <philb@gnu.org>
[binutils.git] / binutils / testsuite / binutils-all / hppa / objdump.exp
blob46b0ed0d57c029cd2405d1ad9b06d34e0b974fcb
1 # Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
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.
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.
17 # Please email any bugs, comments, and/or additions to this file to:
18 # bug-dejagnu@prep.ai.mit.edu
20 # This file was written by Rob Savoye <rob@cygnus.com>
21 # and rewritten by Ian Lance Taylor <ian@cygnus.com>
23 if ![istarget hppa*-*-*] then {
24 return
27 # These tests are not suitable for wide mode.
28 if [istarget hppa*w-*-*] then {
29 return
32 # elf hppa assembler doesn't support .subspa
33 if {[istarget *-*-*elf*] || [istarget *-*-linux*]} then {
34 return
37 if {[which $OBJDUMP] == 0} then {
38 perror "$OBJDUMP does not exist"
39 return
42 send_user "Version [binutil_version $OBJDUMP]"
44 if {![binutils_assemble $srcdir/$subdir/addendbug.s tmpdir/addendbug.o]} then {
45 return
48 if [is_remote host] {
49 set objfile [remote_download host tmpdir/addendbug.o]
50 } else {
51 set objfile tmpdir/addendbug.o
54 # Make sure the SOM BFD code sign extends constants in R_DATA_OVERRIDE fixups.
56 set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -r $objfile"]
58 if [istarget hppa*-*-*elf*] then {
59 set want "00000000 R_PARISC_DPREL21L\[ \]+is_idchar\\+0xffffffe0.*"
60 } else {
61 set want "00000000 R_DP_RELATIVE\[ \]+is_idchar\\+0xffffffe0.*"
65 if [regexp $want $got] then {
66 pass "addendbug test"
67 } else {
68 fail "addendbug test"
71 ###########################
72 # Set up the test of freg.s
73 ###########################
75 if {![binutils_assemble $srcdir/$subdir/freg.s tmpdir/freg.o]} then {
76 return
79 if [is_remote host] {
80 set objfile [remote_download host tmpdir/freg.o]
81 } else {
82 set objfile tmpdir/freg.o
85 # Make sure that we get R float regs like we're supposed to
87 set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS --disassemble $objfile"]
89 set want "fmpyfadd,sgl fr4,fr4R,fr5R,fr5"
91 if [regexp $want $got] then {
92 pass "freg test"
93 } else {
94 fail "freg test"