From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A41783858D34; Wed, 27 Mar 2024 19:25:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A41783858D34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1711567518; bh=+5hELVdsa7n0O34BGauWPMXfZVafydsDZYmg+YOvwRI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pAYkDpzohBoJnDqi3Y8w86gGznOvZbSAUANVsg+haBjD2n7Hhj5QBolv8Qww5C5ZK 4G6tdOJJKDPwQVAK7/tVDNv0yoAIIUS/fZMNHIXExgVqb4z9nq37yyeBZWedNN1WZT v19yiBWiNmD0ZKh7brtIaYUPdfNBwn2jgySqyjyo= From: "vries at gcc dot gnu.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 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31566 --- Comment #3 from Tom de Vries --- (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. >=20 > Turns out that one identifies as armv8l-unknown-linux-gnueabihf. >=20 > 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. ... --=20 You are receiving this mail because: You are on the CC list for the bug.=