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