From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id DD5623858D28; Wed, 25 Jan 2023 16:21:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD5623858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674663661; bh=7iflR3cO9YdxUIL4pesmO1e7kuGE9WLZ5GLFM0Xhvos=; h=From:To:Subject:Date:From; b=uXAzsEXdOcoQMDJ3wCmqmc48gN9CeI6NCupKWUbp8+Ecvfz1kYdyTftmnfGkaNxMi Dzx0wYtlN1xpdr28XXiL9nbMMUjsidPYnvC7RF6hvDzrS7Cwrsk9cJcaXzxqRVwtpE bBnY9ElHGjFdrxmgOcX0DKarvSukT9RP8Cn+gmws= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Convert skip_altivec_tests to allow form X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 9bf5a417591587233e1580973c8a64dfd4c2ac32 X-Git-Newrev: c2b7bed6454a1253564715f7985a6abac5eb4cdc Message-Id: <20230125162101.DD5623858D28@sourceware.org> Date: Wed, 25 Jan 2023 16:21:01 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dc2b7bed6454a= 1253564715f7985a6abac5eb4cdc commit c2b7bed6454a1253564715f7985a6abac5eb4cdc Author: Tom Tromey Date: Sat Jan 21 22:43:55 2023 -0700 Convert skip_altivec_tests to allow form =20 This renames skip_altivec_tests to allow_altivec_tests and updates its users to use require. Diff: --- gdb/testsuite/gdb.arch/altivec-abi.exp | 3 ++- gdb/testsuite/gdb.arch/altivec-regs.exp | 4 ++-- gdb/testsuite/gdb.arch/powerpc-vector-regs.exp | 3 ++- gdb/testsuite/lib/gdb.exp | 28 +++++++++++++---------= ---- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arc= h/altivec-abi.exp index 28d0ae1fff9..1c3cda451e4 100644 --- a/gdb/testsuite/gdb.arch/altivec-abi.exp +++ b/gdb/testsuite/gdb.arch/altivec-abi.exp @@ -21,7 +21,8 @@ # This file uses altivec-abi.c for input. # =20 -if {![istarget "powerpc*"] || [skip_altivec_tests]} { +require allow_altivec_tests +if {![istarget "powerpc*"]} { verbose "Skipping altivec abi tests." return } diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.ar= ch/altivec-regs.exp index 21e019122ce..8a7fd2e502c 100644 --- a/gdb/testsuite/gdb.arch/altivec-regs.exp +++ b/gdb/testsuite/gdb.arch/altivec-regs.exp @@ -21,8 +21,8 @@ # This file uses altivec-regs.c for input. # =20 - -if {![istarget "powerpc*"] || [skip_altivec_tests]} { +require allow_altivec_tests +if {![istarget "powerpc*"]} { verbose "Skipping altivec register tests." return } diff --git a/gdb/testsuite/gdb.arch/powerpc-vector-regs.exp b/gdb/testsuite= /gdb.arch/powerpc-vector-regs.exp index f9d404b4835..bbcf45a555d 100644 --- a/gdb/testsuite/gdb.arch/powerpc-vector-regs.exp +++ b/gdb/testsuite/gdb.arch/powerpc-vector-regs.exp @@ -20,7 +20,8 @@ # 0 to 31 in each of the 16 bytes of each corresponding register, and # we then check if gdb sees these same values. =20 -if {![istarget "powerpc*"] || [skip_altivec_tests]} { +require allow_altivec_tests +if {![istarget "powerpc*"]} { verbose "Skipping PowerPC vector register tests." return } diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 3188f2de615..4346c858579 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3457,18 +3457,18 @@ proc support_displaced_stepping {} { return 0 } =20 -# Run a test on the target to see if it supports vmx hardware. Return 0 i= f so,=20 -# 1 if it does not. Based on 'check_vmx_hw_available' from the GCC testsu= ite. +# Run a test on the target to see if it supports vmx hardware. Return 1 i= f so,=20 +# 0 if it does not. Based on 'check_vmx_hw_available' from the GCC testsu= ite. =20 -gdb_caching_proc skip_altivec_tests { +gdb_caching_proc allow_altivec_tests { global srcdir subdir gdb_prompt inferior_exited_re =20 - set me "skip_altivec_tests" + set me "allow_altivec_tests" =20 # Some simulators are known to not support VMX instructions. if { [istarget powerpc-*-eabi] || [istarget powerpc*-*-eabispe] } { - verbose "$me: target known to not support VMX, returning 1" 2 - return 1 + verbose "$me: target known to not support VMX, returning 0" 2 + return 0 } =20 # Make sure we have a compiler that understands altivec. @@ -3477,8 +3477,8 @@ gdb_caching_proc skip_altivec_tests { } elseif [test_compiler_info xlc*] { set compile_flags "additional_flags=3D-qaltivec" } else { - verbose "Could not compile with altivec support, returning 1" 2 - return 1 + verbose "Could not compile with altivec support, returning 0" 2 + return 0 } =20 # Compile a test program containing VMX instructions. @@ -3493,7 +3493,7 @@ gdb_caching_proc skip_altivec_tests { } } if {![gdb_simple_compile $me $src executable $compile_flags]} { - return 1 + return 0 } =20 # Compilation succeeded so now run it via gdb. @@ -3506,22 +3506,22 @@ gdb_caching_proc skip_altivec_tests { gdb_expect { -re ".*Illegal instruction.*${gdb_prompt} $" { verbose -log "\n$me altivec hardware not detected"=20 - set skip_vmx_tests 1 + set allow_vmx_tests 0 } -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { verbose -log "\n$me: altivec hardware detected"=20 - set skip_vmx_tests 0 + set allow_vmx_tests 1 } default { warning "\n$me: default case taken" - set skip_vmx_tests 1 + set allow_vmx_tests 0 } } gdb_exit remote_file build delete $obj =20 - verbose "$me: returning $skip_vmx_tests" 2 - return $skip_vmx_tests + verbose "$me: returning $allow_vmx_tests" 2 + return $allow_vmx_tests } =20 # Run a test on the power target to see if it supports ISA 3.1 instructions