From 39bfb9373c5cca78948c94174d46891c1a3d3613 Mon Sep 17 00:00:00 2001 From: Alan Hayward Date: Fri, 1 Jun 2018 16:37:45 +0100 Subject: 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. --- gdb/nat/aarch64-sve-linux-ptrace.c | 2 +- gdb/nat/aarch64-sve-linux-ptrace.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/nat') diff --git a/gdb/nat/aarch64-sve-linux-ptrace.c b/gdb/nat/aarch64-sve-linux-ptrace.c index 3a1dbae..119656b 100644 --- a/gdb/nat/aarch64-sve-linux-ptrace.c +++ b/gdb/nat/aarch64-sve-linux-ptrace.c @@ -27,7 +27,7 @@ /* See nat/aarch64-sve-linux-ptrace.h. */ -unsigned long +uint64_t aarch64_sve_get_vq (int tid) { struct iovec iovec; diff --git a/gdb/nat/aarch64-sve-linux-ptrace.h b/gdb/nat/aarch64-sve-linux-ptrace.h index a32ddf1..61f8414 100644 --- a/gdb/nat/aarch64-sve-linux-ptrace.h +++ b/gdb/nat/aarch64-sve-linux-ptrace.h @@ -32,7 +32,7 @@ /* Read VQ for the given tid using ptrace. If SVE is not supported then zero is returned (on a system that supports SVE, then VQ cannot be zero). */ -extern unsigned long aarch64_sve_get_vq (int tid); +uint64_t aarch64_sve_get_vq (int tid); /* Structures and defines taken from sigcontext.h. */ -- cgit v1.1