aboutsummaryrefslogtreecommitdiff
path: root/gdb/aarch64-tdep.c
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2018-06-11 10:24:20 +0100
committerAlan Hayward <alan.hayward@arm.com>2018-06-11 10:24:20 +0100
commit65d4cadafd7d9d5bb84810cde98a8c3a007a0594 (patch)
tree54fa58a490961cdf7b65ff78d4cebf969071186c /gdb/aarch64-tdep.c
parentf868386e72baad6f35d4288f433266e03ed2753d (diff)
downloadgdb-65d4cadafd7d9d5bb84810cde98a8c3a007a0594.zip
gdb-65d4cadafd7d9d5bb84810cde98a8c3a007a0594.tar.gz
gdb-65d4cadafd7d9d5bb84810cde98a8c3a007a0594.tar.bz2
Add Aarch64 SVE dwarf regnums
This is as per the spec: https://developer.arm.com/products/architecture/a-profile/docs/100985/0000 gdb/ * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings. * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define. (AARCH64_DWARF_SVE_FFR): Likewise. (AARCH64_DWARF_SVE_P0): Likewise. (AARCH64_DWARF_SVE_Z0): Likewise.
Diffstat (limited to 'gdb/aarch64-tdep.c')
-rw-r--r--gdb/aarch64-tdep.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index 5380baa..5120fff 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -1805,9 +1805,20 @@ aarch64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
if (reg >= AARCH64_DWARF_V0 && reg <= AARCH64_DWARF_V0 + 31)
return AARCH64_V0_REGNUM + reg - AARCH64_DWARF_V0;
+ if (reg == AARCH64_DWARF_SVE_VG)
+ return AARCH64_SVE_VG_REGNUM;
+
+ if (reg == AARCH64_DWARF_SVE_FFR)
+ return AARCH64_SVE_FFR_REGNUM;
+
+ if (reg >= AARCH64_DWARF_SVE_P0 && reg <= AARCH64_DWARF_SVE_P0 + 15)
+ return AARCH64_SVE_P0_REGNUM + reg - AARCH64_DWARF_SVE_P0;
+
+ if (reg >= AARCH64_DWARF_SVE_Z0 && reg <= AARCH64_DWARF_SVE_Z0 + 15)
+ return AARCH64_SVE_Z0_REGNUM + reg - AARCH64_DWARF_SVE_Z0;
+
return -1;
}
-
/* Implement the "print_insn" gdbarch method. */