From: Bernardo Innocenti Date: Sat, 5 Jun 2004 21:23:06 +0000 (+0200) Subject: regclass.c (init_reg_sets): Check for missing registers in target initializer macros... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ee19633cade4692a592576164f627aa7b48422d;p=gcc.git regclass.c (init_reg_sets): Check for missing registers in target initializer macros FIXED_REGISTERS and... * regclass.c (init_reg_sets): Check for missing registers in target initializer macros FIXED_REGISTERS and CALL_USED_REGISTERS. From-SVN: r82655 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ad247de598..529dd812134 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-06-05 Bernardo Innocenti + + * regclass.c (init_reg_sets): Check for missing registers in target + initializer macros FIXED_REGISTERS and CALL_USED_REGISTERS. + 2004-06-05 Zack Weinberg * Makefile.in (MKDEPS_H): New shorthand. diff --git a/gcc/regclass.c b/gcc/regclass.c index 0203d8aa3ff..ff7d89e71d2 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -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);