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/31566] [gdb/testsuite] is_aarch32_target contains dead code Date: Wed, 27 Mar 2024 19:25:17 +0000 [thread overview] Message-ID: <bug-31566-4717-CS4ikDNA1J@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-31566-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=31566 --- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> --- (In reply to Tom de Vries from comment #2) > (In reply to Tom de Vries from comment #1) > > I'll try to run this in an armhf container on an aarch64-linux system. > > Turns out that one identifies as armv8l-unknown-linux-gnueabihf. > > Which means that is_aarch32_target returns true because istarget "arm*-*-*" > matches. So, is_aarch32_target could be simplified to: ... diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index d48ea37c0cc..46f8e36ef4d 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3647,21 +3647,8 @@ proc is_x86_64_m64_target {} { # Return 1 if this target is an arm or aarch32 on aarch64. gdb_caching_proc is_aarch32_target {} { - if { [istarget "arm*-*-*"] } { - return 1 - } - - if { ![istarget "aarch64*-*-*"] } { - return 0 - } - - set list {} - foreach reg \ - {r0 r1 r2 r3} { - lappend list "\tmov $reg, $reg" - } - - return [gdb_can_simple_compile aarch32 [join $list \n]] + # Aarch32 on aarch64 is classified as armv8l. + return [istarget "arm*-*-*"] } # Return 1 if this target is an aarch64, either lp64 or ilp32. ... -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2024-03-27 19:25 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-27 15:28 [Bug testsuite/31566] New: [gdb/testsuite] is_aarch32_target return false on aarch32 vries at gcc dot gnu.org 2024-03-27 15:32 ` [Bug testsuite/31566] " vries at gcc dot gnu.org 2024-03-27 16:11 ` vries at gcc dot gnu.org 2024-03-27 16:19 ` [Bug testsuite/31566] [gdb/testsuite] is_aarch32_target contains dead code vries at gcc dot gnu.org 2024-03-27 19:25 ` vries at gcc dot gnu.org [this message] 2024-03-27 19:29 ` 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-31566-4717-CS4ikDNA1J@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).