diff options
author | Alan Hayward <alan.hayward@arm.com> | 2018-06-11 10:24:20 +0100 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2018-06-11 10:24:20 +0100 |
commit | 65d4cadafd7d9d5bb84810cde98a8c3a007a0594 (patch) | |
tree | 54fa58a490961cdf7b65ff78d4cebf969071186c /gdb | |
parent | f868386e72baad6f35d4288f433266e03ed2753d (diff) | |
download | gdb-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')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/aarch64-tdep.c | 13 | ||||
-rw-r--r-- | gdb/aarch64-tdep.h | 4 |
3 files changed, 24 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3e51f87..635f025 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2018-06-11 Alan Hayward <alan.hayward@arm.com> + * 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. + +2018-06-11 Alan Hayward <alan.hayward@arm.com> + * common/common-regcache.h (raw_compare): New function. * regcache.c (regcache::raw_compare): Likewise. * regcache.h (regcache::raw_compare): New declaration. 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. */ diff --git a/gdb/aarch64-tdep.h b/gdb/aarch64-tdep.h index 5a31955..7e5031f 100644 --- a/gdb/aarch64-tdep.h +++ b/gdb/aarch64-tdep.h @@ -32,6 +32,10 @@ struct regset; #define AARCH64_DWARF_X0 0 #define AARCH64_DWARF_SP 31 #define AARCH64_DWARF_V0 64 +#define AARCH64_DWARF_SVE_VG 46 +#define AARCH64_DWARF_SVE_FFR 47 +#define AARCH64_DWARF_SVE_P0 48 +#define AARCH64_DWARF_SVE_Z0 96 /* Size of integer registers. */ #define X_REGISTER_SIZE 8 |