From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D875A396ECE0; Fri, 27 Nov 2020 08:47:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D875A396ECE0 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/26950] FAIL: gdb.arch/amd64-disp-step-avx.exp: vex2: continue to test_rip_vex2_end Date: Fri, 27 Nov 2020 08:47:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 08:47:33 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26950 --- Comment #1 from Tom de Vries --- Tentative patch, borrows code from i386-avx.c: ... diff --git a/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp b/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp index 5dd827a..f720ceb 100644 --- a/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp +++ b/gdb/testsuite/gdb.arch/amd64-disp-step-avx.exp @@ -23,6 +23,11 @@ if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { return } +if { ![have_avx] } { + verbose "Skipping x86_64 displaced stepping tests." + return +} + standard_testfile .S set options [list debug \ diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index f2954fd..70f2a92 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3117,6 +3117,47 @@ gdb_caching_proc skip_tsx_tests { return $skip_tsx_tests } +gdb_caching_proc have_avx { + global srcdir subdir gdb_prompt inferior_exited_re + + set me "have_avx" + if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } { + verbose "$me: target does not support avx, returning 1" 2 + return 0 + } + + # Compile a test program. + set src { + #include "nat/x86-cpuid.h" + + int main() { + unsigned int eax, ebx, ecx, edx; + + if (!x86_cpuid (1, &eax, &ebx, &ecx, &edx)) + return 0; + + if ((ecx & (bit_AVX | bit_OSXSAVE)) =3D=3D (bit_AVX | bit_OSXSA= VE)) + return 1; + else + return 0; + } + } + set compile_flags "incdir=3D${srcdir}/.." + if {![gdb_simple_compile $me $src executable $compile_flags]} { + return 0 + } + + set code [catch {exec "$obj"} results options] + puts "results: $results" + puts "code: $code" + + remote_file build delete $obj + + verbose "$me: returning $code" 2 + return $code +} + + # Run a test on the target to see if it supports avx512bf16. Return 0 if = so, # 1 if it does not. Based on 'check_vmx_hw_available' from the GCC testsu= ite. ... --=20 You are receiving this mail because: You are on the CC list for the bug.=