]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: rs6000.c (rs6000_dbx_register_number): Return the correct numbers for TFHAR...
authorSegher Boessenkool <segher@kernel.crashing.org>
Sun, 4 Aug 2019 19:23:59 +0000 (21:23 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Sun, 4 Aug 2019 19:23:59 +0000 (21:23 +0200)
Backport from trunk
2019-05-02  Segher Boessenkool  <segher@kernel.crashing.org>

* config/rs6000/rs6000.c (rs6000_dbx_register_number): Return the
correct numbers for TFHAR, TFIAR, TEXASR.

From-SVN: r274097

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index a2d0d2552a9113f8474b8b94569771fa2d1c6609..1869bb97134149378fda145c22b86205183da776 100644 (file)
@@ -1,3 +1,11 @@
+2019-08-04  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       Backport from trunk
+       2019-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       * config/rs6000/rs6000.c (rs6000_dbx_register_number): Return the
+       correct numbers for TFHAR, TFIAR, TEXASR.
+
 2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>
 
        Backport from mainline
index 0442b091781dd2e6c5ee6aa9b96334df597b8c42..cb8d737976b24f52115b8fb316b74337e0100530 100644 (file)
@@ -36287,10 +36287,20 @@ rs6000_init_dwarf_reg_sizes_extra (tree address)
 unsigned int
 rs6000_dbx_register_number (unsigned int regno, unsigned int format)
 {
-  /* Except for the above, we use the internal number for non-DWARF
-     debug information, and also for .eh_frame.  */
+  /* We use the GCC 7 (and before) internal number for non-DWARF debug
+     information, and also for .eh_frame.  */
   if ((format == 0 && write_symbols != DWARF2_DEBUG) || format == 2)
-    return regno;
+    {
+      /* Translate the regnos to their numbers in GCC 7 (and before).  */
+      if (regno == TFHAR_REGNO)
+       regno = 114;
+      else if (regno == TFIAR_REGNO)
+       regno = 115;
+      else if (regno == TEXASR_REGNO)
+       regno = 116;
+
+      return regno;
+    }
 
   /* On some platforms, we use the standard DWARF register
      numbering for .debug_info and .debug_frame.  */
@@ -36317,6 +36327,12 @@ rs6000_dbx_register_number (unsigned int regno, unsigned int format)
     return 356;
   if (regno == VSCR_REGNO)
     return 67;
+  if (regno == TFHAR_REGNO)
+    return 228;
+  if (regno == TFIAR_REGNO)
+    return 229;
+  if (regno == TEXASR_REGNO)
+    return 230;
 #endif
   return regno;
 }