From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.freebsd.org (mx2.freebsd.org [96.47.72.81]) by sourceware.org (Postfix) with ESMTPS id DF3D43858D32 for ; Tue, 4 Oct 2022 17:08:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DF3D43858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4Mhkfr51s4z3mQp; Tue, 4 Oct 2022 17:08:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mhkfr4D6Yz4FJ4; Tue, 4 Oct 2022 17:08:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664903284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m9f0jKAhyNXYrwGZ+01Je6NyaHqFstQY6XRveRS6ivY=; b=nRWsa84Xkgi/nkR65Pm0RYR6YHekYINCLKQQMYaG9D822rSdrflTXqa4IgupxTU3WyNHRi /u8tgwlRQ2Yl+PTsNuvQZ9HHKvjKCt2TAzgO+BW1aWbh8+bhTFdsC9j9lyD+IIpDGFZQH0 dSNiODzAyki542ZVKWc1UNgz6MARBjhfgiGI1Ie6jrDwtI1NIwF5f8zBO4V1wxaaupLPFs GbIwiRffNq8+If6mZieFm0Tp4YZ36r6Ica9tRyTJTvxwtY4RNr4VZJDMgsTqgU/qBSvnUW odfgS8FEOYqiRUH2txVbwUZSzwYCsot6La0dkLhXOcBau96WU6dvZi/qsixIkQ== Received: from [IPV6:2601:648:8684:ad0:c138:fd94:ebf2:bb32] (unknown [IPv6:2601:648:8684:ad0:c138:fd94:ebf2:bb32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Mhkfr0m14z1NZq; Tue, 4 Oct 2022 17:08:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <73479562-ab47-dfbf-aadc-7a2203c0f0e4@FreeBSD.org> Date: Tue, 4 Oct 2022 10:08:02 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Content-Language: en-US To: Luis Machado , Pedro Alves , gdb-patches@sourceware.org References: <20220920123012.189293-1-luis.machado@arm.com> From: John Baldwin Subject: Re: [PATCH] [Arm] Remove dead FPA code In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664903284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m9f0jKAhyNXYrwGZ+01Je6NyaHqFstQY6XRveRS6ivY=; b=cQrtqULbhQoNS/i1lJ4Kzt4MvRdLrHWyZORYj8cA3VfWYnI6UOqRrn3mOUN7hDfmvvVorn MNtWlsbXH9THl9Pn3uh9z3vTY4SkufxjsKB+OQJx81Mez7tJaMT43KDfQjSXShQERrkK09 085oc1kWne5khpk6q1BbLC9kul9/CDgtK2P8LEER4rTJuznCxVoCN54qfHjVEG8bnGRL8f v+dFmO/gNk508GYKNZheQMbQa0B7VwOOSw7XMBzl/yqHPtpLrqRhZ7E+joKTlD9c9LG+Sl IRO//p1hPuvfVNfy1vag7VBmXZf85xPJ7rnxt00xihAIGxIUfCsrbpRDA7imZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664903284; a=rsa-sha256; cv=none; b=CrQJ3GJrMExyVIP/qL5j66qEchInrA9g9TX4BbTE+wkc7zRVY4Zj9PrMXgmYBGz17gjMcV D7dJueU+ECW85KwpIYjv6u9n9KsS9V5zXwTud+IXhIF0dI108pDVT+Km0DkuG5EJjAmHqb C0b9HiDu5g/HKmakjXU+BWqRS7UAhJ79qjsq7aX2pkiGPEFitekEqpEREx9bqexYv/znLC 94RiqYGq2s9EWflFH+eiIZizSk1zKzhrAdUy1I2xIKLLjZf9wa8J+MhchVqpKfYJ9C8aoo JHbqgWlwv4QLFHma7Hrc6HV8qeTcUpN28Bui40rIGYlkjyC3u9eQaLjUT08P1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2022 17:08:06 -0000 On 10/4/22 1:43 AM, Luis Machado via Gdb-patches wrote: > On 10/3/22 20:16, Pedro Alves wrote: >> On 2022-09-20 1:30 p.m., Luis Machado via Gdb-patches wrote: >> >>> diff --git a/gdb/arch/arm.h b/gdb/arch/arm.h >>> index 36757493406..74a6ba93bc7 100644 >>> --- a/gdb/arch/arm.h >>> +++ b/gdb/arch/arm.h >>> @@ -44,11 +44,6 @@ enum gdb_regnum { >>> ARM_SP_REGNUM = 13, /* Contains address of top of stack */ >>> ARM_LR_REGNUM = 14, /* address to return to from a function call */ >>> ARM_PC_REGNUM = 15, /* Contains program counter */ >>> - /* F0..F7 are the fp registers for the (obsolete) FPA architecture. */ >> >> Shouldn't we leave behind a comment explaining why there's a hole between 15 and 25? > > I pondered about this a bit more, and I think we should close the gap and bring CPSR down to > 16, its "natural" position. It is what linux uses for user_regs as well, in gdb/arch/arm-linux.h: > > /* The index to access CSPR in user_regs defined in GLIBC. */ > #define ARM_CPSR_GREGNUM 16 > >> >> IIRC the numbers can't be changed since we need to handle the case when the target >> doesn't send an xml tdesc, so it'd be good to help future readers understand why >> there's a hole. > > That's correct. Though a 32-bit Arm target that doesn't support XML descriptions these days is not very > common. I haven't seen one in a while. > > I'm willing to declare old 32-bit Arm targets that don't send XML target descriptions back as unsupported. > > To that effect, I suppose we should add a note to make it more explicit. > > More below. FWIW, the GDB stub in FreeBSD's kernel does not use XML target descriptions for any architectures, but it also only tends to do GPRs and not any floating point. For 32-bit ARM it does not report any register values higher than number 15 (PC), so it would not be affected by changing this. Do you know if LLDB supports floating-point registers on 32-bit arm as well? The register numbers in the 'g' packet are effectively part of the protocol shared between the two, so might be worth coording with lldb folks as well if they support FPA? -- John Baldwin