Add new proc is_x86_64_m64_target and use it where appropriate.
Tested on x86_64-linux.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
standard_testfile .S
# This file is part of the gdb testsuite.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
standard_testfile amd64-pseudo.c
# Test displaced stepping over VEX-encoded RIP-relative AVX
# instructions.
-require {istarget x86_64-*-*} is_lp64_target have_avx
+require is_x86_64_m64_target have_avx
standard_testfile .S
# Test amd64 displaced stepping.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
set newline "\[\r\n\]*"
# This file is part of the gdb testsuite.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
standard_testfile amd64-pseudo.c
standard_testfile
lappend opts debug optimize=-O2
} else {
- require {istarget x86_64-*-*} is_lp64_target
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
set srcfile ${srcfile2}
lappend opts optimize=-O2 additional_flags=-gdwarf-5
} else {
- require {istarget x86_64-*-*} is_lp64_target
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
# make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param.exp COMPILE=1"
set srcfile ${srcfile2}
lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping amd64-entry-value-param."
- return
+} else {
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
standard_testfile .S .cc
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
if { [prepare_for_testing_full "failed to prepare" \
[list $testfile "c++" $srcfile {}]] } {
set srcfile ${testfile}.cc
lappend opts debug optimize=-O2
} else {
- require {istarget x86_64-*-*} is_lp64_target
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
# This testcase exercises evaluation with amd64 calling conventions.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
standard_testfile .cc
standard_testfile .S
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {nopie}] } {
return -1
set opts {}
standard_testfile .c
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
return -1
set srcfile ${srcfile2}
lappend opts debug optimize=-O2
} else {
- require {istarget x86_64-*-*} is_lp64_target
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
standard_testfile .S
set binfile ${binfile}.o
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
untested "failed to compile"
set srcfile ${csrcfile}
lappend opts debug optimize=-O0
} else {
- require {istarget x86_64-*-*} is_lp64_target
+ require is_x86_64_m64_target
}
if {[prepare_for_testing "failed to prepare" ${binfile} $srcfile $opts]} {
standard_testfile ".S"
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return -1
standard_testfile ".S"
-if { ![istarget "x86_64-*-*"] || ![is_lp64_target] } {
- verbose "Skipping $testfile.exp"
- return
-}
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return -1
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
proc test_probe { probe_name } {
with_test_prefix "probe: ${probe_name}" {
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
standard_testfile amd64-stap-wrong-subexp.S
standard_testfile amd64-tailcall-cxx1.cc amd64-tailcall-cxx2.cc
lappend opts debug optimize=-O2
} else {
- require {istarget x86_64-*-*} is_lp64_target
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} "${srcfile} ${srcfile2}" $opts] } {
standard_testfile
lappend opts debug optimize=-O2
} else {
- require {istarget x86_64-*-*} is_lp64_target
+ require is_x86_64_m64_target
}
lappend opts nopie
# make check RUNTESTFLAGS="gdb.arch/amd64-tailcall-ret.exp COMPILE=1"
standard_testfile
lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping ${testfile}."
- return
+} else {
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
standard_testfile .S
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {}] } {
return -1
# This file is part of the gdb testsuite.
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
standard_testfile amd64-pseudo.c
untested "$testfile.exp"
return -1
}
-if { ![istarget "x86_64-*-*"] || ![is_lp64_target] } {
- untested "$testfile.exp"
- return -1
-}
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
return -1
lappend options c++
}
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
+if { ![is_x86_64_m64_target] } {
verbose "Skipping x86_64 LOC_CONST test."
set srcfile3 ""
}
lappend options additional_flags=-g3
}
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
+if { ![is_x86_64_m64_target] } {
verbose "Skipping x86_64 LOC_CONST test."
set srcfile3 ""
}
# This test can only be run on x86-like targets which support DWARF.
require dwarf2_support allow_cplus_tests
-if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
set csrcfile "${testfile}.cc"
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S \
{nodebug nopie additional_flags=-nostdlib}] } {
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
# It requires fortran.
require allow_fortran_tests
require dwarf2_support
# This test can only be run on x86_64 targets.
-if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
standard_testfile .S
-if { ![istarget "x86_64-*-*"] || ![is_lp64_target] } {
- verbose "Skipping $gdb_test_file_name."
- return
-}
+require is_x86_64_m64_target
# We can't use prepare_for_testing here because we need to check the
# 'file' command's output.
require dwarf2_support
# This test can only be run on x86_64 targets.
-if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
set basename "inline-break"
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
if { [prepare_for_testing "failed to prepare" "${test}" ${test}.S {nodebug}] } {
return -1
require dwarf2_support
# This test can only be run on x86_64 targets.
-if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
# Test handling of DW_CFA_restore_state.
# This test can only be run on x86_64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
set opts [list {additional_flags=-nostdlib}]
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
set csrcfile ${testfile}.c
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
if {[prepare_for_testing "failed to prepare" "$testfile" $srcfile {nodebug nopie}]} {
return -1
# This test can only be run on x86-64 targets. It checks for a bug
# that existed in amd64-tdep.c, and depends on an error being produced
# from within that file.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
# This test can only be run on targets which support DWARF-2 and use gas.
require dwarf2_support
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
require dwarf2_support
# This test can only be run on x86-64 targets.
-if {![istarget x86_64-*] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
standard_testfile .S
# This test can only be run on x86 and amd64 targets (and not x32).
if { [is_x86_like_target] } {
set sfile ${test}.S
-} elseif {[istarget "x86_64-*-*"] && [is_lp64_target]} {
+} elseif { [is_x86_64_m64_target] } {
set sfile ${test}-amd64.S
} else {
return 0
require dwarf2_support
# This test can only be run on x86_64 targets.
-if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
- return 0
-}
+require is_x86_64_m64_target
gdb_exit
if [mi_gdb_start] {
# make check RUNTESTFLAGS="gdb.mi/mi2-amd64-entry-value.exp COMPILE=1"
set srcfile ${testfile}.c
lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping mi2-amd64-entry-value."
- return
+} else {
+ require is_x86_64_m64_target
}
set executable ${testfile}
standard_testfile amd64-py-framefilter-invalidarg.S
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping py-framefilter-invalidarg."
- return
-}
+require is_x86_64_m64_target
# We cannot use prepare_for_testing as we have to set the safe-patch
# to check objfile and progspace printers.
# make check RUNTESTFLAGS="gdb.python/py-linetable.exp COMPILE=1"
standard_testfile
lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping ${testfile}."
- return
+} else {
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
}
# This test runs on a specific platform.
-if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { continue }
+require is_x86_64_m64_target
# The following tests require execution.
# make check RUNTESTFLAGS="gdb.reverse/amd64-tailcall-reverse.exp COMPILE=1"
standard_testfile
lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping ${testfile}."
- return
+} else {
+ require is_x86_64_m64_target
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
] == -1 } {
return -1
}
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping ${testfile}."
- return
-} elseif { [build_executable ${testfile}.exp ${testfile} \
- [list ${srcfile} ${srcfile2}] {}] == -1 } {
- return -1
+} else {
+ require is_x86_64_m64_target
+ if { [build_executable ${testfile}.exp ${testfile} \
+ [list ${srcfile} ${srcfile2}] {}] == -1 } {
+ return -1
+ }
}
clean_restart $executable
return [expr [is_ilp32_target] && ![is_amd64_regs_target]]
}
+# Return 1 if this target is an x86_64 with -m64.
+proc is_x86_64_m64_target {} {
+ return [expr [istarget x86_64-*-* ] && [is_lp64_target]]
+}
+
# Return 1 if this target is an arm or aarch32 on aarch64.
gdb_caching_proc is_aarch32_target {