Configury changes: update src repository (binutils, gdb, and rda) to use
[binutils.git] / binutils / testsuite / binutils-all / hppa / objdump.exp
bloba4451254d140eba7201806b9ad80bf2aafc7994e
1 # Copyright 1993, 1994, 1995, 1997, 1999, 2000, 2002
2 # Free Software Foundation, Inc.
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 2 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.
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.
18 # Please email any bugs, comments, and/or additions to this file to:
19 # bug-dejagnu@prep.ai.mit.edu
21 # This file was written by Rob Savoye <rob@cygnus.com>
22 # and rewritten by Ian Lance Taylor <ian@cygnus.com>
24 if ![istarget hppa*-*-*] then {
25 return
28 # These tests are not suitable for wide mode.
29 if [istarget hppa*w-*-*] then {
30 return
33 # elf hppa assembler doesn't support .subspa
34 if {[istarget *64*-*-*] || [istarget *-*-*elf*] || [istarget *-*-linux*]} then {
35 return
38 if {[which $OBJDUMP] == 0} then {
39 perror "$OBJDUMP does not exist"
40 return
43 send_user "Version [binutil_version $OBJDUMP]"
45 if {![binutils_assemble $srcdir/$subdir/addendbug.s tmpdir/addendbug.o]} then {
46 return
49 if [is_remote host] {
50 set objfile [remote_download host tmpdir/addendbug.o]
51 } else {
52 set objfile tmpdir/addendbug.o
55 # Make sure the SOM BFD code sign extends constants in R_DATA_OVERRIDE fixups.
57 set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -r $objfile"]
59 if [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.*"
66 if [regexp $want $got] then {
67 pass "addendbug test"
68 } else {
69 fail "addendbug test"
72 ###########################
73 # Set up the test of freg.s
74 ###########################
76 if {![binutils_assemble $srcdir/$subdir/freg.s tmpdir/freg.o]} then {
77 return
80 if [is_remote host] {
81 set objfile [remote_download host tmpdir/freg.o]
82 } else {
83 set objfile tmpdir/freg.o
86 # Make sure that we get R float regs like we're supposed to
88 set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS --disassemble $objfile"]
90 set want "fmpyfadd,sgl fr4,fr4R,fr5R,fr5"
92 if [regexp $want $got] then {
93 pass "freg test"
94 } else {
95 fail "freg test"