diff options
author | Dave Korn <dave.korn.cygwin@gmail.com> | 2009-04-30 21:52:15 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 2009-04-30 21:52:15 +0000 |
commit | b65d6744926a7e8b200065f75b1fb0c0359a9949 (patch) | |
tree | 7f7ec57d936fc17fabf30bb93ea9315f9295f198 | |
parent | 70ccbedbb19135115fa3a81b380c144fe8e41c74 (diff) | |
download | gcc-b65d6744926a7e8b200065f75b1fb0c0359a9949.zip gcc-b65d6744926a7e8b200065f75b1fb0c0359a9949.tar.gz gcc-b65d6744926a7e8b200065f75b1fb0c0359a9949.tar.bz2 |
Fix from Dave Korn in case a backend does not declare any define_register_constraints
From-SVN: r147020
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/genpreds.c | 8 | ||||
-rw-r--r-- | gcc/ira.c | 2 |
3 files changed, 15 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2e6fec8..13f45ff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2009-04-30 Dave Korn <dave.korn.cygwin@gmail.com> + + * ira.c (setup_cover_and_important_classes): Use safe macro + REG_CLASS_FOR_CONSTRAINT instead of calling regclass_for_constraint + directly. + * genpreds.c (write_tm_preds_h): Output suitable definition of + REG_CLASS_FOR_CONSTRAINT. + 2009-04-30 Rafael Avila de Espindola <espindola@google.com> * alloc-pool.c (alloc_pool_descriptor): Use an insert_opion value diff --git a/gcc/genpreds.c b/gcc/genpreds.c index 86c799a..5a4e249 100644 --- a/gcc/genpreds.c +++ b/gcc/genpreds.c @@ -1280,9 +1280,13 @@ write_tm_preds_h (void) puts ("extern enum reg_class regclass_for_constraint " "(enum constraint_num);\n" "#define REG_CLASS_FROM_CONSTRAINT(c_,s_) \\\n" - " regclass_for_constraint (lookup_constraint (s_))\n"); + " regclass_for_constraint (lookup_constraint (s_))\n" + "#define REG_CLASS_FOR_CONSTRAINT(x_) \\\n" + " regclass_for_constraint (x_)\n"); else - puts ("#define REG_CLASS_FROM_CONSTRAINT(c_,s_) NO_REGS"); + puts ("#define REG_CLASS_FROM_CONSTRAINT(c_,s_) NO_REGS\n" + "#define REG_CLASS_FOR_CONSTRAINT(x_) \\\n" + " NO_REGS\n"); if (have_const_int_constraints) puts ("extern bool insn_const_int_ok_for_constraint " "(HOST_WIDE_INT, enum constraint_num);\n" @@ -756,7 +756,7 @@ setup_cover_and_important_classes (void) continue; #ifdef CONSTRAINT_NUM_DEFINED_P for (j = 0; j < CONSTRAINT__LIMIT; j++) - if ((int) regclass_for_constraint ((enum constraint_num) j) == i) + if ((int) REG_CLASS_FOR_CONSTRAINT ((enum constraint_num) j) == i) break; if (j < CONSTRAINT__LIMIT) { |