]>
Commit | Line | Data |
---|---|---|
82704155 | 1 | # Copyright (C) 2004-2019 Free Software Foundation, Inc. |
fe944acf FT |
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 3 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. | |
16 | ||
17 | if {![istarget nfp*-*-*]} { | |
18 | return | |
19 | } | |
20 | ||
21 | if {![is_remote host] && [which $OBJDUMP] == 0} then { | |
22 | perror "$OBJDUMP does not exist" | |
23 | return | |
24 | } | |
25 | ||
26 | send_user "Version [binutil_version $OBJDUMP]" | |
27 | ||
28 | set outfile "tmpdir/dump.out" | |
29 | ||
30 | set testname "NFP dissasembler NFP-6xxx instructions" | |
31 | set dumpfile "$srcdir/$subdir/test1.d" | |
32 | remote_exec host "${OBJDUMP} -d $srcdir/$subdir/test1_nfp6000.nffw" "" "/dev/null" "$outfile" | |
33 | if { [regexp_diff "${outfile}" "${dumpfile}"] } then { | |
34 | fail $testname | |
35 | return | |
36 | } | |
37 | ||
38 | set testname "NFP dissasembler options: no-pc,ctx4" | |
39 | set dumpfile "$srcdir/$subdir/test2_no-pc_ctx4.d" | |
40 | remote_exec host "${OBJDUMP} -M no-pc,ctx4 -d $srcdir/$subdir/test2_nfp6000.nffw" "" "/dev/null" "$outfile" | |
41 | if { [regexp_diff "${outfile}" "${dumpfile}"] } then { | |
42 | fail $testname | |
43 | return | |
44 | } | |
45 | ||
46 | set testname "NFP dissasembler options: ctx8" | |
47 | set dumpfile "$srcdir/$subdir/test2_ctx8.d" | |
48 | remote_exec host "${OBJDUMP} -M ctx8 -d $srcdir/$subdir/test2_nfp6000.nffw" "" "/dev/null" "$outfile" | |
49 | if { [regexp_diff "${outfile}" "${dumpfile}"] } then { | |
50 | fail $testname | |
51 | return | |
52 | } |