diff options
author | James Clark <james.clark@arm.com> | 2022-05-03 14:09:22 +0100 |
---|---|---|
committer | Stephen M. Webb <stephen.webb@bregmasoft.ca> | 2022-11-07 20:00:42 -0500 |
commit | 267e97fe2d60831542d8ca18f807374170883984 (patch) | |
tree | 08d239f7b62d03701f53d47ceb377703823756e0 /src/aarch64/Ginit.c | |
parent | c30489a9ac85f9c3c315c85b05bcd45cd2779044 (diff) | |
download | libunwind-267e97fe2d60831542d8ca18f807374170883984.tar.gz |
arm64: Add VG (Vector Granule) pseudo register
This allows remote only unwinding though an SVE
function that pushes SVE registers onto the stack[1].
The remote unwinder is responsible for providing the
value of the VG register at the time the sample was
taken.
[1]: https://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst
Signed-off-by: James Clark <james.clark@arm.com>
Change-Id: I8a203b73b17cd4a07afc1fdc55ad11765d73e173
Diffstat (limited to 'src/aarch64/Ginit.c')
-rw-r--r-- | src/aarch64/Ginit.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/aarch64/Ginit.c b/src/aarch64/Ginit.c index 34e5c39a..57f48467 100644 --- a/src/aarch64/Ginit.c +++ b/src/aarch64/Ginit.c @@ -46,6 +46,15 @@ unw_addr_space_t unw_local_addr_space = &local_addr_space; static inline void * uc_addr (unw_tdep_context_t *uc, int reg) { + if (reg == UNW_AARCH64_VG) + { + /* + * Support for saving the vector length in the context needs to be + * added to get_context() for this path to work. + */ + Debug(1, "Accessing VG register from context is not supported\n"); + return NULL; + } #ifdef __FreeBSD__ if (reg >= UNW_AARCH64_X0 && reg < UNW_AARCH64_X30) return &uc->uc_mcontext.mc_gpregs.gp_x[reg]; |