From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01olkn2020.outbound.protection.outlook.com [40.92.98.20]) by sourceware.org (Postfix) with ESMTPS id 1DB8A3858D32 for ; Sun, 2 Oct 2022 13:39:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1DB8A3858D32 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bkek9ndv/tcotUpoCM7uWtt9QfJFYeqHq+CqJoIRag2GijAZLAPuC+PG5hpmGNqrzyRfCZ/ZlluOeG8kiuO7v4o5+IlJjJqyZGpv60sNs3e3kXx/0rlmckjSYdQfmS3W1r+AM0csh6NbY1O5nUn/XWV92NdMdls2n43ovQ0ut5a3GtMoEL5II88012e1iUu/c5xxk74zdgAlTia7/kjooNVL1WZWWQx0fimcljK22rGs4gDIGorQ79QD9uu7cNqbeoKolzfplkNdnYtwOcBK/FuEHrNWGmRFlab1LThYJ9mn/MsHMdHqzdhRgELwrJpu3xbaUpYm2l6ih3Q3R69+wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=E0ZkqlGIQ9BEJCwUTIvfvkq2OhAsVmMy+YSNa+Ty/Zw=; b=HcHMPm8782JDf/wyn4iGt9WHdpTZ7UIn6OXtAYyRUe8dKgCE2FHMLsmXQc+3130TfKJp0lzAYyHycS8f5TN7zmoNLrxgX7syYonRmqb8+3N3DxNm8P/dnfOcqfno+QZJMlBFLkgOeuTp73ohNlmD3GDW5cm+YTSYqXfBwrDvYOwBDHRLu1Lry5zfR08cYVrY4G6LawO0zYv2jcEd5Miyu9junOELwhIT0Na8nzqSt+xo44k24TSJhyKr3Kydj4Ecn2l9NxBowkXBVUsG4AOrboD0ndYyCtJeexYiDfaSi+QbvsNqG2dwIk6WfWHFtsUUlm1gwsn40ii3EhFQS0IMNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:197::9) by OSZP286MB2288.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:18f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.24; Sun, 2 Oct 2022 13:39:30 +0000 Received: from OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM ([fe80::e442:a4b4:201c:8097]) by OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM ([fe80::e442:a4b4:201c:8097%4]) with mapi id 15.20.5676.023; Sun, 2 Oct 2022 13:39:29 +0000 From: Enze Li To: Luis Machado via Gdb-patches Subject: Re: [PATCH] [Arm] Remove dead FPA code References: <20220920123012.189293-1-luis.machado@arm.com> Date: Sun, 02 Oct 2022 21:39:25 +0800 In-Reply-To: <20220920123012.189293-1-luis.machado@arm.com> (Luis Machado via Gdb-patches's message of "Tue, 20 Sep 2022 13:30:12 +0100") Message-ID: Content-Type: text/plain X-TMN: [jwka0uC1bSll0wLugyGaBEwRtVHn3X88] X-ClientProxiedBy: SGBP274CA0019.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::31) To OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:197::9) X-Microsoft-Original-Message-ID: <87k05is5te.fsf@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3P286MB2152:EE_|OSZP286MB2288:EE_ X-MS-Office365-Filtering-Correlation-Id: 88695d13-c53b-4d76-7f2c-08daa47b87de X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a15OEU0lO+Qv+FeBm11aHJVcpM85F2553Ho0bmOaFqCGOPVpOfp9VbX16Ox9PoXX9iPEP9SC69OVQOiVeCfcN84xVkjlHFklK3qRnb1ra9yZ5ViCoOox3Z8BAwMtAGwwv3zzO7+6qij0wX7gsBAv9b80sCA/Z+5hIvy0VpHpi2YmsBPOEEF8XkXeSDbiy8TjaV9ioZtv1aQhvXlqTf4qky95/oYsojnheE8ADkACEJUaY3jqUbX3pjI7fsrgqC8zc6yxHnIHL7k8qMKM35AFCzxCfNxo3NK6Mf78X4xGQFNuttWPFnl1BVitxbG+3F4tBQ30MVYBRP1yJ8ZhgU2gl9IpUfX57PplvfmUqSGuWAbeeRuv5zmxDfBdWBqqtd7M+r/zEQAF8mA1U09mUf5u01ND2MdlsQX860JVFySIM9x4GDjdsPZUDtnYL0grfId91Unb4J1d+H5KQjBdW3SFNn2D/p1MngFL76uINPG9v/7tZlVUzxX6ceY71YJsakkLRhrypwZSkaMeMVZPPSMwm6ds7VCP/1dCMedDjZb3fIMMDZ3rRv4ynTsH6e/UCpVEyuvDQVLJ5/fLK7phB/9EjLqzEHeNqRinkWNw5BzfmGKR5YD9GCPPHN3RD3SUrrr20mqlTY4GtovK+0S9dPgjYY2gZvCHrc0S11tEVUkIZn3Tw6InHyrwE7j8mLtiWDxr X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?O62yCn6vL5D+m9s6Bapc7FkH4U47zCdabn3Pp5immzX+OMCwnjJ757aU8hmo?= =?us-ascii?Q?jIdnYc73Z0ZH6z3KaivehlN6aSr0cVEKoDmyLZ4iY71PK8cz1R49a60GSBTT?= =?us-ascii?Q?3nr4KqsUwHoKfskdRsFJeIrJRk/FrpkLK3ca5I4xOxTZGVvpN/7Clq3LOmP+?= =?us-ascii?Q?jf1ItM8s3v+HfSKbIQ7mVMPMFVCraAAbuhnrd45FyCnJYLidnT52LH+MPOzt?= =?us-ascii?Q?LAMj3DtJRlUKHigbu1BoURENqJZNOJLk/4STAKj14AlmidO31B0bz+Jjw1Ws?= =?us-ascii?Q?y5UVlGpQZl34d3sf2AOXRy6HfhG2ozVHpxmBDqWgugix1eQkFrgRKXFnVnlQ?= =?us-ascii?Q?VOQGksEsD+OK7dPTurGMFEBOg8hzj9n8pdCNfCD0bjnr7LzC76fmI2DGlpS+?= =?us-ascii?Q?zcB4j+xT/Ic6UnDVY9zl6NY9Zqon6BrXDq31Vlr8I0eXu0WHGz92Yoxf+CiM?= =?us-ascii?Q?lnKazG8vnGdh4+HDLkQEE6kQWqvk0WzT17s2iGDuGoc47mX7NlivcOz4tRWa?= =?us-ascii?Q?VxHjyPCCDX2YqTutXZmwiSjkQKY6ILO1ETmyBsgyBcENhZ9VV1RUgbdPPNTb?= =?us-ascii?Q?gLjenHjR3yXyIuvdHopP/A9M7rtGDA+gdNjT6jP1zfs3KtqqHEFpN11t5Y5V?= =?us-ascii?Q?PEUquyXzeIGApS2s7kcM/SHmLPNukiXr0C4stlkSB5m/G4MCpaC7pojDGy3I?= =?us-ascii?Q?6BYCoiHbgb0VfFd3515YfBm3rFmYD1XbxIL7y1MJmObWYHQ6RSfuAiR+jnf4?= =?us-ascii?Q?qGs+VcMF8QqostjkLQNyc8FI9/JTTJ2SZogZSED2Pd5zPOjaBGPCzbU5Dk2z?= =?us-ascii?Q?5VfePIUCDBGLQbAkvniTTHkq61Hcvolw//9qhCDWhEqiHUwY08Zgwwl/UIhD?= =?us-ascii?Q?PPd8m+bWNp1eFrxUmm83wgLoanaMoiD0E+0KFP/EHeDtUagQSshLpAkfzShz?= =?us-ascii?Q?4AAfrhpSzShqMlbBxnUpcNntjVfztIBjxO18eY6sqiYbiiFuVYJGlALurrBd?= =?us-ascii?Q?oFq54OyEpSTzH3XHK++cthca1u3QUzc4LiUdfac4ftEkDQywoEto/vpk/Ezc?= =?us-ascii?Q?+FKG6DtViMJDrwOMYVS+f+bSrLnvBN25/OVMlouvx5ov0k8UPPGVnFAmqdjs?= =?us-ascii?Q?OKqfzhbnml4c3LutsHqppX0IH1TNnJa9F2OxUa6ruPVrjZNofimW7lp163se?= =?us-ascii?Q?wpVC7jVeUpEdNv9waQCun0I0329OMryW/5g06Tk6YhHb8IURSg23LOkIQvCK?= =?us-ascii?Q?XGWnt1TGVvI8T/wPWYU0L+ZUNkFW6xnVugXYr0tm/g=3D=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-05f45.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 88695d13-c53b-4d76-7f2c-08daa47b87de X-MS-Exchange-CrossTenant-AuthSource: OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2022 13:39:29.8471 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZP286MB2288 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, 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: Sun, 02 Oct 2022 13:39:40 -0000 On Tue, Sep 20 2022 at 01:30:12 PM +0100, Luis Machado via Gdb-patches wrote: > FPA has been deprecated for a while now. It was removed from GCC in 2012, > but somehow it managed to survive in GDB for a little while longer. > > It is time to let FPA rest in peace. > > While at it, make VFP the default floating point model for 32-bit Arm. > > It would be nice to get some *BSD testing as some changes touch that code > and I'm not properly setup to validate the changes for those OS'. Hi Luis, I have tested this patch on FreeBSD, NetBSD and OpenBSD and found no build errors. All these tests are based on this commit[1]. [1] 6519cd1a15fda2b67ae3e4ad8a2758615d3e0f9f Thanks, Enze > --- > gdb/NEWS | 4 + > gdb/aarch64-linux-nat.c | 4 +- > gdb/arch/arm.c | 5 - > gdb/arch/arm.h | 9 - > gdb/arm-bsd-tdep.c | 48 ---- > gdb/arm-linux-nat.c | 106 +------- > gdb/arm-linux-tdep.c | 131 +-------- > gdb/arm-linux-tdep.h | 29 -- > gdb/arm-netbsd-nat.c | 4 +- > gdb/arm-tdep.c | 286 +------------------- > gdb/arm-tdep.h | 3 - > gdb/doc/gdb.texinfo | 13 +- > gdb/features/Makefile | 2 - > gdb/features/arm/arm-fpa.c | 23 -- > gdb/features/arm/arm-fpa.xml | 23 -- > gdb/features/arm/arm-m-profile-with-fpa.c | 39 --- > gdb/features/arm/arm-m-profile-with-fpa.xml | 39 --- > gdb/target-descriptions.c | 4 - > gdb/testsuite/gdb.base/long_long.exp | 18 +- > gdbserver/linux-arm-low.cc | 7 +- > gdbsupport/tdesc.cc | 1 - > gdbsupport/tdesc.h | 1 - > 22 files changed, 33 insertions(+), 766 deletions(-) > delete mode 100644 gdb/features/arm/arm-fpa.c > delete mode 100644 gdb/features/arm/arm-fpa.xml > delete mode 100644 gdb/features/arm/arm-m-profile-with-fpa.c > delete mode 100644 gdb/features/arm/arm-m-profile-with-fpa.xml > > diff --git a/gdb/NEWS b/gdb/NEWS > index 555ef2ddf77..fcd7b686e02 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -3,6 +3,10 @@ > > *** Changes since GDB 12 > > +* Removed support for the 32-bit Arm FPA floating point format. FPA is an > + old floating point format that is no longer supported in GCC since at least > + 2012. > + > * GDB now supports dumping memory tag data for AArch64 MTE. It also supports > reading memory tag data for AArch64 MTE from core files generated by > the gcore command or the Linux kernel. > diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c > index eda79ec6d35..4d36cd47567 100644 > --- a/gdb/aarch64-linux-nat.c > +++ b/gdb/aarch64-linux-nat.c > @@ -551,7 +551,7 @@ aarch32_fetch_registers (struct regcache *regcache, int regno) > if (tdep->vfp_register_count > 0) > fetch_fpregs_from_thread (regcache); > } > - else if (regno < ARM_F0_REGNUM || regno == ARM_PS_REGNUM) > + else if (regno <= ARM_PC_REGNUM || regno == ARM_PS_REGNUM) > fetch_gregs_from_thread (regcache); > else if (tdep->vfp_register_count > 0 > && regno >= ARM_D0_REGNUM > @@ -627,7 +627,7 @@ aarch32_store_registers (struct regcache *regcache, int regno) > if (tdep->vfp_register_count > 0) > store_fpregs_to_thread (regcache); > } > - else if (regno < ARM_F0_REGNUM || regno == ARM_PS_REGNUM) > + else if (regno <= ARM_PC_REGNUM || regno == ARM_PS_REGNUM) > store_gregs_to_thread (regcache); > else if (tdep->vfp_register_count > 0 > && regno >= ARM_D0_REGNUM > diff --git a/gdb/arch/arm.c b/gdb/arch/arm.c > index 14f0a7a7f6c..9771a60f30f 100644 > --- a/gdb/arch/arm.c > +++ b/gdb/arch/arm.c > @@ -27,7 +27,6 @@ > #include "../features/arm/arm-vfpv3.c" > #include "../features/arm/xscale-iwmmxt.c" > #include "../features/arm/arm-m-profile.c" > -#include "../features/arm/arm-m-profile-with-fpa.c" > #include "../features/arm/arm-m-profile-mve.c" > #include "../features/arm/arm-m-system.c" > > @@ -441,10 +440,6 @@ arm_create_mprofile_target_description (arm_m_profile_type m_type) > regnum = create_feature_arm_arm_vfpv2 (tdesc, regnum); > break; > > - case ARM_M_TYPE_WITH_FPA: > - regnum = create_feature_arm_arm_m_profile_with_fpa (tdesc, regnum); > - break; > - > case ARM_M_TYPE_MVE: > regnum = create_feature_arm_arm_m_profile (tdesc, regnum); > regnum = create_feature_arm_arm_vfpv2 (tdesc, regnum); > 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. */ > - ARM_F0_REGNUM = 16, /* first floating point register */ > - ARM_F3_REGNUM = 19, /* last floating point argument register */ > - ARM_F7_REGNUM = 23, /* last floating point register */ > - ARM_FPS_REGNUM = 24, /* floating point status register */ > ARM_PS_REGNUM = 25, /* Contains processor status */ > ARM_WR0_REGNUM, /* WMMX data registers. */ > ARM_WR15_REGNUM = ARM_WR0_REGNUM + 15, > @@ -67,7 +62,6 @@ enum gdb_regnum { > ARM_FP_REGNUM = 11, /* Frame register in ARM code, if used. */ > THUMB_FP_REGNUM = 7, /* Frame register in Thumb code, if used. */ > ARM_LAST_ARG_REGNUM = ARM_A4_REGNUM, > - ARM_LAST_FP_ARG_REGNUM = ARM_F3_REGNUM > }; > > /* Register count constants. */ > @@ -103,7 +97,6 @@ enum arm_fp_type { > enum arm_m_profile_type { > ARM_M_TYPE_M_PROFILE, > ARM_M_TYPE_VFP_D16, > - ARM_M_TYPE_WITH_FPA, > ARM_M_TYPE_MVE, > ARM_M_TYPE_SYSTEM, > ARM_M_TYPE_INVALID > @@ -157,8 +150,6 @@ enum system_register_address : CORE_ADDR > > /* r0-r12,sp,lr,pc,cpsr. */ > #define ARM_CORE_REGS_SIZE (17 * ARM_INT_REGISTER_SIZE) > -/* f0-f8,fps. */ > -#define ARM_FP_REGS_SIZE (8 * ARM_FP_REGISTER_SIZE + ARM_INT_REGISTER_SIZE) > /* d0-d15,fpscr. */ > #define ARM_VFP2_REGS_SIZE (16 * ARM_VFP_REGISTER_SIZE + ARM_INT_REGISTER_SIZE) > /* d0-d31,fpscr. */ > diff --git a/gdb/arm-bsd-tdep.c b/gdb/arm-bsd-tdep.c > index 13d6e527d58..72421bb26d5 100644 > --- a/gdb/arm-bsd-tdep.c > +++ b/gdb/arm-bsd-tdep.c > @@ -29,39 +29,6 @@ > /* Sizeof `struct reg' in . */ > #define ARMBSD_SIZEOF_GREGS (17 * 4) > > -/* Sizeof `struct fpreg' in -#define ARMBSD_SIZEOF_FPREGS ((1 + (8 * 3)) * 4) > - > -static int > -armbsd_fpreg_offset (int regnum) > -{ > - if (regnum == ARM_FPS_REGNUM) > - return 0; > - > - return 4 + (regnum - ARM_F0_REGNUM) * 12; > -} > - > -/* Supply register REGNUM from the buffer specified by FPREGS and LEN > - in the floating-point register set REGSET to register cache > - REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */ > - > -static void > -armbsd_supply_fpregset (const struct regset *regset, > - struct regcache *regcache, > - int regnum, const void *fpregs, size_t len) > -{ > - const gdb_byte *regs = (const gdb_byte *) fpregs; > - int i; > - > - gdb_assert (len >= ARMBSD_SIZEOF_FPREGS); > - > - for (i = ARM_F0_REGNUM; i <= ARM_FPS_REGNUM; i++) > - { > - if (regnum == i || regnum == -1) > - regcache->raw_supply (i, regs + armbsd_fpreg_offset (i)); > - } > -} > - > /* Supply register REGNUM from the buffer specified by GREGS and LEN > in the general-purpose register set REGSET to register cache > REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */ > @@ -84,13 +51,6 @@ armbsd_supply_gregset (const struct regset *regset, > > if (regnum == ARM_PS_REGNUM || regnum == -1) > regcache->raw_supply (i, regs + 16 * 4); > - > - if (len >= ARMBSD_SIZEOF_GREGS + ARMBSD_SIZEOF_FPREGS) > - { > - regs += ARMBSD_SIZEOF_GREGS; > - len -= ARMBSD_SIZEOF_GREGS; > - armbsd_supply_fpregset (regset, regcache, regnum, regs, len); > - } > } > > /* ARM register sets. */ > @@ -103,12 +63,6 @@ static const struct regset armbsd_gregset = > REGSET_VARIABLE_SIZE > }; > > -static const struct regset armbsd_fpregset = > -{ > - NULL, > - armbsd_supply_fpregset > -}; > - > /* Iterate over supported core file register note sections. */ > > void > @@ -119,6 +73,4 @@ armbsd_iterate_over_regset_sections (struct gdbarch *gdbarch, > { > cb (".reg", ARMBSD_SIZEOF_GREGS, ARMBSD_SIZEOF_GREGS, &armbsd_gregset, NULL, > cb_data); > - cb (".reg2", ARMBSD_SIZEOF_FPREGS, ARMBSD_SIZEOF_FPREGS, &armbsd_fpregset, > - NULL, cb_data); > } > diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c > index 0188c78fe7a..a6a5745fdf9 100644 > --- a/gdb/arm-linux-nat.c > +++ b/gdb/arm-linux-nat.c > @@ -109,96 +109,6 @@ class arm_linux_nat_target final : public linux_nat_target > > static arm_linux_nat_target the_arm_linux_nat_target; > > -/* Get the whole floating point state of the process and store it > - into regcache. */ > - > -static void > -fetch_fpregs (struct regcache *regcache) > -{ > - int ret, regno, tid; > - gdb_byte fp[ARM_LINUX_SIZEOF_NWFPE]; > - > - /* Get the thread id for the ptrace call. */ > - tid = regcache->ptid ().lwp (); > - > - /* Read the floating point state. */ > - if (have_ptrace_getregset == TRIBOOL_TRUE) > - { > - struct iovec iov; > - > - iov.iov_base = &fp; > - iov.iov_len = ARM_LINUX_SIZEOF_NWFPE; > - > - ret = ptrace (PTRACE_GETREGSET, tid, NT_FPREGSET, &iov); > - } > - else > - ret = ptrace (PT_GETFPREGS, tid, 0, fp); > - > - if (ret < 0) > - perror_with_name (_("Unable to fetch the floating point registers")); > - > - /* Fetch fpsr. */ > - regcache->raw_supply (ARM_FPS_REGNUM, fp + NWFPE_FPSR_OFFSET); > - > - /* Fetch the floating point registers. */ > - for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++) > - supply_nwfpe_register (regcache, regno, fp); > -} > - > -/* Save the whole floating point state of the process using > - the contents from regcache. */ > - > -static void > -store_fpregs (const struct regcache *regcache) > -{ > - int ret, regno, tid; > - gdb_byte fp[ARM_LINUX_SIZEOF_NWFPE]; > - > - /* Get the thread id for the ptrace call. */ > - tid = regcache->ptid ().lwp (); > - > - /* Read the floating point state. */ > - if (have_ptrace_getregset == TRIBOOL_TRUE) > - { > - elf_fpregset_t fpregs; > - struct iovec iov; > - > - iov.iov_base = &fpregs; > - iov.iov_len = sizeof (fpregs); > - > - ret = ptrace (PTRACE_GETREGSET, tid, NT_FPREGSET, &iov); > - } > - else > - ret = ptrace (PT_GETFPREGS, tid, 0, fp); > - > - if (ret < 0) > - perror_with_name (_("Unable to fetch the floating point registers")); > - > - /* Store fpsr. */ > - if (REG_VALID == regcache->get_register_status (ARM_FPS_REGNUM)) > - regcache->raw_collect (ARM_FPS_REGNUM, fp + NWFPE_FPSR_OFFSET); > - > - /* Store the floating point registers. */ > - for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++) > - if (REG_VALID == regcache->get_register_status (regno)) > - collect_nwfpe_register (regcache, regno, fp); > - > - if (have_ptrace_getregset == TRIBOOL_TRUE) > - { > - struct iovec iov; > - > - iov.iov_base = &fp; > - iov.iov_len = ARM_LINUX_SIZEOF_NWFPE; > - > - ret = ptrace (PTRACE_SETREGSET, tid, NT_FPREGSET, &iov); > - } > - else > - ret = ptrace (PTRACE_SETFPREGS, tid, 0, fp); > - > - if (ret < 0) > - perror_with_name (_("Unable to store floating point registers")); > -} > - > /* Fetch all general registers of the process and store into > regcache. */ > > @@ -422,15 +332,11 @@ arm_linux_nat_target::fetch_registers (struct regcache *regcache, int regno) > fetch_wmmx_regs (regcache); > if (tdep->vfp_register_count > 0) > fetch_vfp_regs (regcache); > - if (tdep->have_fpa_registers) > - fetch_fpregs (regcache); > } > else > { > - if (regno < ARM_F0_REGNUM || regno == ARM_PS_REGNUM) > + if (regno <= ARM_PC_REGNUM || regno == ARM_PS_REGNUM) > fetch_regs (regcache); > - else if (regno >= ARM_F0_REGNUM && regno <= ARM_FPS_REGNUM) > - fetch_fpregs (regcache); > else if (tdep->have_wmmx_registers > && regno >= ARM_WR0_REGNUM && regno <= ARM_WCGR7_REGNUM) > fetch_wmmx_regs (regcache); > @@ -459,15 +365,11 @@ arm_linux_nat_target::store_registers (struct regcache *regcache, int regno) > store_wmmx_regs (regcache); > if (tdep->vfp_register_count > 0) > store_vfp_regs (regcache); > - if (tdep->have_fpa_registers) > - store_fpregs (regcache); > } > else > { > - if (regno < ARM_F0_REGNUM || regno == ARM_PS_REGNUM) > + if (regno <= ARM_PC_REGNUM || regno == ARM_PS_REGNUM) > store_regs (regcache); > - else if ((regno >= ARM_F0_REGNUM) && (regno <= ARM_FPS_REGNUM)) > - store_fpregs (regcache); > else if (tdep->have_wmmx_registers > && regno >= ARM_WR0_REGNUM && regno <= ARM_WCGR7_REGNUM) > store_wmmx_regs (regcache); > @@ -499,7 +401,7 @@ void > fill_fpregset (const struct regcache *regcache, > gdb_fpregset_t *fpregsetp, int regno) > { > - arm_linux_collect_nwfpe (NULL, regcache, regno, fpregsetp, 0); > + /* FPA is no longer supported. */ > } > > /* Fill GDB's register array with the floating-point register values > @@ -508,7 +410,7 @@ fill_fpregset (const struct regcache *regcache, > void > supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp) > { > - arm_linux_supply_nwfpe (NULL, regcache, -1, fpregsetp, 0); > + /* FPA is no longer supported. */ > } > > /* Fetch the thread-local storage pointer for libthread_db. */ > diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c > index 1feb69fe6dd..d5ada33a05c 100644 > --- a/gdb/arm-linux-tdep.c > +++ b/gdb/arm-linux-tdep.c > @@ -102,10 +102,8 @@ static const gdb_byte arm_linux_thumb2_le_breakpoint[] = { 0xf0, 0xf7, 0x00, 0xa > > For glibc, eglibc, and uclibc the following holds: If the FP model is > SoftVFP or VFP (which implies EABI) then the PC is at offset 9 in the > - buffer. This is also true for the SoftFPA model. However, for the FPA > - model the PC is at offset 21 in the buffer. */ > + buffer. */ > #define ARM_LINUX_JB_ELEMENT_SIZE ARM_INT_REGISTER_SIZE > -#define ARM_LINUX_JB_PC_FPA 21 > #define ARM_LINUX_JB_PC_EABI 9 > > /* > @@ -540,119 +538,6 @@ arm_linux_collect_gregset (const struct regset *regset, > gregs + ARM_INT_REGISTER_SIZE * ARM_PC_REGNUM); > } > > -/* Support for register format used by the NWFPE FPA emulator. */ > - > -#define typeNone 0x00 > -#define typeSingle 0x01 > -#define typeDouble 0x02 > -#define typeExtended 0x03 > - > -void > -supply_nwfpe_register (struct regcache *regcache, int regno, > - const gdb_byte *regs) > -{ > - const gdb_byte *reg_data; > - gdb_byte reg_tag; > - gdb_byte buf[ARM_FP_REGISTER_SIZE]; > - > - reg_data = regs + (regno - ARM_F0_REGNUM) * ARM_FP_REGISTER_SIZE; > - reg_tag = regs[(regno - ARM_F0_REGNUM) + NWFPE_TAGS_OFFSET]; > - memset (buf, 0, ARM_FP_REGISTER_SIZE); > - > - switch (reg_tag) > - { > - case typeSingle: > - memcpy (buf, reg_data, 4); > - break; > - case typeDouble: > - memcpy (buf, reg_data + 4, 4); > - memcpy (buf + 4, reg_data, 4); > - break; > - case typeExtended: > - /* We want sign and exponent, then least significant bits, > - then most significant. NWFPE does sign, most, least. */ > - memcpy (buf, reg_data, 4); > - memcpy (buf + 4, reg_data + 8, 4); > - memcpy (buf + 8, reg_data + 4, 4); > - break; > - default: > - break; > - } > - > - regcache->raw_supply (regno, buf); > -} > - > -void > -collect_nwfpe_register (const struct regcache *regcache, int regno, > - gdb_byte *regs) > -{ > - gdb_byte *reg_data; > - gdb_byte reg_tag; > - gdb_byte buf[ARM_FP_REGISTER_SIZE]; > - > - regcache->raw_collect (regno, buf); > - > - /* NOTE drow/2006-06-07: This code uses the tag already in the > - register buffer. I've preserved that when moving the code > - from the native file to the target file. But this doesn't > - always make sense. */ > - > - reg_data = regs + (regno - ARM_F0_REGNUM) * ARM_FP_REGISTER_SIZE; > - reg_tag = regs[(regno - ARM_F0_REGNUM) + NWFPE_TAGS_OFFSET]; > - > - switch (reg_tag) > - { > - case typeSingle: > - memcpy (reg_data, buf, 4); > - break; > - case typeDouble: > - memcpy (reg_data, buf + 4, 4); > - memcpy (reg_data + 4, buf, 4); > - break; > - case typeExtended: > - memcpy (reg_data, buf, 4); > - memcpy (reg_data + 4, buf + 8, 4); > - memcpy (reg_data + 8, buf + 4, 4); > - break; > - default: > - break; > - } > -} > - > -void > -arm_linux_supply_nwfpe (const struct regset *regset, > - struct regcache *regcache, > - int regnum, const void *regs_buf, size_t len) > -{ > - const gdb_byte *regs = (const gdb_byte *) regs_buf; > - int regno; > - > - if (regnum == ARM_FPS_REGNUM || regnum == -1) > - regcache->raw_supply (ARM_FPS_REGNUM, > - regs + NWFPE_FPSR_OFFSET); > - > - for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++) > - if (regnum == -1 || regnum == regno) > - supply_nwfpe_register (regcache, regno, regs); > -} > - > -void > -arm_linux_collect_nwfpe (const struct regset *regset, > - const struct regcache *regcache, > - int regnum, void *regs_buf, size_t len) > -{ > - gdb_byte *regs = (gdb_byte *) regs_buf; > - int regno; > - > - for (regno = ARM_F0_REGNUM; regno <= ARM_F7_REGNUM; regno++) > - if (regnum == -1 || regnum == regno) > - collect_nwfpe_register (regcache, regno, regs); > - > - if (regnum == ARM_FPS_REGNUM || regnum == -1) > - regcache->raw_collect (ARM_FPS_REGNUM, > - regs + ARM_INT_REGISTER_SIZE * ARM_FPS_REGNUM); > -} > - > /* Support VFP register format. */ > > #define ARM_LINUX_SIZEOF_VFP (32 * 8 + 4) > @@ -694,11 +579,6 @@ static const struct regset arm_linux_gregset = > NULL, arm_linux_supply_gregset, arm_linux_collect_gregset > }; > > -static const struct regset arm_linux_fpregset = > - { > - NULL, arm_linux_supply_nwfpe, arm_linux_collect_nwfpe > - }; > - > static const struct regset arm_linux_vfpregset = > { > NULL, arm_linux_supply_vfp, arm_linux_collect_vfp > @@ -720,9 +600,6 @@ arm_linux_iterate_over_regset_sections (struct gdbarch *gdbarch, > if (tdep->vfp_register_count > 0) > cb (".reg-arm-vfp", ARM_LINUX_SIZEOF_VFP, ARM_LINUX_SIZEOF_VFP, > &arm_linux_vfpregset, "VFP floating-point", cb_data); > - else if (tdep->have_fpa_registers) > - cb (".reg2", ARM_LINUX_SIZEOF_NWFPE, ARM_LINUX_SIZEOF_NWFPE, > - &arm_linux_fpregset, "FPA floating-point", cb_data); > } > > /* Determine target description from core file. */ > @@ -1744,14 +1621,10 @@ arm_linux_init_abi (struct gdbarch_info info, > tdep->thumb2_breakpoint_size = sizeof (arm_linux_thumb2_le_breakpoint); > > if (tdep->fp_model == ARM_FLOAT_AUTO) > - tdep->fp_model = ARM_FLOAT_FPA; > + tdep->fp_model = ARM_FLOAT_SOFT_VFP; > > switch (tdep->fp_model) > { > - case ARM_FLOAT_FPA: > - tdep->jb_pc = ARM_LINUX_JB_PC_FPA; > - break; > - case ARM_FLOAT_SOFT_FPA: > case ARM_FLOAT_SOFT_VFP: > case ARM_FLOAT_VFP: > tdep->jb_pc = ARM_LINUX_JB_PC_EABI; > diff --git a/gdb/arm-linux-tdep.h b/gdb/arm-linux-tdep.h > index 6ed55acf9b0..cb92c3f6bbe 100644 > --- a/gdb/arm-linux-tdep.h > +++ b/gdb/arm-linux-tdep.h > @@ -23,23 +23,6 @@ > struct regset; > struct regcache; > > -#define ARM_LINUX_SIZEOF_NWFPE (8 * ARM_FP_REGISTER_SIZE \ > - + 2 * ARM_INT_REGISTER_SIZE \ > - + 8 + ARM_INT_REGISTER_SIZE) > - > -/* Support for register format used by the NWFPE FPA emulator. Each > - register takes three words, where either the first one, two, or > - three hold a single, double, or extended precision value (depending > - on the corresponding tag). The register set is eight registers, > - followed by the fpsr and fpcr, followed by eight tag bytes, and a > - final word flag which indicates whether NWFPE has been > - initialized. */ > - > -#define NWFPE_FPSR_OFFSET (8 * ARM_FP_REGISTER_SIZE) > -#define NWFPE_FPCR_OFFSET (NWFPE_FPSR_OFFSET + ARM_INT_REGISTER_SIZE) > -#define NWFPE_TAGS_OFFSET (NWFPE_FPCR_OFFSET + ARM_INT_REGISTER_SIZE) > -#define NWFPE_INITFLAG_OFFSET (NWFPE_TAGS_OFFSET + 8) > - > void arm_linux_supply_gregset (const struct regset *regset, > struct regcache *regcache, > int regnum, const void *gregs_buf, size_t len); > @@ -47,18 +30,6 @@ void arm_linux_collect_gregset (const struct regset *regset, > const struct regcache *regcache, > int regnum, void *gregs_buf, size_t len); > > -void supply_nwfpe_register (struct regcache *regcache, int regno, > - const gdb_byte *regs); > -void collect_nwfpe_register (const struct regcache *regcache, int regno, > - gdb_byte *regs); > - > -void arm_linux_supply_nwfpe (const struct regset *regset, > - struct regcache *regcache, > - int regnum, const void *regs_buf, size_t len); > -void arm_linux_collect_nwfpe (const struct regset *regset, > - const struct regcache *regcache, > - int regnum, void *regs_buf, size_t len); > - > /* ARM GNU/Linux HWCAP values. These are in defined in > in current kernels. */ > #define HWCAP_VFP 64 > diff --git a/gdb/arm-netbsd-nat.c b/gdb/arm-netbsd-nat.c > index 251159154c9..d37a1951c21 100644 > --- a/gdb/arm-netbsd-nat.c > +++ b/gdb/arm-netbsd-nat.c > @@ -135,7 +135,7 @@ arm_netbsd_nat_target::fetch_registers (struct regcache *regcache, int regno) > { > if (regno >= 0) > { > - if (regno < ARM_F0_REGNUM || regno > ARM_FPS_REGNUM) > + if (regno <= ARM_PC_REGNUM || regno >= ARM_PS_REGNUM) > fetch_register (regcache, regno); > else > fetch_fp_register (regcache, regno); > @@ -326,7 +326,7 @@ arm_netbsd_nat_target::store_registers (struct regcache *regcache, int regno) > { > if (regno >= 0) > { > - if (regno < ARM_F0_REGNUM || regno > ARM_FPS_REGNUM) > + if (regno <= ARM_PC_REGNUM || regno >= ARM_PS_REGNUM) > store_register (regcache, regno); > else > store_fp_register (regcache, regno); > diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c > index ead9bbf46c5..b33a53612a6 100644 > --- a/gdb/arm-tdep.c > +++ b/gdb/arm-tdep.c > @@ -134,8 +134,6 @@ static struct cmd_list_element *showarmcmdlist = NULL; > static const char *const fp_model_strings[] = > { > "auto", > - "softfpa", > - "fpa", > "softvfp", > "vfp", > NULL > @@ -226,9 +224,7 @@ static const char *const arm_register_names[] = > "r4", "r5", "r6", "r7", /* 4 5 6 7 */ > "r8", "r9", "r10", "r11", /* 8 9 10 11 */ > "r12", "sp", "lr", "pc", /* 12 13 14 15 */ > - "f0", "f1", "f2", "f3", /* 16 17 18 19 */ > - "f4", "f5", "f6", "f7", /* 20 21 22 23 */ > - "fps", "cpsr" }; /* 24 25 */ > + "cpsr" }; /* 25 */ > > /* Holds the current set of options to be passed to the disassembler. */ > static char *arm_disassembler_options; > @@ -1877,7 +1873,7 @@ arm_analyze_prologue (struct gdbarch *gdbarch, > enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch); > int regno; > CORE_ADDR offset, current_pc; > - pv_t regs[ARM_FPS_REGNUM]; > + pv_t regs[ARM_PC_REGNUM]; > CORE_ADDR unrecognized_pc = 0; > arm_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); > > @@ -1891,7 +1887,7 @@ arm_analyze_prologue (struct gdbarch *gdbarch, > and other operations that rely on a knowledge of the stack > traceback. */ > > - for (regno = 0; regno < ARM_FPS_REGNUM; regno++) > + for (regno = 0; regno < ARM_PC_REGNUM; regno++) > regs[regno] = pv_register (regno, 0); > pv_area stack (ARM_SP_REGNUM, gdbarch_addr_bit (gdbarch)); > > @@ -1982,51 +1978,6 @@ arm_analyze_prologue (struct gdbarch *gdbarch, > uint32_t imm = arm_expand_immediate(insn & 0xfff); > regs[ARM_SP_REGNUM] = pv_add_constant (regs[ARM_SP_REGNUM], -imm); > } > - else if ((insn & 0xffff7fff) == 0xed6d0103 /* stfe f?, > - [sp, -#c]! */ > - && tdep->have_fpa_registers) > - { > - if (stack.store_would_trash (regs[ARM_SP_REGNUM])) > - break; > - > - regs[ARM_SP_REGNUM] = pv_add_constant (regs[ARM_SP_REGNUM], -12); > - regno = ARM_F0_REGNUM + ((insn >> 12) & 0x07); > - stack.store (regs[ARM_SP_REGNUM], 12, regs[regno]); > - } > - else if ((insn & 0xffbf0fff) == 0xec2d0200 /* sfmfd f0, 4, > - [sp!] */ > - && tdep->have_fpa_registers) > - { > - int n_saved_fp_regs; > - unsigned int fp_start_reg, fp_bound_reg; > - > - if (stack.store_would_trash (regs[ARM_SP_REGNUM])) > - break; > - > - if ((insn & 0x800) == 0x800) /* N0 is set */ > - { > - if ((insn & 0x40000) == 0x40000) /* N1 is set */ > - n_saved_fp_regs = 3; > - else > - n_saved_fp_regs = 1; > - } > - else > - { > - if ((insn & 0x40000) == 0x40000) /* N1 is set */ > - n_saved_fp_regs = 2; > - else > - n_saved_fp_regs = 4; > - } > - > - fp_start_reg = ARM_F0_REGNUM + ((insn >> 12) & 0x7); > - fp_bound_reg = fp_start_reg + n_saved_fp_regs; > - for (; fp_start_reg < fp_bound_reg; fp_start_reg++) > - { > - regs[ARM_SP_REGNUM] = pv_add_constant (regs[ARM_SP_REGNUM], -12); > - stack.store (regs[ARM_SP_REGNUM], 12, > - regs[fp_start_reg++]); > - } > - } > else if ((insn & 0xff000000) == 0xeb000000 && cache == NULL) /* bl */ > { > /* Allow some special function calls when skipping the > @@ -2103,7 +2054,7 @@ arm_analyze_prologue (struct gdbarch *gdbarch, > cache->framereg = framereg; > cache->framesize = framesize; > > - for (regno = 0; regno < ARM_FPS_REGNUM; regno++) > + for (regno = 0; regno < ARM_PC_REGNUM; regno++) > if (stack.find_reg (gdbarch, regno, &offset)) > { > cache->saved_regs[regno].set_addr (offset); > @@ -4666,58 +4617,6 @@ arm_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp) > return sp & ~ (CORE_ADDR) 7; > } > > -static void > -print_fpu_flags (struct ui_file *file, int flags) > -{ > - if (flags & (1 << 0)) > - gdb_puts ("IVO ", file); > - if (flags & (1 << 1)) > - gdb_puts ("DVZ ", file); > - if (flags & (1 << 2)) > - gdb_puts ("OFL ", file); > - if (flags & (1 << 3)) > - gdb_puts ("UFL ", file); > - if (flags & (1 << 4)) > - gdb_puts ("INX ", file); > - gdb_putc ('\n', file); > -} > - > -/* Print interesting information about the floating point processor > - (if present) or emulator. */ > -static void > -arm_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, > - struct frame_info *frame, const char *args) > -{ > - unsigned long status = get_frame_register_unsigned (frame, ARM_FPS_REGNUM); > - int type; > - > - type = (status >> 24) & 127; > - if (status & (1 << 31)) > - gdb_printf (file, _("Hardware FPU type %d\n"), type); > - else > - gdb_printf (file, _("Software FPU type %d\n"), type); > - /* i18n: [floating point unit] mask */ > - gdb_puts (_("mask: "), file); > - print_fpu_flags (file, status >> 16); > - /* i18n: [floating point unit] flags */ > - gdb_puts (_("flags: "), file); > - print_fpu_flags (file, status); > -} > - > -/* Construct the ARM extended floating point type. */ > -static struct type * > -arm_ext_type (struct gdbarch *gdbarch) > -{ > - arm_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); > - > - if (!tdep->arm_ext_type) > - tdep->arm_ext_type > - = arch_float_type (gdbarch, -1, "builtin_type_arm_ext", > - floatformats_arm_ext); > - > - return tdep->arm_ext_type; > -} > - > static struct type * > arm_neon_double_type (struct gdbarch *gdbarch) > { > @@ -4902,14 +4801,7 @@ arm_register_type (struct gdbarch *gdbarch, int regnum) > return t; > } > > - if (regnum >= ARM_F0_REGNUM && regnum < ARM_F0_REGNUM + NUM_FREGS) > - { > - if (!tdep->have_fpa_registers) > - return builtin_type (gdbarch)->builtin_void; > - > - return arm_ext_type (gdbarch); > - } > - else if (regnum == ARM_SP_REGNUM) > + if (regnum == ARM_SP_REGNUM) > return builtin_type (gdbarch)->builtin_data_ptr; > else if (regnum == ARM_PC_REGNUM) > return builtin_type (gdbarch)->builtin_func_ptr; > @@ -4931,17 +4823,6 @@ arm_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg) > if (reg >= 0 && reg <= 15) > return reg; > > - /* Legacy FPA encoding. These were once used in a way which > - overlapped with VFP register numbering, so their use is > - discouraged, but GDB doesn't support the ARM toolchain > - which used them for VFP. */ > - if (reg >= 16 && reg <= 23) > - return ARM_F0_REGNUM + reg - 16; > - > - /* New assignments for the FPA registers. */ > - if (reg >= 96 && reg <= 103) > - return ARM_F0_REGNUM + reg - 96; > - > /* WMMX register assignments. */ > if (reg >= 104 && reg <= 111) > return ARM_WCGR0_REGNUM + reg - 104; > @@ -5014,14 +4895,6 @@ arm_register_sim_regno (struct gdbarch *gdbarch, int regnum) > return SIM_ARM_R0_REGNUM + reg; > reg -= NUM_GREGS; > > - if (reg < NUM_FREGS) > - return SIM_ARM_FP0_REGNUM + reg; > - reg -= NUM_FREGS; > - > - if (reg < NUM_SREGS) > - return SIM_ARM_FPS_REGNUM + reg; > - reg -= NUM_SREGS; > - > internal_error (__FILE__, __LINE__, _("Bad REGNUM %d"), regnum); > } > > @@ -8686,20 +8559,6 @@ arm_extract_return_value (struct type *type, struct regcache *regs, > { > switch (tdep->fp_model) > { > - case ARM_FLOAT_FPA: > - { > - /* The value is in register F0 in internal format. We need to > - extract the raw value and then convert it to the desired > - internal type. */ > - bfd_byte tmpbuf[ARM_FP_REGISTER_SIZE]; > - > - regs->cooked_read (ARM_F0_REGNUM, tmpbuf); > - target_float_convert (tmpbuf, arm_ext_type (gdbarch), > - valbuf, type); > - } > - break; > - > - case ARM_FLOAT_SOFT_FPA: > case ARM_FLOAT_SOFT_VFP: > /* ARM_FLOAT_VFP can arise if this is a variadic function so > not using the VFP ABI code. */ > @@ -8896,18 +8755,10 @@ arm_store_return_value (struct type *type, struct regcache *regs, > > if (type->code () == TYPE_CODE_FLT) > { > - gdb_byte buf[ARM_FP_REGISTER_SIZE]; > arm_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); > > switch (tdep->fp_model) > { > - case ARM_FLOAT_FPA: > - > - target_float_convert (valbuf, type, buf, arm_ext_type (gdbarch)); > - regs->cooked_write (ARM_F0_REGNUM, buf); > - break; > - > - case ARM_FLOAT_SOFT_FPA: > case ARM_FLOAT_SOFT_VFP: > /* ARM_FLOAT_VFP can arise if this is a variadic function so > not using the VFP ABI code. */ > @@ -9722,71 +9573,6 @@ arm_elf_osabi_sniffer (bfd *abfd) > return osabi; > } > > -static int > -arm_register_reggroup_p (struct gdbarch *gdbarch, int regnum, > - const struct reggroup *group) > -{ > - /* FPS register's type is INT, but belongs to float_reggroup. Beside > - this, FPS register belongs to save_regroup, restore_reggroup, and > - all_reggroup, of course. */ > - if (regnum == ARM_FPS_REGNUM) > - return (group == float_reggroup > - || group == save_reggroup > - || group == restore_reggroup > - || group == all_reggroup); > - else > - return default_register_reggroup_p (gdbarch, regnum, group); > -} > - > -/* For backward-compatibility we allow two 'g' packet lengths with > - the remote protocol depending on whether FPA registers are > - supplied. M-profile targets do not have FPA registers, but some > - stubs already exist in the wild which use a 'g' packet which > - supplies them albeit with dummy values. The packet format which > - includes FPA registers should be considered deprecated for > - M-profile targets. */ > - > -static void > -arm_register_g_packet_guesses (struct gdbarch *gdbarch) > -{ > - arm_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); > - > - if (tdep->is_m) > - { > - const target_desc *tdesc; > - > - /* If we know from the executable this is an M-profile target, > - cater for remote targets whose register set layout is the > - same as the FPA layout. */ > - tdesc = arm_read_mprofile_description (ARM_M_TYPE_WITH_FPA); > - register_remote_g_packet_guess (gdbarch, > - ARM_CORE_REGS_SIZE + ARM_FP_REGS_SIZE, > - tdesc); > - > - /* The regular M-profile layout. */ > - tdesc = arm_read_mprofile_description (ARM_M_TYPE_M_PROFILE); > - register_remote_g_packet_guess (gdbarch, ARM_CORE_REGS_SIZE, > - tdesc); > - > - /* M-profile plus M4F VFP. */ > - tdesc = arm_read_mprofile_description (ARM_M_TYPE_VFP_D16); > - register_remote_g_packet_guess (gdbarch, > - ARM_CORE_REGS_SIZE + ARM_VFP2_REGS_SIZE, > - tdesc); > - /* M-profile plus MVE. */ > - tdesc = arm_read_mprofile_description (ARM_M_TYPE_MVE); > - register_remote_g_packet_guess (gdbarch, ARM_CORE_REGS_SIZE > - + ARM_VFP2_REGS_SIZE > - + ARM_INT_REGISTER_SIZE, tdesc); > - > - /* M-profile system (stack pointers). */ > - tdesc = arm_read_mprofile_description (ARM_M_TYPE_SYSTEM); > - register_remote_g_packet_guess (gdbarch, 2 * ARM_INT_REGISTER_SIZE, tdesc); > - } > - > - /* Otherwise we don't have a useful guess. */ > -} > - > /* Implement the code_of_frame_writable gdbarch method. */ > > static int > @@ -9848,7 +9634,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) > bool have_s_pseudos = false, have_q_pseudos = false; > bool have_wmmx_registers = false; > bool have_neon = false; > - bool have_fpa_registers = true; > const struct target_desc *tdesc = info.target_desc; > bool have_vfp = false; > bool have_mve = false; > @@ -10015,21 +9800,13 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) > { > switch (e_flags & (EF_ARM_SOFT_FLOAT | EF_ARM_VFP_FLOAT)) > { > - case 0: > - /* Leave it as "auto". Strictly speaking this case > - means FPA, but almost nobody uses that now, and > - many toolchains fail to set the appropriate bits > - for the floating-point model they use. */ > - break; > - case EF_ARM_SOFT_FLOAT: > - fp_model = ARM_FLOAT_SOFT_FPA; > + case 0: /* Default to soft-float VFP. */ > + case EF_ARM_SOFT_FLOAT | EF_ARM_VFP_FLOAT: > + fp_model = ARM_FLOAT_SOFT_VFP; > break; > case EF_ARM_VFP_FLOAT: > fp_model = ARM_FLOAT_VFP; > break; > - case EF_ARM_SOFT_FLOAT | EF_ARM_VFP_FLOAT: > - fp_model = ARM_FLOAT_SOFT_VFP; > - break; > } > } > > @@ -10122,20 +9899,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) > } > } > > - feature = tdesc_find_feature (tdesc, > - "org.gnu.gdb.arm.fpa"); > - if (feature != NULL) > - { > - valid_p = 1; > - for (i = ARM_F0_REGNUM; i <= ARM_FPS_REGNUM; i++) > - valid_p &= tdesc_numbered_register (feature, tdesc_data.get (), i, > - arm_register_names[i]); > - if (!valid_p) > - return NULL; > - } > - else > - have_fpa_registers = false; > - > feature = tdesc_find_feature (tdesc, > "org.gnu.gdb.xscale.iwmmxt"); > if (feature != NULL) > @@ -10389,7 +10152,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) > tdep->fp_model = fp_model; > tdep->is_m = is_m; > tdep->have_sec_ext = have_sec_ext; > - tdep->have_fpa_registers = have_fpa_registers; > tdep->have_wmmx_registers = have_wmmx_registers; > gdb_assert (vfp_register_count == 0 > || vfp_register_count == 16 > @@ -10421,8 +10183,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) > tdep->m_profile_psp_s_regnum = m_profile_psp_s_regnum; > } > > - arm_register_g_packet_guesses (gdbarch); > - > /* Breakpoints. */ > switch (info.byte_order_for_code) > { > @@ -10508,12 +10268,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) > set_gdbarch_pc_regnum (gdbarch, ARM_PC_REGNUM); > set_gdbarch_num_regs (gdbarch, register_count); > set_gdbarch_register_type (gdbarch, arm_register_type); > - set_gdbarch_register_reggroup_p (gdbarch, arm_register_reggroup_p); > - > - /* This "info float" is FPA-specific. Use the generic version if we > - do not have FPA. */ > - if (tdep->have_fpa_registers) > - set_gdbarch_print_float_info (gdbarch, arm_print_float_info); > > /* Internal <-> external register number maps. */ > set_gdbarch_dwarf2_reg_to_regnum (gdbarch, arm_dwarf_reg_to_regnum); > @@ -10565,29 +10319,13 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) > /* Watchpoints are not steppable. */ > set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1); > > - /* We used to default to FPA for generic ARM, but almost nobody > - uses that now, and we now provide a way for the user to force > - the model. So default to the most useful variant. */ > - if (tdep->fp_model == ARM_FLOAT_AUTO) > - tdep->fp_model = ARM_FLOAT_SOFT_FPA; > - > if (tdep->jb_pc >= 0) > set_gdbarch_get_longjmp_target (gdbarch, arm_get_longjmp_target); > > /* Floating point sizes and format. */ > set_gdbarch_float_format (gdbarch, floatformats_ieee_single); > - if (tdep->fp_model == ARM_FLOAT_SOFT_FPA || tdep->fp_model == ARM_FLOAT_FPA) > - { > - set_gdbarch_double_format > - (gdbarch, floatformats_ieee_double_littlebyte_bigword); > - set_gdbarch_long_double_format > - (gdbarch, floatformats_ieee_double_littlebyte_bigword); > - } > - else > - { > - set_gdbarch_double_format (gdbarch, floatformats_ieee_double); > - set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double); > - } > + set_gdbarch_double_format (gdbarch, floatformats_ieee_double); > + set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double); > > /* Hook used to decorate frames with signed return addresses, only available > for ARMv8.1-m PACBTI. */ > @@ -10678,8 +10416,6 @@ arm_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file) > > gdb_printf (file, _("arm_dump_tdep: fp_model = %i\n"), > (int) tdep->fp_model); > - gdb_printf (file, _("arm_dump_tdep: have_fpa_registers = %i\n"), > - (int) tdep->have_fpa_registers); > gdb_printf (file, _("arm_dump_tdep: have_wmmx_registers = %i\n"), > (int) tdep->have_wmmx_registers); > gdb_printf (file, _("arm_dump_tdep: vfp_register_count = %i\n"), > @@ -10820,8 +10556,6 @@ _initialize_arm_tdep () > _("Set the floating point type."), > _("Show the floating point type."), > _("auto - Determine the FP typefrom the OS-ABI.\n\ > -softfpa - Software FP, mixed-endian doubles on little-endian ARMs.\n\ > -fpa - FPA co-processor (GCC compiled).\n\ > softvfp - Software FP with pure-endian doubles.\n\ > vfp - VFP co-processor."), > set_fp_model_sfunc, show_fp_model, > diff --git a/gdb/arm-tdep.h b/gdb/arm-tdep.h > index 67dd1151da4..594961e52ec 100644 > --- a/gdb/arm-tdep.h > +++ b/gdb/arm-tdep.h > @@ -62,8 +62,6 @@ extern bool arm_apcs_32; > enum arm_float_model > { > ARM_FLOAT_AUTO, /* Automatic detection. Do not set in tdep. */ > - ARM_FLOAT_SOFT_FPA, /* Traditional soft-float (mixed-endian on LE ARM). */ > - ARM_FLOAT_FPA, /* FPA co-processor. GCC calling convention. */ > ARM_FLOAT_SOFT_VFP, /* Soft-float with pure-endian doubles. */ > ARM_FLOAT_VFP, /* Full VFP calling convention. */ > ARM_FLOAT_LAST /* Keep at end. */ > @@ -95,7 +93,6 @@ struct arm_gdbarch_tdep : gdbarch_tdep_base > > enum arm_float_model fp_model {}; /* Floating point calling conventions. */ > > - bool have_fpa_registers = false; /* Does the target report the FPA registers? */ > bool have_wmmx_registers = false; /* Does the target report the WMMX registers? */ > /* The number of VFP registers reported by the target. It is zero > if VFP registers are not supported. */ > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index 238a49b027d..2111a584b88 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -25309,11 +25309,6 @@ argument @var{fputype} can be one of these: > @table @code > @item auto > Determine the FPU type by querying the OS ABI. > -@item softfpa > -Software FPU, with mixed-endian doubles on little-endian ARM > -processors. > -@item fpa > -GCC-compiled FPA co-processor. > @item softvfp > Software FPU with pure-endian doubles. > @item vfp > @@ -46919,9 +46914,6 @@ Double precision IEEE floating point. > @item bfloat16 > The 16-bit @dfn{brain floating point} format used e.g.@: by x86 and ARM. > > -@item arm_fpa_ext > -The 12-byte extended precision format used by ARM FPA registers. > - > @item i387_ext > The 10-byte extended precision format used by x87 registers. > > @@ -47106,8 +47098,9 @@ feature is replaced by @samp{org.gnu.gdb.arm.m-profile}. It should contain > registers @samp{r0} through @samp{r13}, @samp{sp}, @samp{lr}, @samp{pc}, > and @samp{xpsr}. > > -The @samp{org.gnu.gdb.arm.fpa} feature is optional. If present, it > -should contain registers @samp{f0} through @samp{f7} and @samp{fps}. > +The @samp{org.gnu.gdb.arm.fpa} feature is no longer supported. It > +used to contain registers @samp{f0} through @samp{f7} and @samp{fps}, for the > +legacy FPA feature. > > The @samp{org.gnu.gdb.arm.m-profile-mve} feature is optional. If present, it > must contain register @samp{vpr}. > diff --git a/gdb/features/Makefile b/gdb/features/Makefile > index 061cb2ed032..3d0ed4edafa 100644 > --- a/gdb/features/Makefile > +++ b/gdb/features/Makefile > @@ -204,11 +204,9 @@ FEATURE_XMLFILES = aarch64-core.xml \ > arc/v2-core.xml \ > arc/v2-aux.xml \ > arm/arm-core.xml \ > - arm/arm-fpa.xml \ > arm/arm-m-profile.xml \ > arm/arm-m-profile-mve.xml \ > arm/arm-m-system.xml \ > - arm/arm-m-profile-with-fpa.xml \ > arm/arm-tls.xml \ > arm/arm-vfpv2.xml \ > arm/arm-vfpv3.xml \ > diff --git a/gdb/features/arm/arm-fpa.c b/gdb/features/arm/arm-fpa.c > deleted file mode 100644 > index 65a49f5f3f1..00000000000 > --- a/gdb/features/arm/arm-fpa.c > +++ /dev/null > @@ -1,23 +0,0 @@ > -/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: > - Original: arm-fpa.xml */ > - > -#include "gdbsupport/tdesc.h" > - > -static int > -create_feature_arm_arm_fpa (struct target_desc *result, long regnum) > -{ > - struct tdesc_feature *feature; > - > - feature = tdesc_create_feature (result, "org.gnu.gdb.arm.fpa"); > - regnum = 16; > - tdesc_create_reg (feature, "f0", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "f1", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "f2", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "f3", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "f4", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "f5", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "f6", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "f7", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "fps", regnum++, 1, NULL, 32, "int"); > - return regnum; > -} > diff --git a/gdb/features/arm/arm-fpa.xml b/gdb/features/arm/arm-fpa.xml > deleted file mode 100644 > index d533b25132f..00000000000 > --- a/gdb/features/arm/arm-fpa.xml > +++ /dev/null > @@ -1,23 +0,0 @@ > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > diff --git a/gdb/features/arm/arm-m-profile-with-fpa.c b/gdb/features/arm/arm-m-profile-with-fpa.c > deleted file mode 100644 > index 2b7c78597bb..00000000000 > --- a/gdb/features/arm/arm-m-profile-with-fpa.c > +++ /dev/null > @@ -1,39 +0,0 @@ > -/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: > - Original: arm-m-profile-with-fpa.xml */ > - > -#include "gdbsupport/tdesc.h" > - > -static int > -create_feature_arm_arm_m_profile_with_fpa (struct target_desc *result, long regnum) > -{ > - struct tdesc_feature *feature; > - > - feature = tdesc_create_feature (result, "org.gnu.gdb.arm.m-profile"); > - tdesc_create_reg (feature, "r0", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "r1", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "r2", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "r3", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "r4", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "r5", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "r6", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "r7", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "r8", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "r9", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "r10", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "r11", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "r12", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "sp", regnum++, 1, NULL, 32, "data_ptr"); > - tdesc_create_reg (feature, "lr", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "pc", regnum++, 1, NULL, 32, "code_ptr"); > - tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "", regnum++, 1, NULL, 96, "arm_fpa_ext"); > - tdesc_create_reg (feature, "", regnum++, 1, NULL, 32, "int"); > - tdesc_create_reg (feature, "xpsr", regnum++, 1, NULL, 32, "int"); > - return regnum; > -} > diff --git a/gdb/features/arm/arm-m-profile-with-fpa.xml b/gdb/features/arm/arm-m-profile-with-fpa.xml > deleted file mode 100644 > index 850ed42cbfd..00000000000 > --- a/gdb/features/arm/arm-m-profile-with-fpa.xml > +++ /dev/null > @@ -1,39 +0,0 @@ > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c > index 044b171ecd2..45a3df941c5 100644 > --- a/gdb/target-descriptions.c > +++ b/gdb/target-descriptions.c > @@ -132,10 +132,6 @@ make_gdb_type (struct gdbarch *gdbarch, struct tdesc_type *ttype) > m_type = arch_float_type (m_gdbarch, -1, "builtin_type_ieee_double", > floatformats_ieee_double); > return; > - case TDESC_TYPE_ARM_FPA_EXT: > - m_type = arch_float_type (m_gdbarch, -1, "builtin_type_arm_ext", > - floatformats_arm_ext); > - return; > > case TDESC_TYPE_I387_EXT: > m_type = arch_float_type (m_gdbarch, -1, "builtin_type_i387_ext", > diff --git a/gdb/testsuite/gdb.base/long_long.exp b/gdb/testsuite/gdb.base/long_long.exp > index 9c8dd16b7eb..bb4c1a1859e 100644 > --- a/gdb/testsuite/gdb.base/long_long.exp > +++ b/gdb/testsuite/gdb.base/long_long.exp > @@ -141,22 +141,10 @@ gdb_test_ptr "p/a val.oct" "" "" "0x77053977" "0xa72ee53977053977" > gdb_test "p/c val.oct" "'w'" > > if { $sizeof_double == 8 || $sizeof_long_double == 8 } { > - # ARM FPA floating point numbers are not strictly little endian or big > - # endian, but a hybrid. They are in little endian format with the two > - # words swapped in big endian format. > # EABI targets default to natural-endian VFP format. > - > - if { ([istarget "arm*-*-*"]) \ > - && !([istarget "*-*-*eabi*"] || \ > - [istarget "*-*-mingw32ce*"] || \ > - [istarget "*-*-openbsd*"]) } then { > - # assume the long long represents a floating point double in ARM format > - gdb_test "p/f val.oct" "2.1386676354387559e\\+265" > - } else { > - # assume the long long represents a floating point double in little > - # endian format > - gdb_test "p/f val.oct" "-5.9822653797615723e-120" > - } > + # Assume the long long represents a floating point double in little > + # endian format > + gdb_test "p/f val.oct" "-5.9822653797615723e-120" > } else { > gdb_test "p/f val.oct" "-2.42716126e-15" > } > diff --git a/gdbserver/linux-arm-low.cc b/gdbserver/linux-arm-low.cc > index ab6209a3abc..fb3f02088ca 100644 > --- a/gdbserver/linux-arm-low.cc > +++ b/gdbserver/linux-arm-low.cc > @@ -983,8 +983,7 @@ arm_read_description (void) > return arm_linux_read_description (ARM_FP_TYPE_VFPV2); > } > > - /* The default configuration uses legacy FPA registers, probably > - simulated. */ > + /* No floating point registers. */ > return arm_linux_read_description (ARM_FP_TYPE_NONE); > } > > @@ -1088,9 +1087,9 @@ static struct regset_info arm_regsets[] = { > { PTRACE_GETREGS, PTRACE_SETREGS, 0, > ARM_CORE_REGS_SIZE + ARM_INT_REGISTER_SIZE, GENERAL_REGS, > arm_fill_gregset, arm_store_gregset }, > - { PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS, 0, IWMMXT_REGS_SIZE, EXTENDED_REGS, > + { PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS, 0, IWMMXT_REGS_SIZE, OPTIONAL_REGS, > arm_fill_wmmxregset, arm_store_wmmxregset }, > - { PTRACE_GETVFPREGS, PTRACE_SETVFPREGS, 0, ARM_VFP3_REGS_SIZE, EXTENDED_REGS, > + { PTRACE_GETVFPREGS, PTRACE_SETVFPREGS, 0, ARM_VFP3_REGS_SIZE, OPTIONAL_REGS, > arm_fill_vfpregset, arm_store_vfpregset }, > NULL_REGSET > }; > diff --git a/gdbsupport/tdesc.cc b/gdbsupport/tdesc.cc > index 4d41d0b168a..0b0b765cb3d 100644 > --- a/gdbsupport/tdesc.cc > +++ b/gdbsupport/tdesc.cc > @@ -53,7 +53,6 @@ static tdesc_type_builtin tdesc_predefined_types[] = > { "ieee_half", TDESC_TYPE_IEEE_HALF }, > { "ieee_single", TDESC_TYPE_IEEE_SINGLE }, > { "ieee_double", TDESC_TYPE_IEEE_DOUBLE }, > - { "arm_fpa_ext", TDESC_TYPE_ARM_FPA_EXT }, > { "i387_ext", TDESC_TYPE_I387_EXT }, > { "bfloat16", TDESC_TYPE_BFLOAT16 } > }; > diff --git a/gdbsupport/tdesc.h b/gdbsupport/tdesc.h > index 403aa2c3d19..082819ada13 100644 > --- a/gdbsupport/tdesc.h > +++ b/gdbsupport/tdesc.h > @@ -171,7 +171,6 @@ enum tdesc_type_kind > TDESC_TYPE_IEEE_HALF, > TDESC_TYPE_IEEE_SINGLE, > TDESC_TYPE_IEEE_DOUBLE, > - TDESC_TYPE_ARM_FPA_EXT, > TDESC_TYPE_I387_EXT, > TDESC_TYPE_BFLOAT16,