]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - binutils/testsuite/binutils-all/vax/objdump.exp
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / binutils / testsuite / binutils-all / vax / objdump.exp
1 #
2 # Copyright (C) 1993-2021 Free Software Foundation, Inc.
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
6 # the Free Software Foundation; either version 3 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.
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
16 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18
19 #
20 # This file was written by Jan-Benedict Glaw <jbglaw@lug-owl.de>. It's goal
21 # is to check the VAX-specific support of the -M entry:0xf00 switch, which
22 # allows to force function entry masks at given addresses.
23 #
24
25 if ![istarget vax*-*-*] then {
26 return
27 }
28
29 if {[which $OBJDUMP] == 0} then {
30 perror "$OBJDUMP does not exist"
31 return
32 }
33
34 send_user "Version [binutil_version $OBJDUMP]"
35
36 if {![binutils_assemble $srcdir/$subdir/entrymask.s tmpdir/entrymask.o]} then {
37 fail "entrymask test (assembling)"
38 } else {
39
40 if [is_remote host] {
41 set objfile [remote_download host tmpdir/entrymask.o]
42 } else {
43 set objfile tmpdir/entrymask.o
44 }
45
46 #
47 # We check both function entry points. The second one at offset 2 will
48 # show up automatically on ELF targets, but needs to be set on a.out
49 # targets.
50 #
51 set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -d -M entry:0x0 -M entry:2 $objfile"]
52 set want1 "\[ \]+0:\[ \]+10 01\[ \]+\\.word 0x0110.\*r8 r4"
53 set want2 "\[ \]+2:\[ \]+24 02\[ \]+\\.word 0x0224.\*r9 r5 r2"
54 if [regexp $want1 $got] then {
55 pass "entrymask test 1"
56 } else {
57 fail "entrymask test 1"
58 }
59 if [regexp $want2 $got] then {
60 pass "entrymask test 2"
61 } else {
62 fail "entrymask test 2"
63 }
64 }