regclass.c (init_reg_sets_1): Add ENABLE_CHECKING sanity tests to ensure that call_us...
authorRoger Sayle <roger@eyesopen.com>
Tue, 17 Aug 2004 13:29:04 +0000 (13:29 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Tue, 17 Aug 2004 13:29:04 +0000 (13:29 +0000)
* regclass.c (init_reg_sets_1): Add ENABLE_CHECKING sanity tests to
ensure that call_used_regs is a superset of both fixed_regs and
call_really_used_regs.

From-SVN: r86119

gcc/ChangeLog
gcc/regclass.c

index ca8f544901e927758bafe4932c7b5d5cfee5d0d3..055fc374808d6ffee3e79b42e6340ac8644a969f 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-17  Roger Sayle  <roger@eyesopen.com>
+
+       * regclass.c (init_reg_sets_1): Add ENABLE_CHECKING sanity tests to
+       ensure that call_used_regs is a superset of both fixed_regs and
+       call_really_used_regs.
+
 2004-08-17  Daniel Bornstein  <danfuzz@milk.com>
 
        PR target/17019
index 1f51af610c2f135f22113036bd683d6a4d9200c5..1304313d90d4240313b087d52e9d870ff82cb712 100644 (file)
@@ -427,6 +427,17 @@ init_reg_sets_1 (void)
 
   for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
     {
+#ifdef ENABLE_CHECKING
+      /* call_used_regs must include fixed_regs.  */
+      if (fixed_regs[i] && !call_used_regs[i])
+       abort ();
+#ifdef CALL_REALLY_USED_REGISTERS
+      /* call_used_regs must include call_really_used_regs.  */
+      if (call_really_used_regs[i] && !call_used_regs[i])
+       abort ();
+#endif
+#endif
+
       if (fixed_regs[i])
        SET_HARD_REG_BIT (fixed_reg_set, i);
       else