aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2018-05-31 13:33:04 +0100
committerAlan Hayward <alan.hayward@arm.com>2018-05-31 13:33:04 +0100
commit95228a0d790f16deae3436e18f41b70fc711a5b2 (patch)
treef0634e4d78a8efaa75d9cfbc721f761f0996ee1f /gdb/arch
parent22467434fdc240e7c166f77f371909a8a07fc358 (diff)
downloadgdb-95228a0d790f16deae3436e18f41b70fc711a5b2.zip
gdb-95228a0d790f16deae3436e18f41b70fc711a5b2.tar.gz
gdb-95228a0d790f16deae3436e18f41b70fc711a5b2.tar.bz2
Add Aarch64 SVE target description
No code uses the new descriptions yet. gdb/ * aarch64-linux-nat.c (aarch64_linux_read_description): Add parmeter zero. * aarch64-linux-tdep.c (aarch64_linux_core_read_description): Likewise. * aarch64-tdep.c (tdesc_aarch64_list): Add. (aarch64_read_description): Use VQ to index tdesc_aarch64_list. (aarch64_gdbarch_init): Add parmeter zero. * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter. * arch/aarch64.c (aarch64_create_target_description): Check VQ. * arch/aarch64.h (aarch64_create_target_description): Add VQ. parmeter. * doc/gdb.texinfo: Describe SVE feature * features/aarch64-sve.c: New file. gdbserver/ * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add null VQ.
Diffstat (limited to 'gdb/arch')
-rw-r--r--gdb/arch/aarch64.c11
-rw-r--r--gdb/arch/aarch64.h9
2 files changed, 16 insertions, 4 deletions
diff --git a/gdb/arch/aarch64.c b/gdb/arch/aarch64.c
index b85e460..4950574 100644
--- a/gdb/arch/aarch64.c
+++ b/gdb/arch/aarch64.c
@@ -21,11 +21,12 @@
#include "../features/aarch64-core.c"
#include "../features/aarch64-fpu.c"
+#include "../features/aarch64-sve.c"
-/* Create the aarch64 target description. */
+/* See arch/aarch64.h. */
target_desc *
-aarch64_create_target_description ()
+aarch64_create_target_description (long vq)
{
target_desc *tdesc = allocate_target_description ();
@@ -36,7 +37,11 @@ aarch64_create_target_description ()
long regnum = 0;
regnum = create_feature_aarch64_core (tdesc, regnum);
- regnum = create_feature_aarch64_fpu (tdesc, regnum);
+
+ if (vq == 0)
+ regnum = create_feature_aarch64_fpu (tdesc, regnum);
+ else
+ regnum = create_feature_aarch64_sve (tdesc, regnum, vq);
return tdesc;
}
diff --git a/gdb/arch/aarch64.h b/gdb/arch/aarch64.h
index 86185f5..b291a09 100644
--- a/gdb/arch/aarch64.h
+++ b/gdb/arch/aarch64.h
@@ -22,7 +22,11 @@
#include "common/tdesc.h"
-target_desc *aarch64_create_target_description ();
+/* Create the aarch64 target description. A non zero VQ value indicates both
+ the presence of SVE and the Vector Quotient - the number of 128bit chunks in
+ an SVE Z register. */
+
+target_desc *aarch64_create_target_description (long vq);
/* Register numbers of various important registers. */
enum aarch64_regnum
@@ -48,4 +52,7 @@ enum aarch64_regnum
#define AARCH64_V_REGS_NUM 32
#define AARCH64_NUM_REGS AARCH64_FPCR_REGNUM + 1
+/* Maximum supported VQ value. Increase if required. */
+#define AARCH64_MAX_SVE_VQ 16
+
#endif /* ARCH_AARCH64_H */