This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/2] aarch64: Fix dwarf2 regnum for Dn


My argument for not accepting [bhsv]N is that unwind info
is specifically 64-bits, i.e. the dN values.

Not handled here is "esr" == 33.

---
 gas/config/tc-aarch64.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 0a65b9d..09ea8a6 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -5962,16 +5962,20 @@ tc_aarch64_regname_to_dw2regnum (char *regname)
 
   switch (reg->type)
     {
-    case REG_TYPE_SP_32:
     case REG_TYPE_SP_64:
-    case REG_TYPE_R_32:
     case REG_TYPE_R_64:
+      return reg->number;
+
+    case REG_TYPE_FP_D:
+      return reg->number + 64;
+
+    case REG_TYPE_SP_32:
+    case REG_TYPE_R_32:
     case REG_TYPE_FP_B:
     case REG_TYPE_FP_H:
     case REG_TYPE_FP_S:
-    case REG_TYPE_FP_D:
     case REG_TYPE_FP_Q:
-      return reg->number;
+      /* Do not allow register names of width other than 64-bit.  */
     default:
       break;
     }
-- 
1.8.3.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]