regclass.c (init_reg_sets): Check for missing registers in target initializer macros...
authorBernardo Innocenti <bernie@develer.com>
Sat, 5 Jun 2004 21:23:06 +0000 (23:23 +0200)
committerBernardo Innocenti <bernie@gcc.gnu.org>
Sat, 5 Jun 2004 21:23:06 +0000 (23:23 +0200)
* regclass.c (init_reg_sets): Check for missing registers in target
initializer macros FIXED_REGISTERS and CALL_USED_REGISTERS.

From-SVN: r82655

gcc/ChangeLog
gcc/regclass.c

index 1ad247de598aca0f850a1e7d380dbf219bda60b0..529dd8121341a72aca2a1a123c5a37a44e310a51 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-05  Bernardo Innocenti  <bernie@develer.com>
+
+       * regclass.c (init_reg_sets): Check for missing registers in target
+       initializer macros FIXED_REGISTERS and CALL_USED_REGISTERS.
+
 2004-06-05  Zack Weinberg  <zack@codesourcery.com>
 
        * Makefile.in (MKDEPS_H): New shorthand.
index 0203d8aa3ff99ce183eaeb43065edf9e1c1f58e5..ff7d89e71d23caff2c5105f7b99d8454bf732dc2 100644 (file)
@@ -278,6 +278,12 @@ init_reg_sets (void)
          SET_HARD_REG_BIT (reg_class_contents[i], j);
     }
 
+  /* Sanity check: make sure the target macros FIXED_REGISTERS and
+     CALL_USED_REGISTERS had the right number of initializers.  */
+  if (sizeof fixed_regs != sizeof initial_fixed_regs
+      || sizeof call_used_regs != sizeof initial_call_used_regs)
+    abort();
+
   memcpy (fixed_regs, initial_fixed_regs, sizeof fixed_regs);
   memcpy (call_used_regs, initial_call_used_regs, sizeof call_used_regs);
   memset (global_regs, 0, sizeof global_regs);