[gdb/testsuite] Add and use is_x86_64_m64_target
authorTom de Vries <tdevries@suse.de>
Thu, 26 Jan 2023 09:09:44 +0000 (10:09 +0100)
committerTom de Vries <tdevries@suse.de>
Thu, 26 Jan 2023 09:09:44 +0000 (10:09 +0100)
Add new proc is_x86_64_m64_target and use it where appropriate.

Tested on x86_64-linux.

54 files changed:
gdb/testsuite/gdb.arch/amd64-break-on-asm-line.exp
gdb/testsuite/gdb.arch/amd64-byte.exp
gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp
gdb/testsuite/gdb.arch/amd64-disp-step.exp
gdb/testsuite/gdb.arch/amd64-dword.exp
gdb/testsuite/gdb.arch/amd64-entry-value-inline.exp
gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp
gdb/testsuite/gdb.arch/amd64-entry-value-param.exp
gdb/testsuite/gdb.arch/amd64-entry-value-paramref.exp
gdb/testsuite/gdb.arch/amd64-entry-value.exp
gdb/testsuite/gdb.arch/amd64-eval.exp
gdb/testsuite/gdb.arch/amd64-invalid-stack-middle.exp
gdb/testsuite/gdb.arch/amd64-invalid-stack-top.exp
gdb/testsuite/gdb.arch/amd64-optimout-repeat.exp
gdb/testsuite/gdb.arch/amd64-prologue-skip.exp
gdb/testsuite/gdb.arch/amd64-prologue-xmm.exp
gdb/testsuite/gdb.arch/amd64-stap-expressions.exp
gdb/testsuite/gdb.arch/amd64-stap-optional-prefix.exp
gdb/testsuite/gdb.arch/amd64-stap-special-operands.exp
gdb/testsuite/gdb.arch/amd64-stap-wrong-subexp.exp
gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp
gdb/testsuite/gdb.arch/amd64-tailcall-noret.exp
gdb/testsuite/gdb.arch/amd64-tailcall-ret.exp
gdb/testsuite/gdb.arch/amd64-tailcall-self.exp
gdb/testsuite/gdb.arch/amd64-word.exp
gdb/testsuite/gdb.base/coredump-filter-build-id.exp
gdb/testsuite/gdb.compile/compile-cplus.exp
gdb/testsuite/gdb.compile/compile.exp
gdb/testsuite/gdb.cp/namelessclass.exp
gdb/testsuite/gdb.dwarf2/clztest.exp
gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
gdb/testsuite/gdb.dwarf2/dw2-error.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
gdb/testsuite/gdb.dwarf2/dw2-restore.exp
gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
gdb/testsuite/gdb.dwarf2/fission-base.exp
gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
gdb/testsuite/gdb.dwarf2/fission-loclists.exp
gdb/testsuite/gdb.dwarf2/trace-crash.exp
gdb/testsuite/gdb.dwarf2/typeddwarf.exp
gdb/testsuite/gdb.mi/mi-reg-undefined.exp
gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp
gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
gdb/testsuite/gdb.python/py-linetable.exp
gdb/testsuite/gdb.python/py-unwind.exp
gdb/testsuite/gdb.reverse/amd64-tailcall-reverse.exp
gdb/testsuite/gdb.reverse/singlejmp-reverse.exp
gdb/testsuite/lib/gdb.exp

index faa6ce148786b73c679a1934bf8719b263682ee5..626240b6db820b5c17b640ce4d76a5eea081a1f8 100644 (file)
@@ -13,7 +13,7 @@
 # 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
 
index 78763e4e2ae3615944841eaa863554576f0d9ba3..b6dfc8a26c8bf25194f16fd1e0dc665da9ecb404 100644 (file)
@@ -18,7 +18,7 @@
 
 # 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
 
index fea714570815c16987b791323edd93663f47b309..ef44a248b82ce14ef389f91498b41ab0952da492 100644 (file)
@@ -18,7 +18,7 @@
 # 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
 
index 6ca95f444061ffb7acfaf729518be75310387f37..2aee1e05774e5583f1ccfa23e6bb6fcbd83eb960 100644 (file)
@@ -18,7 +18,7 @@
 # Test amd64 displaced stepping.
 
 
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
 
 set newline "\[\r\n\]*"
 
index 9f227601ca4a5ca4585a60f8699f357a31e7f831..201abb08c32039e911938b21016bd480cd9c0e29 100644 (file)
@@ -18,7 +18,7 @@
 
 # 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
 
index 30b4395433d556c2b6ee6683ae2990a72903fbc3..774b90bcdb0f7409c6d38cfc031d9eff671d6371 100644 (file)
@@ -21,7 +21,7 @@ if [info exists COMPILE] {
     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] } {
index 25615ceaafc347257c3e3e705528e54f4f6a8e3f..f6d11b26cc795fb463065b79a9b9d3a651eb484f 100644 (file)
@@ -21,7 +21,7 @@ if [info exists COMPILE] {
     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] } {
index 242a7a35ce7be9ecfee541cd3525dd71660f592c..da1445f51c2a70377a9bb3041974ef43f3852e0f 100644 (file)
@@ -20,9 +20,8 @@ if [info exists COMPILE] {
     # 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] } {
index be22937481aedc7318fbae551c719ad41d36a882..ff3e0242e9a8523e453251cbd1642f37bc35b0fd 100644 (file)
@@ -15,7 +15,7 @@
 
 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 {}]] } {
index f5aa42a53b5bbba3213eb39084a8dff3650b2745..a700e9a691b679afc077c66d0dcce839a67b6578 100644 (file)
@@ -21,7 +21,7 @@ if [info exists COMPILE] {
     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] } {
index c9ae30fc4d0d588296f85ca306c1b3ef316c9a18..73e2864211cb335d68b0fc8a4a86a55b0754c880 100644 (file)
@@ -17,7 +17,7 @@
 
 # This testcase exercises evaluation with amd64 calling conventions.
 
-require {istarget x86_64-*-*} is_lp64_target
+require is_x86_64_m64_target
 
 standard_testfile .cc
 
index a5aaeedd3596c4f3d7c50f8278eebfbc0b00f645..156300be1d9b8379f60dfef04c0bf93d7fc57da0 100644 (file)
@@ -29,7 +29,7 @@
 
 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
index 19b2972c34c4fb43504de76b2775d69de257babe..b6a25f8525f822d77adb456aacbdf2284e86987f 100644 (file)
@@ -30,7 +30,7 @@
 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
index 7f45b956b39e540f07cf515e285cea2e35a345a6..56fe3016c555f9b258a7312b34bf64e270c262aa 100644 (file)
@@ -21,7 +21,7 @@ if [info exists COMPILE] {
     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] } {
index 44464bd31936285bcb7122a7eb017679e34b591f..be28fa04c84200c2a3a90cc56fc4c6a9e16962bf 100644 (file)
@@ -16,7 +16,7 @@
 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"
index d02c1418a3017f57928d3ed1e1e5bc378d0ce3b1..f771b09ccbc61fba23af3cd02db088866e82b13b 100644 (file)
@@ -25,7 +25,7 @@ if [info exists 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]} {
index 43627042e9eacfbda431de73975eb189f9b5e2d9..48124a85f7fd512af8530b12a6c80ad713be4c5e 100644 (file)
@@ -15,7 +15,7 @@
 
 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
index 98083bacb359e2cd7506aead5213f7654e57798d..7758b9cd29b891efbd3d87aac560183a7d95139d 100644 (file)
 
 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
index 9a453e53ace12d9ba82e209cfc07a5b7b4a552c0..147d0ff40b2610848495c7db0c079309d08e5f85 100644 (file)
@@ -13,7 +13,7 @@
 # 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}" {
index f2172a0ce3576aace95bcc3dab64bf549377f901..fdfcb5a5e266a8cc1d0504a0079e80d581cf93bd 100644 (file)
@@ -13,7 +13,7 @@
 # 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
 
index 756f210d7832cff4506c9a7318ad076501aaebef..41b03b88bd5f0c77ea9c3530877a986130cfb4b2 100644 (file)
@@ -21,7 +21,7 @@ if [info exists COMPILE] {
     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] } {
index 30be37fe4fff3acaccd23c47f236a9bd63f8d4aa..3267a5ae9ca981d3d4273b7d34957d0732a303fb 100644 (file)
@@ -21,7 +21,7 @@ if [info exists COMPILE] {
     standard_testfile
     lappend opts debug optimize=-O2
 } else {
-    require {istarget x86_64-*-*} is_lp64_target
+    require is_x86_64_m64_target
 }
 
 lappend opts nopie
index 9d3e4d40f6097d19623d3577c09bf0dbf8caca33..1602aff5dc5271658ee1c8aec460537754f50e9c 100644 (file)
@@ -20,9 +20,8 @@ if [info exists COMPILE] {
     # 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] } {
index e2fa9328e71f6bc83f8dd44d69bf5d237a9e52fd..03e7ae971a85542f3b656b32d886a8cd05287db2 100644 (file)
@@ -15,7 +15,7 @@
 
 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
index 5c3164aa9417e9ce8e8cd88d3cd277eefe8015a2..76722f2f71ec169d50fb8a18cf6561b3175330b2 100644 (file)
@@ -18,7 +18,7 @@
 
 # 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
 
index 3c0021a6cc732cdec4e84c64e5831673050d9a60..1ca10523d400d6e51fbbc1c3627a70e29f9f5683 100644 (file)
@@ -28,10 +28,7 @@ if { ![istarget *-*-linux*] } {
     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
index 0b7cb59727ac3a3d069f8d7b9d692d0605fc8ca5..489236a8b49379e463edc9b04ef97a4d28ade9a8 100644 (file)
@@ -24,7 +24,7 @@ if { [test_compiler_info gcc*] || [test_compiler_info clang*] } {
     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 ""
 }
index 9fdd36719aea8dcf3cf2d416ce00c521c14e4ff7..f3d87cd26059bf17bed777705d694e3bc3c2d67e 100644 (file)
@@ -22,7 +22,7 @@ if [test_compiler_info gcc*] {
     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 ""
 }
index 24cd6256508a8a010a2129196a26f4f0047a2418..f6a95f6f97739c607444bbf36cb628ff72b234be 100644 (file)
@@ -22,9 +22,7 @@ load_lib dwarf.exp
 # 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"
index 75dfb15ec2016ce582d2250c950c769c819a8052..a42b99a067724580f90cddd4be0ca6a0285b78e1 100644 (file)
@@ -22,9 +22,7 @@ set test "clztest"
 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}] } {
index 7ac4ecb8600508706a3394fa70a933b2b4814735..b4f5a71e05a8604b9d0738a8f566f3d5055b1b48 100644 (file)
@@ -19,9 +19,7 @@ load_lib dwarf.exp
 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
index 262b9728527ae5bb14eaaac62dcbc36215908283..527ce6eb2a2e16bf73c423a9e1d46d7013c42613 100644 (file)
@@ -18,9 +18,7 @@ load_lib dwarf.exp
 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
 
index 0980f43078f0b800ccfc08de3d72301b69917d7e..564c8c470892b5b0932ac80362a66bb570f8154a 100644 (file)
@@ -20,10 +20,7 @@ require dwarf2_support
 
 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.
index bdd7070dca2a247dc444505493d2f13c259e90ff..d5401fa5701702cd063190a811a3563d2ea5bd40 100644 (file)
@@ -22,9 +22,7 @@ load_lib dwarf.exp
 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"
 
index 535e74d255d0420926e5372f2a34a08f4ee5c8e6..abb1dcebf9dc329b3ee46262d6542fd816dd5657 100644 (file)
@@ -21,9 +21,7 @@ set test "dw2-op-out-param"
 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
index 06dd4dc372341b4b868515f60edb01c049e7aba8..c0105506d3df07280d53ef0ad58f2ce44683c6f6 100644 (file)
@@ -18,9 +18,7 @@ load_lib dwarf.exp
 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
 
index fd8b2a84d2242a44bc9895b8c44ae8be4d6b07cf..3be758aa836f9704b6e10e8d51117db725de7b51 100644 (file)
@@ -16,9 +16,7 @@
 # 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}]
index d51cb8e0b7a13392f833e29dcb1a65e413c91112..6f5a17759aeb0f2c027bc803f75c2263a2db2aa7 100644 (file)
@@ -19,9 +19,7 @@ load_lib dwarf.exp
 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
 
index dfb531371eba0c5596d3de1eab1a7d546ff28caa..8ff6dadbe8b2497f07e34a2a8a350f92e2b7ae27 100644 (file)
@@ -22,9 +22,7 @@ load_lib dwarf.exp
 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
index e532c4cb8f217a550329401e4bcd68a45fa80b83..d4b7917fbdd1248a000c56304aa4e58f2f8cf15d 100644 (file)
@@ -20,9 +20,7 @@ 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
 
 if {[prepare_for_testing "failed to prepare" "$testfile" $srcfile {nodebug nopie}]} {
     return -1
index 63e75fb63436e297dc3a323c78b6d14d55d92447..a4bd938961e2ea6bf57a476773fb038ad6d17fa2 100644 (file)
@@ -18,9 +18,7 @@ load_lib dwarf.exp
 # 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
index b654de40fcb428a1de52dcab10fba5f2bd749f58..e753ef1293ef8eeee2eba97c23808e33f1ab4578 100644 (file)
@@ -22,9 +22,7 @@ require {!is_remote host}
 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
 
index a6fb3e875a8d0bbf3670f9dfb84e671781398fa0..ae8e20f46361644c0e8ed05856283f7be5fe0cec 100644 (file)
@@ -27,9 +27,7 @@ require {!is_remote host}
 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
 
index d906eeb69cc497797dba12d88503e4e6b004d22c..6bcb29883245e441117284567eb0bd0ad619dd03 100644 (file)
@@ -22,9 +22,7 @@ require {!is_remote host}
 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
 
index 06c0c67a35ed6eb117654612ddbedfba08c9ada7..fc1966a016bfd75ee555142b0299e27c5f699744 100644 (file)
@@ -20,9 +20,7 @@ load_lib trace-support.exp
 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
 
index 0b89741e361b779e477ec67d6a518914d3660c66..3fafe9cf6f8f0843eef76d08dc408eb1777a4182 100644 (file)
@@ -23,7 +23,7 @@ require dwarf2_support
 # 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
index 94db94289e25788dd4519c7ee131f82e0d4f103e..caca9690e9bbf3a964aacf1b3c6bd866586582da 100644 (file)
@@ -20,9 +20,7 @@ set MIFLAGS "-i=mi"
 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] {
index 4657509e84c944cf29fb481d20319421d7ce1228..76acabc0adefb57ad4bbb3dddba3db7582c8b38c 100644 (file)
@@ -28,9 +28,8 @@ if [info exists COMPILE] {
     # 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}
index d2c29afa81d11220045fc8f16a94fb5f42088745..2fab2bbd80ad03d84bcf0d1817890645df72f8dd 100644 (file)
@@ -19,10 +19,7 @@ require allow_python_tests
 
 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.
index d19516df9a85d0ef2b4271201f90191eb833d4c0..c43fb7fc9872f4c93b438a6190cb498d0aef594b 100644 (file)
@@ -22,9 +22,8 @@ if [info exists COMPILE] {
     # 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] } {
index 0d817378d97a167c3df9ae842f24b8beb318497c..5bf9ae129ac576129426c1096ea6c6fee572d37c 100644 (file)
@@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} "debug $fla
 }
 
 # 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.
 
index dd6e4d2045f300d34cfd0760baddad42bb91b7ca..9654dffc378e75cdee3bbda195acbd339058083b 100644 (file)
@@ -22,9 +22,8 @@ if [info exists COMPILE] {
     # 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] } {
index bc7e6876bd21b1a3582a8e3af6d1c0f6cbe0c883..23310e7cf9d01093ef1e1387b83b3ee2b4db74c8 100644 (file)
@@ -26,12 +26,12 @@ if [info exists COMPILE] {
                                      ] == -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
index e2af5a252b74466e822869379e72f83047aa6003..0f9fe9a1e486d0e3ebbfe1c052629bb83600aaa1 100644 (file)
@@ -3414,6 +3414,11 @@ proc is_x86_like_target {} {
     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 {