diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1b34bd3690c1..62011292123f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-04-04 David Edelsohn + + * config/rs6000/rs6000.c (num_insns_constant_wide): Change + satisfies_constraint_[IL] to explicit tests on value. + 2006-04-04 Sebastian Pop * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop, diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 9d303c0a97b7..63ee622d52e5 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -2004,11 +2004,12 @@ int num_insns_constant_wide (HOST_WIDE_INT value) { /* signed constant loadable with {cal|addi} */ - if (satisfies_constraint_I (GEN_INT (value))) + if ((unsigned HOST_WIDE_INT) (value + 0x8000) < 0x10000) return 1; /* constant loadable with {cau|addis} */ - else if (satisfies_constraint_L (GEN_INT (value))) + else if ((value & 0xffff) == 0 + && (value >> 31 == -1 || value >> 31 == 0)) return 1; #if HOST_BITS_PER_WIDE_INT == 64