This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: use of aarch64-without-fpu.xml in gdbserver?


Hi Pedro

On 27/05/13 21:53, Pedro Alves wrote:
Hi!

While doing some across-all-targets conversions, I noticed
that the GDBserver Aarch64 port includes the aarch64-without-fpu
description in the build, but, it doesn't appear to use it anywhere.

[snip]


Does this mean that Linux always requires an fpu?

This is correct. The unused code you have highlighted can be safely removed.

Any reason something like this shouldn't be applied?

None, your proposal looks fine to me.


Actually, on the GDB side, nothing seems to use the without_fpu
description either, not even for supporting bare metal:

$ grep aarch64-without-fpu *.c
aarch64-tdep.c:#include "features/aarch64-without-fpu.c"
$ grep aarch64_without_fpu *
aarch64-tdep.c:  initialize_tdesc_aarch64_without_fpu ();

aarch64-tdep.c:aarch64_gdbarch_init defaults to _with_ fpu:

   /* Ensure we always have a target descriptor.  */
   if (!tdesc_has_registers (tdesc))
     tdesc = tdesc_aarch64;

Though it checks for the existence of the .fpu feature:

   /* Look for the V registers.  */
   feature = tdesc_find_feature (tdesc, "org.gnu.gdb.aarch64.fpu");
   if (feature)
     {
     ...
     }

If the target stub's reported target description doesn't
include the .fpu feature, this returns tdesc_aarch64 anyway...


.. this code is also unused.

I suggest that until alternative PCS and platform ABI's require otherwise we remove all of the currently unused "without-fpu" fpu code throughout gdb.

HTH
/Marcus



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]