]>
Commit | Line | Data |
---|---|---|
d87bef3a | 1 | # Copyright (C) 1993-2023 Free Software Foundation, Inc. |
252b5132 RH |
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 | |
32866df7 | 5 | # the Free Software Foundation; either version 3 of the License, or |
252b5132 RH |
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 | |
b43b5d5f | 15 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. |
252b5132 RH |
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 | ||
23 | if ![istarget hppa*-*-*] then { | |
24 | return | |
25 | } | |
26 | ||
c392c1bb JL |
27 | # These tests are not suitable for wide mode. |
28 | if [istarget hppa*w-*-*] then { | |
29 | return | |
30 | } | |
31 | ||
ec1428fa | 32 | # elf hppa assembler doesn't support .subspa |
e28e05a3 | 33 | if {[istarget *64*-*-*] || [istarget *-*-*elf*] || [istarget *-*-linux*]} then { |
ec1428fa AM |
34 | return |
35 | } | |
36 | ||
252b5132 RH |
37 | if {[which $OBJDUMP] == 0} then { |
38 | perror "$OBJDUMP does not exist" | |
39 | return | |
40 | } | |
41 | ||
42 | send_user "Version [binutil_version $OBJDUMP]" | |
43 | ||
44 | if {![binutils_assemble $srcdir/$subdir/addendbug.s tmpdir/addendbug.o]} then { | |
f795c494 | 45 | fail "addendbug test (assembling)" |
252b5132 | 46 | } else { |
252b5132 | 47 | |
f795c494 AM |
48 | if [is_remote host] { |
49 | set objfile [remote_download host tmpdir/addendbug.o] | |
50 | } else { | |
51 | set objfile tmpdir/addendbug.o | |
52 | } | |
252b5132 | 53 | |
f795c494 AM |
54 | # Make sure the SOM BFD code sign extends constants in |
55 | # R_DATA_OVERRIDE fixups. | |
252b5132 | 56 | |
f795c494 | 57 | set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -r $objfile"] |
252b5132 | 58 | |
f795c494 AM |
59 | if [istarget hppa*-*-*elf*] then { |
60 | set want "00000000 R_PARISC_DPREL21L\[ \]+is_idchar-0x00000020.*" | |
61 | } else { | |
62 | set want "00000000 R_DP_RELATIVE\[ \]+is_idchar-0x00000020.*" | |
63 | } | |
252b5132 | 64 | |
f795c494 AM |
65 | if [regexp $want $got] then { |
66 | pass "addendbug test" | |
67 | } else { | |
68 | fail "addendbug test" | |
69 | } | |
252b5132 | 70 | } |
40a825c3 JL |
71 | |
72 | ########################### | |
73 | # Set up the test of freg.s | |
74 | ########################### | |
75 | ||
76 | if {![binutils_assemble $srcdir/$subdir/freg.s tmpdir/freg.o]} then { | |
f795c494 | 77 | fail "freg test (assembling)" |
40a825c3 | 78 | } else { |
40a825c3 | 79 | |
f795c494 AM |
80 | if [is_remote host] { |
81 | set objfile [remote_download host tmpdir/freg.o] | |
82 | } else { | |
83 | set objfile tmpdir/freg.o | |
84 | } | |
40a825c3 | 85 | |
f795c494 | 86 | # Make sure that we get R float regs like we're supposed to |
40a825c3 | 87 | |
f795c494 | 88 | set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS --disassemble $objfile"] |
40a825c3 | 89 | |
f795c494 AM |
90 | set want "fmpyfadd,sgl fr4,fr4R,fr5R,fr5" |
91 | ||
92 | if [regexp $want $got] then { | |
93 | pass "freg test" | |
94 | } else { | |
95 | fail "freg test" | |
96 | } | |
40a825c3 | 97 | } |