Use aarch64_features to describe register features in target descriptions.
authorJohn Baldwin <jhb@FreeBSD.org>
Wed, 18 May 2022 20:32:04 +0000 (13:32 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Wed, 18 May 2022 20:32:04 +0000 (13:32 -0700)
commit0ee6b1c511c0e2a6793568692d2e5418cd6bc10d
tree9bdc905affb28e3214b29ff650ef51650c020d06
parent04dfe7aa52171d110db813bce67c0eea5f4b18cd
Use aarch64_features to describe register features in target descriptions.

Replace the sve bool member of aarch64_features with a vq member that
holds the vector quotient.  It is zero if SVE is not present.

Add std::hash<> specialization and operator== so that aarch64_features
can be used as a key with std::unordered_map<>.

Change the various functions that create or lookup aarch64 target
descriptions to accept a const aarch64_features object rather than a
growing number of arguments.

Replace the multi-dimension tdesc_aarch64_list arrays used to cache
target descriptions with unordered_maps indexed by aarch64_feature.
13 files changed:
gdb/aarch64-fbsd-nat.c
gdb/aarch64-fbsd-tdep.c
gdb/aarch64-linux-nat.c
gdb/aarch64-linux-tdep.c
gdb/aarch64-tdep.c
gdb/aarch64-tdep.h
gdb/arch/aarch64.c
gdb/arch/aarch64.h
gdbserver/linux-aarch64-ipa.cc
gdbserver/linux-aarch64-low.cc
gdbserver/linux-aarch64-tdesc.cc
gdbserver/linux-aarch64-tdesc.h
gdbserver/netbsd-aarch64-low.cc