public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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 [thread overview] Message-ID: <bug-26950-4717-luRzvVZbtS@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-26950-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=26950 --- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> --- 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)) == (bit_AVX | bit_OSXSAVE)) + return 1; + else + return 0; + } + } + set compile_flags "incdir=${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 testsuite. ... -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2020-11-27 8:47 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-26 12:20 [Bug testsuite/26950] New: " vries at gcc dot gnu.org 2020-11-27 8:47 ` vries at gcc dot gnu.org [this message] 2021-09-04 8:44 ` [Bug testsuite/26950] " cvs-commit at gcc dot gnu.org 2021-09-04 10:11 ` cvs-commit at gcc dot gnu.org 2021-09-04 10:12 ` vries at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-26950-4717-luRzvVZbtS@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).