]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use CLR DWARF register and PCC/CSP
authorLuis Machado <luis.machado@arm.com>
Fri, 6 Nov 2020 01:50:42 +0000 (22:50 -0300)
committerLuis Machado <luis.machado@linaro.org>
Tue, 8 Dec 2020 18:02:58 +0000 (15:02 -0300)
Remove code to return LR for a CLR DWARF register.

For the pure capability ABI, set pc to PCC and sp to CSP.

gdb/ChangeLog:

2020-11-11  Luis Machado  <luis.machado@arm.com>

* aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Don't return LR
for CLR.
(aarch64_gdbarch_init): Set pc to PCC and sp to CSP for pure cap
ABI.

gdb/ChangeLog
gdb/aarch64-tdep.c

index 49963f5e74ab5d66d5da50252b75a7fec5350de9..5971b23af912b99ef4108aaa4e42d6d70a0c6597 100644 (file)
@@ -1,3 +1,10 @@
+2020-11-11  Luis Machado  <luis.machado@arm.com>
+
+       * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Don't return LR
+       for CLR.
+       (aarch64_gdbarch_init): Set pc to PCC and sp to CSP for pure cap
+       ABI.
+
 2020-11-11  Luis Machado  <luis.machado@arm.com>
 
        * c-valprint.c (c_value_print_ptr): Adjust to print capability
index e30a61e6a6c4be649b5bba6ad6153d2e5bd4cccf..14b46e85c8cd7ee60848a5b8a8dc642a1e224718 100644 (file)
@@ -2580,10 +2580,6 @@ aarch64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
 
   if (tdep->has_capability ())
     {
-      /* FIXME-Morello: Redirect CLR to LR for now.  */
-      if (reg == AARCH64_DWARF_CLR)
-       return AARCH64_LR_REGNUM;
-
       if (reg >= AARCH64_DWARF_C0 && reg <= AARCH64_DWARF_C0 + 30)
        return tdep->cap_reg_base + (reg - AARCH64_DWARF_C0);
 
@@ -4331,6 +4327,9 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* Set address class hooks for capabilities.  */
   if (feature_capability)
     {
+      set_gdbarch_sp_regnum (gdbarch, tdep->cap_reg_csp);
+      set_gdbarch_pc_regnum (gdbarch, tdep->cap_reg_pcc);
+
       /* Address manipulation.  */
       set_gdbarch_addr_bits_remove (gdbarch, aarch64_addr_bits_remove);