(output_prolog): Update debug reg map when we have -mkernel-registers.
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 12 Jan 1994 00:18:43 +0000 (19:18 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 12 Jan 1994 00:18:43 +0000 (19:18 -0500)
From-SVN: r6382

gcc/config/a29k/a29k.c

index 10a08b2379fcc491e8f2eb293f6db9565825da0c..447751b7925afd1ca4011e373498951cd42eb3d8 100644 (file)
@@ -1204,6 +1204,16 @@ output_prolog (file, size)
       a29k_debug_reg_map[R_AR (i)] = R_LR (a29k_regstack_size + i + 2);
     }
 
+  /* If using kernel register map, swap numbers for kernel and user
+     registers.  */
+  if (TARGET_KERNEL_REGISTERS)
+    for (i = 0; i < 32; i++)
+      {
+       int tem = a29k_debug_reg_map[i];
+       a29k_debug_reg_map[i] = a29k_debug_reg_map[R_KR (i)];
+       a29k_debug_reg_map[R_KR (i)] = tem;
+      }
+
   /* Compute memory stack size.  Add in number of bytes that the we should
      push and pretend the caller did and the size of outgoing arguments.
      Then round to a doubleword boundary.  */