summaryrefslogtreecommitdiff
path: root/gdb/arch
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2018-06-01 16:37:45 +0100
committerAlan Hayward <alan.hayward@arm.com>2018-06-04 10:50:59 +0100
commit39bfb9373c5cca78948c94174d46891c1a3d3613 (patch)
tree31a0ddf60675d69d61e1bd3c39ebb0a444664b88 /gdb/arch
parentff183b0d8287db69c9fe9ea63cc1fdb51f392f78 (diff)
downloadbinutils-gdb-39bfb9373c5cca78948c94174d46891c1a3d3613.tar.gz
Use uint64_t for SVE VQ
Previously VQ was of type long. Using uint64_t ensures it always matches the same type as the VG register. Note that in the Linux kernel, VQ is 16bits. We cast it up to 64bits immediately after reading to ensure we always use the same type throughout the code. gdb/ * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ. * aarch64-tdep.h (aarch64_read_description): Likewise. * arch/aarch64.c (aarch64_create_target_description): Likewise. * arch/aarch64.h (aarch64_create_target_description): Likewise. * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise. * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise. * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
Diffstat (limited to 'gdb/arch')
-rw-r--r--gdb/arch/aarch64.c2
-rw-r--r--gdb/arch/aarch64.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/gdb/arch/aarch64.c b/gdb/arch/aarch64.c
index 495057488dc..9b191315bc7 100644
--- a/gdb/arch/aarch64.c
+++ b/gdb/arch/aarch64.c
@@ -26,7 +26,7 @@
/* See arch/aarch64.h. */
target_desc *
-aarch64_create_target_description (long vq)
+aarch64_create_target_description (uint64_t vq)
{
target_desc *tdesc = allocate_target_description ();
diff --git a/gdb/arch/aarch64.h b/gdb/arch/aarch64.h
index 30f5360380f..9040d8d4c86 100644
--- a/gdb/arch/aarch64.h
+++ b/gdb/arch/aarch64.h
@@ -26,7 +26,7 @@
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);
+target_desc *aarch64_create_target_description (uint64_t vq);
/* Register numbers of various important registers.
Note that on SVE, the Z registers reuse the V register numbers and the V